From febcced71f5117685828fc5030bae26ecfa05b8c Mon Sep 17 00:00:00 2001 From: Karl Ramm Date: Mon, 21 Jan 2008 20:05:02 +0000 Subject: actually prune out the rest of the partial notdef'd acl writing code --- server/acl_files.c | 68 ------------------------------------------------------ 1 file changed, 68 deletions(-) (limited to 'server/acl_files.c') diff --git a/server/acl_files.c b/server/acl_files.c index fbf0d71..df0885b 100644 --- a/server/acl_files.c +++ b/server/acl_files.c @@ -351,71 +351,3 @@ acl_check(char *acl, return(0); } - -#ifdef notdef -/* Adds principal to acl */ -/* Wildcards are interpreted literally */ -int -acl_add(acl, principal) - char *acl; - char *principal; -{ - int idx; - int i; - FILE *new; - char canon[MAX_PRINCIPAL_SIZE]; - - acl_canonicalize_principal(principal, canon); - - if ((new = acl_lock_file(acl)) == NULL) return(-1); - if ((acl_exact_match(acl, canon)) - || (idx = acl_load(acl)) < 0) { - acl_abort(acl, new); - return(-1); - } - /* It isn't there yet, copy the file and put it in */ - for (i = 0; i < acl_cache[idx].acl->size; i++) { - if (acl_cache[idx].acl->tbl[i] != NULL) { - if (fputs(acl_cache[idx].acl->tbl[i], new) == NULL - || putc('\n', new) != '\n') { - acl_abort(acl, new); - return(-1); - } - } - } - fputs(canon, new); - putc('\n', new); - return(acl_commit(acl, new)); -} - -/* Removes principal from acl */ -/* Wildcards are interpreted literally */ -int -acl_delete(acl, principal) - char *acl; - char *principal; -{ - int idx; - int i; - FILE *new; - char canon[MAX_PRINCIPAL_SIZE]; - - acl_canonicalize_principal(principal, canon); - - if ((new = acl_lock_file(acl)) == NULL) return(-1); - if ((!acl_exact_match(acl, canon)) - || (idx = acl_load(acl)) < 0) { - acl_abort(acl, new); - return(-1); - } - /* It isn't there yet, copy the file and put it in */ - for (i = 0; i < acl_cache[idx].acl->size; i++) { - if (acl_cache[idx].acl->tbl[i] != NULL - && strcmp(acl_cache[idx].acl->tbl[i], canon)) { - fputs(acl_cache[idx].acl->tbl[i], new); - putc('\n', new); - } - } - return(acl_commit(acl, new)); -} -#endif /* notdef */ -- cgit v1.2.3