summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-05-14 14:39:10 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:17:02 -0500
commit990c406a89f9ec52d2570928d07f6913a4c31808 (patch)
tree21ebc2ca4880ff6a542b758fb631e151a2fe100a
parentb16bdf985d59dd23b18fcd36a6f39e486bafb80d (diff)
downloadsamba-990c406a89f9ec52d2570928d07f6913a4c31808.tar.gz
samba-990c406a89f9ec52d2570928d07f6913a4c31808.tar.bz2
samba-990c406a89f9ec52d2570928d07f6913a4c31808.zip
r15600: Correctly fill in the gid for local users.
Volker (This used to be commit 6071dd5db0dbb79a80b248ab93942911bf08fd2b)
-rw-r--r--source3/auth/auth_util.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 06fbe1b7e6..64b707bc1a 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -1096,6 +1096,12 @@ NTSTATUS create_token_from_username(TALLOC_CTX *mem_ctx, const char *username,
sid_copy(&primary_group_sid, pdb_get_group_sid(sam_acct));
+ if (!sid_to_gid(&primary_group_sid, gid)) {
+ DEBUG(1, ("sid_to_gid(%s) failed\n",
+ sid_string_static(&primary_group_sid)));
+ goto done;
+ }
+
result = pdb_enum_group_memberships(tmp_ctx, sam_acct,
&group_sids, &gids,
&num_group_sids);