Changes from APPLIANCE_HEAD:
[ira/wip.git] / source3 / smbd / sec_ctx.c
index eaaae9ace7776b5880bdfbf82388f40cd4ef2778..f3cc9e04e0bc294ac0c3f959d4fd2fb940c1e5fb 100644 (file)
@@ -305,11 +305,23 @@ BOOL push_sec_ctx(void)
 void set_sec_ctx(uid_t uid, gid_t gid, int ngroups, gid_t *groups, NT_USER_TOKEN *token)
 {
        struct sec_ctx *ctx_p = &sec_ctx_stack[sec_ctx_stack_ndx];
-
+       
        /* Set the security context */
 
        DEBUG(3, ("setting sec ctx (%d, %d) - sec_ctx_stack_ndx = %d\n", uid, gid, sec_ctx_stack_ndx));
 
+       if (ngroups) {
+               int i;
+
+               DEBUG(3, ("%d user groups: \n", ngroups));
+               for (i = 0; i < ngroups; i++) {
+                       DEBUGADD(3, ("%d ", groups[i]));
+               }
+
+               DEBUG(3, ("\n"));
+       }
+       
+
        gain_root();
 
 #ifdef HAVE_SETGROUPS