From 6de729f2c8bd2baa202cd3a29e4410fd7c0589f8 Mon Sep 17 00:00:00 2001 From: Margaret Wasserman Date: Tue, 9 Jul 2013 16:21:19 -0400 Subject: [PATCH] Fixes to make gss_name checking code compile. --- include/tr_filter.h | 4 ++-- tr/tr_main.c | 13 ++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) 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; } -- 2.1.4