From f8a6afa6fe58a062eb1abd4541774c369bf1d084 Mon Sep 17 00:00:00 2001 From: Andrew McNab Date: Thu, 8 Nov 2007 15:59:52 +0000 Subject: [PATCH] Sync --- org.gridsite.core/VERSION | 2 +- org.gridsite.core/interface/gridsite.h | 1 + org.gridsite.core/src/Makefile | 2 +- org.gridsite.core/src/grst_gacl.c | 23 ++++++++++++++++++++++- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/org.gridsite.core/VERSION b/org.gridsite.core/VERSION index 90c025b..6f4686d 100644 --- a/org.gridsite.core/VERSION +++ b/org.gridsite.core/VERSION @@ -1,5 +1,5 @@ MAJOR_VERSION=1 MINOR_VERSION=1.5 PATCH_VERSION=1.5.3 -VERSION=$(PATCH_VERSION) DEFVERSION=010503 +VERSION=$(PATCH_VERSION) diff --git a/org.gridsite.core/interface/gridsite.h b/org.gridsite.core/interface/gridsite.h index eb28011..3f08f78 100644 --- a/org.gridsite.core/interface/gridsite.h +++ b/org.gridsite.core/interface/gridsite.h @@ -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); diff --git a/org.gridsite.core/src/Makefile b/org.gridsite.core/src/Makefile index 6c6ad6d..3b914dd 100644 --- a/org.gridsite.core/src/Makefile +++ b/org.gridsite.core/src/Makefile @@ -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 diff --git a/org.gridsite.core/src/grst_gacl.c b/org.gridsite.core/src/grst_gacl.c index bbd71cb..f289682 100644 --- a/org.gridsite.core/src/grst_gacl.c +++ b/org.gridsite.core/src/grst_gacl.c @@ -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); } /* * -- 1.8.2.3