]> asedeno.scripts.mit.edu Git - 1ts-debian.git/commitdiff
r4286@bucket (orig r276): kcr | 2008-01-21 15:05:02 -0500
authorkcr <kcr@cbed1d16-5ef5-0310-b6a1-d4a37b08ba1f>
Thu, 18 Dec 2008 04:49:55 +0000 (04:49 +0000)
committerkcr <kcr@cbed1d16-5ef5-0310-b6a1-d4a37b08ba1f>
Thu, 18 Dec 2008 04:49:55 +0000 (04:49 +0000)
 actually prune out the rest of the partial notdef'd acl writing code

git-svn-id: svn://svn.1ts.org/debian/trunk@348 cbed1d16-5ef5-0310-b6a1-d4a37b08ba1f

zephyr/server/acl_files.c

index fbf0d71ff4e42222942c564fbc5641c033734bd9..df0885b642dcef32da179478f2d7c1420b7eb66b 100644 (file)
@@ -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 */