Fixes to make gss_name checking code compile.
authorMargaret Wasserman <margaret@moonshot-proxy>
Tue, 9 Jul 2013 20:21:19 +0000 (16:21 -0400)
committerMargaret Wasserman <margaret@moonshot-proxy>
Tue, 9 Jul 2013 20:21:19 +0000 (16:21 -0400)
include/tr_filter.h
tr/tr_main.c

index 8694469..9d5dc25 100644 (file)
@@ -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);
 
index e141bd0..6c6fb23 100644 (file)
 #include <jansson.h>
 
 #include <tr.h>
+#include <tr_filter.h>
 #include <trust_router/tid.h>
 #include <tr_config.h>
 #include <tr_comm.h>
 #include <tr_idp.h>
+#include <tr_rp.h>
 
 /* 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;
   }