summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2006-03-13 01:32:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:15:22 -0500
commite0793b1b28b64b0863a3b18d711585a65042cf2f (patch)
tree4b782fd1deba71ab7c1e81e6b5d2eeb21d8f2b38 /source3/utils
parent478cd9dd53550aa33a9046d35bc0784ad75a4a15 (diff)
downloadsamba-e0793b1b28b64b0863a3b18d711585a65042cf2f.tar.gz
samba-e0793b1b28b64b0863a3b18d711585a65042cf2f.tar.bz2
samba-e0793b1b28b64b0863a3b18d711585a65042cf2f.zip
r14278: Remainder of fix for Coverity #79,80,81: only allow GROUP or OWNER to be
specified once in an ACL, so it can be allocated a second time, overwriting the first (This used to be commit 1804a8a01ebf3353574a2c5b26a1746b34715737)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/smbcacls.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index 8c08e7f2f1..1c34cd32a6 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -392,6 +392,10 @@ static SEC_DESC *sec_desc_parse(char *str)
}
if (strncmp(tok,"OWNER:", 6) == 0) {
+ if (owner_sid) {
+ printf("Only specify owner once\n");
+ goto done;
+ }
owner_sid = SMB_CALLOC_ARRAY(DOM_SID, 1);
if (!owner_sid ||
!StringToSid(owner_sid, tok+6)) {
@@ -402,6 +406,10 @@ static SEC_DESC *sec_desc_parse(char *str)
}
if (strncmp(tok,"GROUP:", 6) == 0) {
+ if (grp_sid) {
+ printf("Only specify group once\n");
+ goto done;
+ }
grp_sid = SMB_CALLOC_ARRAY(DOM_SID, 1);
if (!grp_sid ||
!StringToSid(grp_sid, tok+6)) {