mirror of
https://github.com/samba-team/samba.git
synced 2025-01-13 13:18:06 +03:00
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 commit is contained in:
parent
aeae20a8d9
commit
1804a8a01e
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user