don't try to initgroups in non root mode
authorAndrew Tridgell <tridge@samba.org>
Wed, 19 Sep 2001 03:30:20 +0000 (03:30 +0000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 19 Sep 2001 03:30:20 +0000 (03:30 +0000)
(This used to be commit 1a04ea247680fa7ad1ae7dc3f9953f753d8cf955)

source3/smbd/sec_ctx.c

index 72e23306ecec9f66a374951e66de99ed18624261..830e759d0939bf1d455586251b87f1850c21b47c 100644 (file)
@@ -222,6 +222,10 @@ BOOL initialise_groups(char *user, uid_t uid, gid_t gid)
        struct sec_ctx *prev_ctx_p;
        BOOL result = True;
 
+       if (non_root_mode()) {
+               return True;
+       }
+
        become_root();
 
        /* Call initgroups() to get user groups */