diff options
author | Tim Potter <tpot@samba.org> | 2000-12-04 06:43:36 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2000-12-04 06:43:36 +0000 |
commit | ee6f5a9672795c884cabe80e98e5b0fb3c793539 (patch) | |
tree | 091b8f4a19f9ab93db3a10bc1b0be80765fc58e2 /source | |
parent | 117956ecb1878f09708a5dc76ec81ad3cfa8d809 (diff) | |
download | samba-ee6f5a9672795c884cabe80e98e5b0fb3c793539.tar.gz samba-ee6f5a9672795c884cabe80e98e5b0fb3c793539.tar.xz samba-ee6f5a9672795c884cabe80e98e5b0fb3c793539.zip |
Removed lsa lookup warnings (I'll remember).
Print an error if -M refers to a non-existent ACL.
Diffstat (limited to 'source')
-rw-r--r-- | source/utils/smbcacls.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/source/utils/smbcacls.c b/source/utils/smbcacls.c index 52a5ea769c9..5f750c358ec 100644 --- a/source/utils/smbcacls.c +++ b/source/utils/smbcacls.c @@ -62,7 +62,9 @@ static void SidToString(fstring str, DOM_SID *sid) if (numeric) { sid_to_string(str, sid); } else { - printf("need to add LSA lookups\n"); + + /* Need to add LSA lookups */ + sid_to_string(str, sid); } } @@ -73,8 +75,10 @@ static BOOL StringToSid(DOM_SID *sid, fstring str) if (strncmp(str,"S-", 2) == 0) { return string_to_sid(sid, str); } else { - printf("need to add LSA lookups\n"); - return False; + + /* Need to add LSA lookups */ + + return string_to_sid(sid, str); } } @@ -347,13 +351,24 @@ static void cacl_set(struct cli_state *cli, char *filename, case ACL_MODIFY: for (i=0;sd->dacl && i<sd->dacl->num_aces;i++) { + BOOL found = False; + for (j=0;old->dacl && j<old->dacl->num_aces;j++) { if (sid_equal(&sd->dacl->ace[i].sid, &old->dacl->ace[j].sid)) { old->dacl->ace[j] = sd->dacl->ace[i]; + found = True; } } + + if (!found) { + fstring str; + + SidToString(str, &sd->dacl->ace[i].sid); + printf("ACL for SID %s not found\n", str); + } } + break; case ACL_ADD: @@ -485,7 +500,7 @@ static void usage(void) \t-n don't resolve sids or masks to names\n\ \t-h print help\n\ \n\ -An acl is of the form SID:type/flags/mask\n\ +An acl is of the form ACL:<SID>:type/flags/mask\n\ You can string acls together with spaces, commas or newlines\n\ "); } |