1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +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:
Jim McDonough 2006-03-13 01:32:30 +00:00 committed by Gerald (Jerry) Carter
parent aeae20a8d9
commit 1804a8a01e

View File

@ -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)) {