summaryrefslogtreecommitdiff
path: root/source3/utils/smbcacls.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2000-12-04 06:43:36 +0000
committerTim Potter <tpot@samba.org>2000-12-04 06:43:36 +0000
commit92abcbc04005181262a866dc1e1322ee0f0c813a (patch)
tree2e9313872c46e371c30cc338cb8c930516801e5b /source3/utils/smbcacls.c
parent3d43b2db28db679ac4d779da853bd3f04873c9e8 (diff)
downloadsamba-92abcbc04005181262a866dc1e1322ee0f0c813a.tar.gz
samba-92abcbc04005181262a866dc1e1322ee0f0c813a.tar.bz2
samba-92abcbc04005181262a866dc1e1322ee0f0c813a.zip
Removed lsa lookup warnings (I'll remember).
Print an error if -M refers to a non-existent ACL. (This used to be commit ee6f5a9672795c884cabe80e98e5b0fb3c793539)
Diffstat (limited to 'source3/utils/smbcacls.c')
-rw-r--r--source3/utils/smbcacls.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index 52a5ea769c..5f750c358e 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/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\
");
}