Sync
authorAndrew McNab <andrew.mcnab@manchester.ac.uk>
Thu, 8 Nov 2007 15:59:52 +0000 (15:59 +0000)
committerAndrew McNab <andrew.mcnab@manchester.ac.uk>
Thu, 8 Nov 2007 15:59:52 +0000 (15:59 +0000)
org.gridsite.core/VERSION
org.gridsite.core/interface/gridsite.h
org.gridsite.core/src/Makefile
org.gridsite.core/src/grst_gacl.c

index 90c025b..6f4686d 100644 (file)
@@ -1,5 +1,5 @@
 MAJOR_VERSION=1
 MINOR_VERSION=1.5
 PATCH_VERSION=1.5.3
-VERSION=$(PATCH_VERSION)
 DEFVERSION=010503
+VERSION=$(PATCH_VERSION)
index eb28011..3f08f78 100644 (file)
@@ -250,6 +250,7 @@ int        GRSTgaclEntryDelCred(GRSTgaclEntry *, GRSTgaclCred *);
 /*  #define GACLprintCred(x,y) GRSTgaclCredPrint((x),(y)) */
 int        GRSTgaclCredCredPrint(GRSTgaclCred *, FILE *);
 
+int       GRSTgaclCredCmp(GRSTgaclCred *, GRSTgaclCred *);
 
 /*  #define GACLnewEntry(x)            GRSTgaclEntryNew((x)) */
 GRSTgaclEntry *GRSTgaclEntryNew(void);
index 6c6ad6d..3b914dd 100644 (file)
@@ -349,7 +349,7 @@ install: apidoc install-lib
                  $(prefix)/share/man/man8 \
                  $(prefix)/lib/httpd/modules \
                  $(prefix)/share/doc/gridsite-$(MINOR_VERSION)
-       echo "#define GRST_VERSION $DEFVERSION" > $(prefix)/include/gridsite.h
+       echo '#define' GRST_VERSION $(DEFVERSION) > $(prefix)/include/gridsite.h
        cat ../interface/gridsite.h >>$(prefix)/include/gridsite.h
        cp -f ../interface/gridsite-gacl.h $(prefix)/include
        cp -f urlencode $(prefix)/bin
index bbd71cb..f289682 100644 (file)
@@ -328,7 +328,28 @@ int GRSTgaclCredPrint(GRSTgaclCred *cred, FILE *fp)
       return 1;
     }
     
-  return 0;  
+  return 0;
+}
+
+int GRSTgaclCredCmp(GRSTgaclCred *cred1, GRSTgaclCred *cred2)
+/*
+    GRSTgaclCredCmp - compare two credentials for exact match in AURI values
+                      (this means a string match, not just any-user=DN etc)
+*/
+{
+  if ((cred1 == NULL) && (cred2 == NULL) return 0;
+  
+  if (cred1 == NULL) return -1;
+
+  if (cred2 == NULL) return 1;
+  
+  if ((cred1->auri == NULL) && (cred2->auri == NULL) return 0;
+  
+  if (cred1->auri == NULL) return -1;
+
+  if (cred2->auri == NULL) return 1;
+  
+  return strcmp(cred1->auri, cred2->auri);
 }
 
 /*                                              *