smbd: Fix the memory hierarchy in the unix token
authorVolker Lendecke <vl@samba.org>
Wed, 4 Oct 2017 13:04:01 +0000 (15:04 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 27 Oct 2017 18:33:25 +0000 (20:33 +0200)
"groups" should hang off the token itself, not its parent

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/auth/auth_util.c

index 1021f2a6fef664900d952f367477ed7b15206328..8e7fa914748a8fc0bedc07ca59c6001e57b4e914 100644 (file)
@@ -639,7 +639,8 @@ NTSTATUS create_local_token(TALLOC_CTX *mem_ctx,
                                   sid_string_dbg(&t->sids[i])));
                        continue;
                }
                                   sid_string_dbg(&t->sids[i])));
                        continue;
                }
-               if (!add_gid_to_array_unique(session_info, ids[i].id,
+               if (!add_gid_to_array_unique(session_info->unix_token,
+                                            ids[i].id,
                                             &session_info->unix_token->groups,
                                             &session_info->unix_token->ngroups)) {
                        return NT_STATUS_NO_MEMORY;
                                             &session_info->unix_token->groups,
                                             &session_info->unix_token->ngroups)) {
                        return NT_STATUS_NO_MEMORY;