summaryrefslogtreecommitdiff
path: root/server/acl_files.c
diff options
context:
space:
mode:
authorGravatar Karl Ramm <kcr@mit.edu>2008-01-21 20:05:02 +0000
committerGravatar Karl Ramm <kcr@mit.edu>2008-01-21 20:05:02 +0000
commitfebcced71f5117685828fc5030bae26ecfa05b8c (patch)
tree663652b145ab2cf789abceb35def1bb866c5cb16 /server/acl_files.c
parent0204199cc95ea215abcc93897f0edbe5cc62d5f7 (diff)
actually prune out the rest of the partial notdef'd acl writing code
Diffstat (limited to 'server/acl_files.c')
-rw-r--r--server/acl_files.c68
1 files changed, 0 insertions, 68 deletions
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 */