From 50781c2233d6aaac2f877e8b6d5615bf2830dd8e Mon Sep 17 00:00:00 2001 From: kcr Date: Mon, 21 Jan 2008 20:05:02 +0000 Subject: [PATCH] actually prune out the rest of the partial notdef'd acl writing code git-svn-id: svn://svn.1ts.org/debian/branches/zephyr-reloaded@276 cbed1d16-5ef5-0310-b6a1-d4a37b08ba1f --- zephyr/server/acl_files.c | 68 --------------------------------------- 1 file changed, 68 deletions(-) diff --git a/zephyr/server/acl_files.c b/zephyr/server/acl_files.c index fbf0d71..df0885b 100644 --- a/zephyr/server/acl_files.c +++ b/zephyr/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 */ -- 2.45.2