diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-11-30 13:32:04 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2012-12-02 18:32:04 +0100 |
commit | 139232656a5de5f1c4694bbea8554a01c677081a (patch) | |
tree | 51311c567b62577f8fbf5fda35c54885174fc52c /source3/smbd | |
parent | 0a3396b53683f5efe439bfb8395e275f53108255 (diff) | |
download | samba-139232656a5de5f1c4694bbea8554a01c677081a.tar.gz samba-139232656a5de5f1c4694bbea8554a01c677081a.tar.bz2 samba-139232656a5de5f1c4694bbea8554a01c677081a.zip |
s3:smbd/open: try the primary sid (user) as group_sid if the token has just one sid
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/open.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 955660c148..03e8feb302 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -3538,7 +3538,11 @@ static NTSTATUS inherit_new_acl(files_struct *fsp) owner_sid = &token->sids[PRIMARY_USER_SID_INDEX]; } if (group_sid == NULL) { - group_sid = &token->sids[PRIMARY_GROUP_SID_INDEX]; + if (token->num_sids == PRIMARY_GROUP_SID_INDEX) { + group_sid = &token->sids[PRIMARY_USER_SID_INDEX]; + } else { + group_sid = &token->sids[PRIMARY_GROUP_SID_INDEX]; + } } status = se_create_child_secdesc(frame, |