r17393: Remove Volker's ASSERT that num_groupsids > 0.
authorJeremy Allison <jra@samba.org>
Fri, 4 Aug 2006 01:09:57 +0000 (01:09 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:38:31 +0000 (11:38 -0500)
For guest connection they may well be zero.
This should fix up the buildfarm (fingers
crossed).
Jeremy.

source/auth/auth_util.c

index 89792bca94c01f94f93b474029cf3ce82d034c96..b7d3fdfcbdaf7440bba1da2e1cf1892af9849f68 100644 (file)
@@ -829,9 +829,11 @@ static struct nt_user_token *create_local_nt_token(TALLOC_CTX *mem_ctx,
        add_sid_to_array(result, user_sid,
                         &result->user_sids, &result->num_sids);
 
-       SMB_ASSERT(num_groupsids > 0);
-       add_sid_to_array(result, &groupsids[0],
-                        &result->user_sids, &result->num_sids);
+       /* For guest, num_groupsids may be zero. */
+       if (num_groupsids) {
+               add_sid_to_array(result, &groupsids[0],
+                                &result->user_sids, &result->num_sids);
+       }
                         
        /* Add in BUILTIN sids */