summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-11-14 15:15:52 +0100
committerVolker Lendecke <vlendec@samba.org>2010-11-14 14:07:29 +0000
commitc52e6db8a2d5ef56cac59315f16f70eb9624b5d7 (patch)
tree1329b6df394059b0af8dbb20623d54e62ed79ed1 /source3/utils
parenta2769b069b11c92f4b4822f4eb3e66b8aadd18ca (diff)
downloadsamba-c52e6db8a2d5ef56cac59315f16f70eb9624b5d7.tar.gz
samba-c52e6db8a2d5ef56cac59315f16f70eb9624b5d7.tar.bz2
samba-c52e6db8a2d5ef56cac59315f16f70eb9624b5d7.zip
s3: string_to_sid does thorough syntax checking
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Sun Nov 14 14:07:29 UTC 2010 on sn-devel-104
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/smbcacls.c4
-rw-r--r--source3/utils/smbcquotas.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index bb438bab78..9f740f7f34 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -200,8 +200,8 @@ static bool StringToSid(struct cli_state *cli, struct dom_sid *sid, const char *
{
enum lsa_SidType type;
- if (strncmp(str, "S-", 2) == 0) {
- return string_to_sid(sid, str);
+ if (string_to_sid(sid, str)) {
+ return true;
}
return NT_STATUS_IS_OK(cli_lsa_lookup_name(cli, str, &type, sid));
diff --git a/source3/utils/smbcquotas.c b/source3/utils/smbcquotas.c
index 6353272d82..63ea269cb5 100644
--- a/source3/utils/smbcquotas.c
+++ b/source3/utils/smbcquotas.c
@@ -117,8 +117,8 @@ static bool StringToSid(struct dom_sid *sid, const char *str)
struct dom_sid *sids = NULL;
bool result = True;
- if (strncmp(str, "S-", 2) == 0) {
- return string_to_sid(sid, str);
+ if (string_to_sid(sid, str)) {
+ return true;
}
if (!cli_open_policy_hnd() ||