gridsite-gacl.h

Go to the documentation of this file.
00001 /*
00002    Copyright (c) 2002-4, Andrew McNab, University of Manchester
00003    All rights reserved.
00004 
00005    Redistribution and use in source and binary forms, with or
00006    without modification, are permitted provided that the following
00007    conditions are met:
00008 
00009      o Redistributions of source code must retain the above
00010        copyright notice, this list of conditions and the following
00011        disclaimer. 
00012      o Redistributions in binary form must reproduce the above
00013        copyright notice, this list of conditions and the following
00014        disclaimer in the documentation and/or other materials
00015        provided with the distribution. 
00016 
00017    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
00018    CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
00019    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
00020    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00021    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
00022    BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00023    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
00024    TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00025    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
00026    ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00027    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00028    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00029    POSSIBILITY OF SUCH DAMAGE.
00030 */
00031 
00032 /*---------------------------------------------------------------*
00033  * For more about GridSite: http://www.gridsite.org/             *
00034  *---------------------------------------------------------------*/
00035 
00036 #ifndef HEADER_GACL_H
00037 #define HEADER_GACL_H
00038 #endif
00039 
00040 #ifndef GACL_LIB_VERSION
00041 #define GACL_LIB_VERSION "x.x.x"
00042 #endif
00043 
00044 typedef GRSTgaclCred GACLcred;
00045 
00046 typedef int                GACLaction;
00047 typedef unsigned int       GACLperm;
00048 
00049 typedef GRSTgaclEntry  GACLentry;
00050 
00051 typedef GRSTgaclAcl    GACLacl;  
00052 
00053 typedef GRSTgaclUser   GACLuser;
00054 
00055 extern char      *gacl_perm_syms[];
00056 extern GACLperm   gacl_perm_vals[];
00057 
00058 #define GACL_PERM_NONE  GRST_PERM_NONE
00059 #define GACL_PERM_READ  GRST_PERM_READ
00060 #define GACL_PERM_LIST  GRST_PERM_LIST
00061 #define GACL_PERM_WRITE GRST_PERM_WRITE
00062 #define GACL_PERM_ADMIN GRST_PERM_ADMIN
00063 
00064 #define GACLhasNone(perm)  (perm == 0)
00065 #define GACLhasRead(perm)  ((perm & GRST_PERM_READ) != 0)
00066 #define GACLhasList(perm)  ((perm & GRST_PERM_LIST) != 0)
00067 #define GACLhasWrite(perm) ((perm & GRST_PERM_WRITE) != 0)
00068 #define GACLhasAdmin(perm) ((perm & GRST_PERM_ADMIN) != 0)
00069 
00070 #define GACL_ACTION_ALLOW GRST_ACTION_ALLOW
00071 #define GACL_ACTION_DENY  GRST_ACTION_DENY
00072 
00073 #define GACL_ACL_FILE GRST_ACL_FILE
00074 #define GACL_DN_LISTS GRST_DN_LISTS
00075 
00076 #define GACLinit() GRSTgaclInit()
00077 
00078 #define GACLnewCred(x)          GRSTgaclCredNew((x))
00079 /* GACLcred  *GACLnewCred(char *); */
00080 
00081 #define GACLaddToCred(x,y,z)    GRSTgaclCredAddValue((x),(y),(z))
00082 /* int        GACLaddToCred(GACLcred *, char *, char *); */
00083 
00084 #define GACLfreeCred(x)         GRSTgaclCredFree((x))
00085 /* int        GACLfreeCred(GACLcred *); */
00086 
00087 #define GACLaddCred(x,y)        GRSTgaclEntryAddCred((x),(y))
00088 /* int        GACLaddCred(GACLentry *, GACLcred *); */
00089 
00090 #define GACLdelCred(x,y)        GRSTgaclEntryDelCred((x),(y))
00091 /* int        GACLdelCred(GACLentry *, GACLcred *); */
00092 
00093 #define GACLprintCred(x,y)      GRSTgaclCredPrint((x),(y))
00094 /*  int        GACLprintCred(GACLcred *, FILE *); */
00095 
00096 
00097 #define GACLnewEntry()          GRSTgaclEntryNew()
00098 /*  GACLentry *GACLnewEntry(void); */
00099 
00100 #define GACLfreeEntry(x)        GRSTgaclEntryFree((x))
00101 /*  int        GACLfreeEntry(GACLentry *); */
00102 
00103 #define GACLaddEntry(x,y)       GRSTgaclAclAddEntry((x),(y))
00104 /*  int        GACLaddEntry(GACLacl *, GACLentry *); */
00105 
00106 #define GACLprintEntry(x,y)     GRSTgaclEntryPrint((x),(y))
00107 /*  int        GACLprintEntry(GACLentry *, FILE *); */
00108 
00109 
00110 #define GACLprintPerm(x,y)      GRSTgaclPermPrint((x),(y))
00111 /* int        GACLprintPerm(GACLperm, FILE *); */
00112 
00113 #define GACLallowPerm(x,y)      GRSTgaclEntryAllowPerm((x),(y))
00114 /*  int        GACLallowPerm(GACLentry *, GACLperm); */
00115 
00116 #define GACLunallowPerm(x,y)    GRSTgaclEntryUnallowPerm((x),(y))
00117 /* int        GACLunallowPerm(GACLentry *, GACLperm); */
00118 
00119 #define GACLdenyPerm(x,y)       GRSTgaclEntryDenyPerm((x),(y))
00120 /*  int        GACLdenyPerm(GACLentry *, GACLperm); */
00121 
00122 #define GACLundenyPerm(x,y)     GRSTgaclEntryUndenyPerm((x),(y))
00123 /*  int        GACLundenyPerm(GACLentry *, GACLperm); */
00124 
00125 #define GACLpermToChar(x)       GRSTgaclPermToChar((x))
00126 /*  char      *GACLpermToChar(GACLperm); */
00127 
00128 #define GACLcharToPerm(x)       GRSTgaclPermFromChar((x))
00129 /*  GACLperm   GACLcharToPerm(char *); */
00130 
00131 #define GACLnewAcl()            GRSTgaclAclNew()
00132 /*  GACLacl   *GACLnewAcl(void); */
00133 
00134 #define GACLfreeAcl(x)          GRSTgaclAclFree((x))
00135 /*  int        GACLfreeAcl(GACLacl *); */
00136 
00137 #define GACLprintAcl(x,y)       GRSTgaclAclPrint((x),(y))
00138 /*  int        GACLprintAcl(GACLacl *, FILE *); */
00139 
00140 #define GACLsaveAcl(x,y)        GRSTgaclAclSave((y),(x))
00141 /*  int        GACLsaveAcl(char *, GACLacl *); */
00142 
00143 #define GACLloadAcl(x)          GRSTgaclAclLoadFile((x))
00144 /*  GACLacl   *GACLloadAcl(char *); */
00145 
00146 #define GACLfindAclForFile(x)   GRSTgaclFileFindAclname((x))
00147 /*  char      *GACLfindAclForFile(char *); */
00148 
00149 #define GACLloadAclForFile(x)   GRSTgaclAclLoadforFile((x))
00150 /*  GACLacl   *GACLloadAclForFile(char *); */
00151 
00152 #define GACLisAclFile(x)        GRSTgaclFileIsAcl((x))
00153 /*  int        GACLisAclFile(char *); */
00154 
00155 
00156 #define GACLnewUser(x)          GRSTgaclUserNew((x))
00157 /*  GACLuser *GACLnewUser(GACLcred *); */
00158 
00159 #define GACLfreeUser(x)         GRSTgaclUserFree((x))
00160 /*  int       GACLfreeUser(GACLuser *); */
00161 
00162 #define GACLuserAddCred(x,y)    GRSTgaclUserAddCred((x),(y))
00163 /*  int       GACLuserAddCred(GACLuser *, GACLcred *); */
00164 
00165 #define GACLuserHasCred(x,y)    GRSTgaclUserHasCred((x),(y))
00166 /*  int       GACLuserHasCred(GACLuser *, GACLcred *); */
00167 
00168 #define GACLuserFindCredType(x,y) GRSTgaclUserFindCredtype((x),(y))
00169 /*  GACLcred *GACLuserFindCredType(GACLuser *, char *); */
00170 
00171 #define GACLtestDnList(x,y)     GRSTgaclDNlistHasUser((x),(y))
00172 /*  int        GACLtestDnList(char *, GACLuser *); */
00173 
00174 #define GACLtestUserAcl(x,y)    GRSTgaclAclTestUser((x),(y))
00175 /*  GACLperm   GACLtestUserAcl(GACLacl *, GACLuser *); */
00176 
00177 #define GACLtestExclAcl(x,y)    GRSTgaclAclTestexclUser((x),(y))
00178 /*  GACLperm   GACLtestExclAcl(GACLacl *, GACLuser *); */
00179 
00180 
00181 #define GACLurlEncode(x)        GRSThttpUrlEncode((x))
00182 /*  char      *GACLurlEncode(char *); */
00183 
00184 #define GACLmildUrlEncode(x)    GRSThttpUrlMildencode((x))
00185 /*  char      *GACLmildUrlEncode(char *); */
00186 
00187 GACLentry *GRSTgaclEntryParse(xmlNodePtr cur);
00188 /*  special function for legacy EDG LB service */

Generated on Wed Sep 22 00:12:08 2010 by  doxygen 1.5.6