summaryrefslogtreecommitdiff
path: root/server/acl_files.c
diff options
context:
space:
mode:
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 */