summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--source/smbd/sec_ctx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/smbd/sec_ctx.c b/source/smbd/sec_ctx.c
index 72e23306ece..830e759d093 100644
--- a/source/smbd/sec_ctx.c
+++ b/source/smbd/sec_ctx.c
@@ -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 */