#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <unistd.h>
#include <string.h>
#include <dirent.h>
#include <fcntl.h>
#include <ctype.h>
#include <strings.h>
#include <stdio.h>
#include <stdlib.h>
#include <fnmatch.h>
#include <libxml/xmlmemory.h>
#include <libxml/tree.h>
#include <libxml/parser.h>
#include "gridsite.h"
Go to the source code of this file.
GRSTgaclEntry* GACLparseEntry | ( | xmlNodePtr | cur | ) |
int GRSTgaclAclAddEntry | ( | GRSTgaclAcl * | acl, | |
GRSTgaclEntry * | entry | |||
) |
Definition at line 459 of file grst_gacl.c.
References acl(), entry, GRSTgaclEntryInsert(), and NULL.
Referenced by GRSTgaclAclParse(), and GRSTxacmlAclParse().
int GRSTgaclAclFree | ( | GRSTgaclAcl * | acl | ) |
Definition at line 605 of file grst_gacl.c.
References acl(), GRSTgaclEntriesFree(), and NULL.
Referenced by GRSTgaclAclParse(), and GRSTxacmlAclParse().
GRSTgaclAcl* GRSTgaclAclLoadFile | ( | char * | filename | ) |
Definition at line 783 of file grst_gacl.c.
References acl(), GRST_LOG_DEBUG, GRSTerrorLog, GRSTgaclAclParse(), GRSTxacmlAclParse(), and NULL.
Referenced by GRSTgaclAclLoadforFile().
GRSTgaclAcl* GRSTgaclAclLoadforFile | ( | char * | pathandfile | ) |
Definition at line 931 of file grst_gacl.c.
References acl(), free(), GRSTgaclAclLoadFile(), GRSTgaclFileFindAclname(), and NULL.
GRSTgaclAcl* GRSTgaclAclNew | ( | void | ) |
Definition at line 589 of file grst_gacl.c.
References GRSTgaclAcl::firstentry, malloc(), and NULL.
Referenced by GRSTgaclAclParse(), and GRSTxacmlAclParse().
GRSTgaclAcl * GRSTgaclAclParse | ( | xmlDocPtr | , | |
xmlNodePtr | , | |||
GRSTgaclAcl * | ||||
) |
Definition at line 832 of file grst_gacl.c.
References acl(), entry, GRSTgaclAclAddEntry(), GRSTgaclAclFree(), GRSTgaclAclNew(), GRSTgaclEntryParse(), and NULL.
Referenced by GRSTgaclAclLoadFile(), and GRSTxacmlAclLoadFile().
int GRSTgaclAclPrint | ( | GRSTgaclAcl * | acl, | |
FILE * | fp | |||
) |
Definition at line 617 of file grst_gacl.c.
References acl(), entry, GRSTgaclEntryPrint(), and NULL.
Referenced by GRSTgaclAclSave().
int GRSTgaclAclSave | ( | GRSTgaclAcl * | acl, | |
char * | filename | |||
) |
Definition at line 631 of file grst_gacl.c.
References acl(), fclose(), fopen, fp, GRSTgaclAclPrint(), and NULL.
GRSTgaclPerm GRSTgaclAclTestexclUser | ( | GRSTgaclAcl * | acl, | |
GRSTgaclUser * | user | |||
) |
Definition at line 1368 of file grst_gacl.c.
References acl(), GRSTgaclCred::auri, entry, flag, GRSTgaclUserHasCred(), GRSTgaclCred::next, and NULL.
GRSTgaclPerm GRSTgaclAclTestUser | ( | GRSTgaclAcl * | acl, | |
GRSTgaclUser * | user | |||
) |
Definition at line 1323 of file grst_gacl.c.
References acl(), GRSTgaclCred::auri, entry, flag, GRST_PERM_ADMIN, GRST_PERM_WRITE, GRSTgaclUserHasCred(), GRSTgaclCred::next, and NULL.
int GRSTgaclCredAddValue | ( | GRSTgaclCred * | cred, | |
char * | name, | |||
char * | rawvalue | |||
) |
Definition at line 188 of file grst_gacl.c.
References GRSTgaclCred::auri, free(), GRSThttpUrlMildencode(), i, NULL, sprintf(), and value.
Referenced by GRSTgaclCredParse(), and GRSTxacmlCredParse().
int GRSTgaclCredCmpAuri | ( | GRSTgaclCred * | cred1, | |
GRSTgaclCred * | cred2 | |||
) |
GRSTgaclCred* GRSTgaclCredCreate | ( | char * | auri_prefix, | |
char * | auri_suffix | |||
) |
Definition at line 126 of file grst_gacl.c.
References GRSTgaclCred::auri, GRSTgaclCred::delegation, i, malloc(), GRSTgaclCred::next, GRSTgaclCred::nist_loa, GRSTgaclCred::notafter, GRSTgaclCred::notbefore, NULL, and sprintf().
Referenced by GRSTgaclCredNew(), GRSTgaclCredParse(), GRSTx509CompactToCred(), and recurse4dnlists().
int GRSTgaclCredFree | ( | GRSTgaclCred * | cred | ) |
Definition at line 251 of file grst_gacl.c.
References GRSTgaclCred::auri, free(), and NULL.
Referenced by GRSTgaclCredParse(), GRSTgaclCredsFree(), GRSTgaclEntryParse(), and GRSTxacmlEntryParse().
static int GRSTgaclCredInsert | ( | GRSTgaclCred * | firstcred, | |
GRSTgaclCred * | newcred | |||
) | [static] |
Definition at line 277 of file grst_gacl.c.
References GRSTgaclCred::next, and NULL.
Referenced by GRSTgaclEntryAddCred().
GRSTgaclCred* GRSTgaclCredNew | ( | char * | type | ) |
Definition at line 165 of file grst_gacl.c.
References GRSTgaclCredCreate(), and NULL.
Referenced by GRSTgaclCredParse(), and GRSTxacmlCredParse().
static GRSTgaclCred* GRSTgaclCredParse | ( | xmlNodePtr | cur | ) | [static] |
Definition at line 654 of file grst_gacl.c.
References GRSTgaclCred::delegation, GRSTgaclCredAddValue(), GRSTgaclCredCreate(), GRSTgaclCredFree(), GRSTgaclCredNew(), GRSTgaclCred::nist_loa, and NULL.
Referenced by GRSTgaclEntryParse().
int GRSTgaclCredPrint | ( | GRSTgaclCred * | cred, | |
FILE * | fp | |||
) |
Definition at line 335 of file grst_gacl.c.
References GRSTgaclCred::auri, GRSTgaclCred::delegation, fprintf(), GRSTgaclCred::nist_loa, and NULL.
Referenced by GRSTgaclEntryPrint().
static int GRSTgaclCredRemoveCred | ( | GRSTgaclCred * | firstcred, | |
GRSTgaclCred * | oldcred | |||
) | [static] |
static int GRSTgaclCredsFree | ( | GRSTgaclCred * | firstcred | ) | [static] |
Definition at line 265 of file grst_gacl.c.
References GRSTgaclCredFree(), GRSTgaclCred::next, and NULL.
Referenced by GRSTgaclEntryFree(), and GRSTgaclUserFree().
int GRSTgaclDNlistHasUser | ( | char * | listurl, | |
GRSTgaclUser * | user | |||
) |
static int GRSTgaclEntriesFree | ( | GRSTgaclEntry * | entry | ) | [static] |
Definition at line 428 of file grst_gacl.c.
References entry, GRSTgaclEntryFree(), and NULL.
Referenced by GRSTgaclAclFree().
int GRSTgaclEntryAddCred | ( | GRSTgaclEntry * | entry, | |
GRSTgaclCred * | cred | |||
) |
Definition at line 295 of file grst_gacl.c.
References entry, GRSTgaclCredInsert(), and NULL.
Referenced by GRSTgaclEntryParse(), and GRSTxacmlEntryParse().
int GRSTgaclEntryAllowPerm | ( | GRSTgaclEntry * | entry, | |
GRSTgaclPerm | perm | |||
) |
Definition at line 529 of file grst_gacl.c.
References entry.
Referenced by GRSTgaclEntryParse(), and GRSTxacmlEntryParse().
int GRSTgaclEntryDelCred | ( | GRSTgaclEntry * | entry, | |
GRSTgaclCred * | cred | |||
) |
int GRSTgaclEntryDenyPerm | ( | GRSTgaclEntry * | entry, | |
GRSTgaclPerm | perm | |||
) |
Definition at line 543 of file grst_gacl.c.
References entry.
Referenced by GRSTgaclEntryParse(), and GRSTxacmlEntryParse().
int GRSTgaclEntryFree | ( | GRSTgaclEntry * | entry | ) |
Definition at line 414 of file grst_gacl.c.
References entry, free(), GRSTgaclCredsFree(), and NULL.
Referenced by GRSTgaclEntriesFree(), GRSTgaclEntryParse(), and GRSTxacmlEntryParse().
static int GRSTgaclEntryInsert | ( | GRSTgaclEntry * | firstentry, | |
GRSTgaclEntry * | newentry | |||
) | [static] |
Definition at line 441 of file grst_gacl.c.
References GRSTgaclEntry::next, and NULL.
Referenced by GRSTgaclAclAddEntry().
GRSTgaclEntry* GRSTgaclEntryNew | ( | void | ) |
Definition at line 395 of file grst_gacl.c.
References GRSTgaclEntry::allowed, GRSTgaclEntry::denied, GRSTgaclEntry::firstcred, malloc(), GRSTgaclEntry::next, and NULL.
Referenced by GRSTgaclEntryParse(), and GRSTxacmlEntryParse().
static GRSTgaclEntry* GRSTgaclEntryParse | ( | xmlNodePtr | cur | ) | [static] |
Definition at line 716 of file grst_gacl.c.
References entry, for(), GRSTgaclCredFree(), GRSTgaclCredParse(), GRSTgaclEntryAddCred(), GRSTgaclEntryAllowPerm(), GRSTgaclEntryDenyPerm(), GRSTgaclEntryFree(), GRSTgaclEntryNew(), i, if(), and NULL.
Referenced by GACLparseEntry(), and GRSTgaclAclParse().
int GRSTgaclEntryPrint | ( | GRSTgaclEntry * | entry, | |
FILE * | fp | |||
) |
Definition at line 475 of file grst_gacl.c.
References entry, GRST_PERM_ADMIN, GRST_PERM_READ, GRSTgaclCredPrint(), GRSTgaclPermPrint(), i, GRSTgaclCred::next, and NULL.
Referenced by GRSTgaclAclPrint().
int GRSTgaclEntryUnallowPerm | ( | GRSTgaclEntry * | entry, | |
GRSTgaclPerm | perm | |||
) |
int GRSTgaclEntryUndenyPerm | ( | GRSTgaclEntry * | entry, | |
GRSTgaclPerm | perm | |||
) |
char* GRSTgaclFileFindAclname | ( | char * | pathandfile | ) |
Definition at line 873 of file grst_gacl.c.
References free(), GRST_ACL_FILE, len, malloc(), NULL, p, rindex, S_ISDIR, sprintf(), stat, strcat(), and strcpy().
Referenced by GRSTgaclAclLoadforFile().
int GRSTgaclFileIsAcl | ( | char * | pathandfile | ) |
int GRSTgaclInit | ( | void | ) |
Definition at line 106 of file grst_gacl.c.
GRSTgaclPerm GRSTgaclPermFromChar | ( | char * | s | ) |
int GRSTgaclPermPrint | ( | GRSTgaclPerm | perm, | |
FILE * | fp | |||
) |
Definition at line 515 of file grst_gacl.c.
References fprintf(), GRST_PERM_READ, i, and NULL.
Referenced by GRSTgaclEntryPrint().
char* GRSTgaclPermToChar | ( | GRSTgaclPerm | perm | ) |
int GRSTgaclUserAddCred | ( | GRSTgaclUser * | user, | |
GRSTgaclCred * | cred | |||
) |
Definition at line 984 of file grst_gacl.c.
References GRSTgaclUser::firstcred, GRSTgaclCred::next, and NULL.
Referenced by recurse4dnlists().
GRSTgaclCred* GRSTgaclUserFindCredtype | ( | GRSTgaclUser * | user, | |
char * | type | |||
) |
Definition at line 1075 of file grst_gacl.c.
References GRSTgaclCred::auri, GRSTgaclUser::firstcred, GRSTgaclCred::next, and NULL.
int GRSTgaclUserFree | ( | GRSTgaclUser * | user | ) |
Definition at line 971 of file grst_gacl.c.
References GRSTgaclUser::dnlists, GRSTgaclUser::firstcred, free(), GRSTgaclCredsFree(), and NULL.
int GRSTgaclUserHasAURI | ( | GRSTgaclUser * | user, | |
char * | auri | |||
) |
Definition at line 1309 of file grst_gacl.c.
References GRSTgaclCred::auri, GRSTgaclUser::firstcred, GRSTgaclCred::next, and NULL.
Referenced by GRSTgaclDNlistHasUser().
int GRSTgaclUserHasCred | ( | GRSTgaclUser * | user, | |
GRSTgaclCred * | cred | |||
) |
Definition at line 1007 of file grst_gacl.c.
References GRSTgaclCred::auri, GRSTgaclUser::firstcred, GRSTgaclCred::next, GRSTgaclCred::nist_loa, and NULL.
Referenced by GRSTgaclAclTestexclUser(), and GRSTgaclAclTestUser().
int GRSTgaclUserLoadDNlists | ( | GRSTgaclUser * | user, | |
char * | dnlists | |||
) |
Definition at line 1212 of file grst_gacl.c.
References GRSTgaclCred::auri, GRSTgaclUser::firstcred, free(), getenv(), GRST_DN_LISTS, GRSTgaclCred::next, NULL, and recurse4dnlists().
Referenced by GRSTgaclUserSetDNlists().
GRSTgaclUser* GRSTgaclUserNew | ( | GRSTgaclCred * | cred | ) |
Definition at line 954 of file grst_gacl.c.
References GRSTgaclUser::dnlists, GRSTgaclUser::firstcred, malloc(), and NULL.
int GRSTgaclUserSetDNlists | ( | GRSTgaclUser * | user, | |
char * | dnlists | |||
) |
Definition at line 1105 of file grst_gacl.c.
References GRSTgaclUser::dnlists, free(), GRSTgaclUserLoadDNlists(), and NULL.
GRSTgaclAcl * GRSTxacmlAclParse | ( | xmlDocPtr | , | |
xmlNodePtr | , | |||
GRSTgaclAcl * | ||||
) |
Definition at line 256 of file grst_xacml.c.
References acl(), debugfile, entry, fclose(), fopen, fprintf(), GRSTgaclAclAddEntry(), GRSTgaclAclFree(), GRSTgaclAclNew(), GRSTxacmlEntryParse(), and NULL.
Referenced by GRSTgaclAclLoadFile(), and GRSTxacmlAclLoadFile().
static void recurse4dnlists | ( | GRSTgaclUser * | user, | |
char * | dir, | |||
int | recurse_level, | |||
GRSTgaclCred * | dn_cred | |||
) | [static] |
Definition at line 1115 of file grst_gacl.c.
References GRSTgaclCred::auri, close, GRSTgaclCred::delegation, free(), fstat, GRST_LOG_DEBUG, GRST_RECURS_LIMIT, GRSTerrorLog, GRSTgaclCredCreate(), GRSTgaclCredSetDelegation, GRSTgaclCredSetNistLoa, GRSTgaclCredSetNotAfter, GRSTgaclCredSetNotBefore, GRSTgaclUserAddCred(), GRSThttpUrlDecode(), i, if(), GRSTgaclCred::nist_loa, GRSTgaclCred::notafter, GRSTgaclCred::notbefore, NULL, open, opendir, readdir, s, S_ISDIR, S_ISREG, size_t, sprintf(), and stat.
Referenced by GRSTgaclUserLoadDNlists().
char* grst_perm_syms[] |
Initial value:
{ "none", "read", "exec", "list", "write", "admin", NULL }
Definition at line 90 of file grst_gacl.c.
Referenced by GRSTxacmlEntryParse(), and GRSTxacmlPermPrint().
Initial value:
{ GRST_PERM_NONE, GRST_PERM_READ, GRST_PERM_EXEC, GRST_PERM_LIST, GRST_PERM_WRITE, GRST_PERM_ADMIN, -1 }
Definition at line 98 of file grst_gacl.c.
Referenced by GRSTxacmlEntryParse(), and GRSTxacmlPermPrint().