From c1e88ab8b27fc58295d489b99b3002e500b81157 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 14 Jun 2004 09:30:54 +0000 Subject: r1138: allow for a user in no groups (This used to be commit f9c1e12594e58b7e663ca099929eab8867b82a0c) --- source4/auth/auth_sam.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- cgit