summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-06-14 09:30:54 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:40 -0500
commitc1e88ab8b27fc58295d489b99b3002e500b81157 (patch)
tree79b53189ed90cd5d22fd33c271e392d7db0ab116 /source4
parent02781a30bf9ef476ead20890611c94774d0d713e (diff)
downloadsamba-c1e88ab8b27fc58295d489b99b3002e500b81157.tar.gz
samba-c1e88ab8b27fc58295d489b99b3002e500b81157.tar.bz2
samba-c1e88ab8b27fc58295d489b99b3002e500b81157.zip
r1138: allow for a user in no groups
(This used to be commit f9c1e12594e58b7e663ca099929eab8867b82a0c)
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/auth_sam.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/auth/auth_sam.c b/source4/auth/auth_sam.c
index e7f428c922..481c8d3790 100644
--- a/source4/auth/auth_sam.c
+++ b/source4/auth/auth_sam.c
@@ -335,7 +335,8 @@ static NTSTATUS check_sam_security(const struct auth_context *auth_context,
"(&(member=%s)(sAMAccountType=*))",
dn);
- if (!(groupSIDs = talloc_realloc_p((*server_info)->mem_ctx, groupSIDs,
+ if (group_ret > 0 &&
+ !(groupSIDs = talloc_realloc_p((*server_info)->mem_ctx, groupSIDs,
struct dom_sid *, group_ret))) {
talloc_destroy((*server_info)->mem_ctx);
samdb_close(sam_ctx);