From: Margaret Wasserman Date: Tue, 9 Jul 2013 20:21:19 +0000 (-0400) Subject: Fixes to make gss_name checking code compile. X-Git-Tag: 1.0~6 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=trust_router.git;a=commitdiff_plain;h=6de729f2c8bd2baa202cd3a29e4410fd7c0589f8 Fixes to make gss_name checking code compile. --- diff --git a/include/tr_filter.h b/include/tr_filter.h index 8694469..9d5dc25 100644 --- a/include/tr_filter.h +++ b/include/tr_filter.h @@ -32,8 +32,8 @@ * */ -#ifndef TR_CONFIG_H -#define TR_CONFIG_H +#ifndef TR_FILTER_H +#define TR_FILTER_H int tr_prefix_wildcard_match (char *str, char *wc_str); diff --git a/tr/tr_main.c b/tr/tr_main.c index e141bd0..6c6fb23 100644 --- a/tr/tr_main.c +++ b/tr/tr_main.c @@ -36,10 +36,12 @@ #include #include +#include #include #include #include #include +#include /* Structure to hold TR instance and original request in one cookie */ typedef struct tr_resp_cookie { @@ -192,12 +194,13 @@ static int tr_tids_req_handler (TIDS_INSTANCE * tids, return 0; } -static int tr_tidc_gss_handler(gss_name_t *clientName, TR_NAME *displayName, +static int tr_tids_gss_handler(gss_name_t client_name, TR_NAME *gss_name, void *tr) { - RP_CLIENT *rp; + TR_RP_CLIENT *rp; + int i = 0; - if ((!client_name) || (!display_name) || (!tr)) { + if ((!client_name) || (!gss_name) || (!tr)) { fprintf(stderr, "tr_tidc_gss_handler: Bad parameters.\n"); return -1; } @@ -209,8 +212,8 @@ static int tr_tidc_gss_handler(gss_name_t *clientName, TR_NAME *displayName, } /* check if the gss name matches the filter in the rp realm */ - if (!tr_prefix_wildcard_match(gss_name->buf, rp->rp_match->buf)) { - fprintf(stderr, "tr_tids_gss_handler: RP realm does not match, realm %s, math %s\n", gss_name_buf, rp->rp_match->buf); + if (!(i = tr_prefix_wildcard_match(gss_name->buf, rp->rp_match->buf))) { + fprintf(stderr, "tr_tids_gss_handler: RP realm does not match, realm %s, math %s\n", gss_name->buf, rp->rp_match->buf); return -1; }