summaryrefslogtreecommitdiff
path: root/source3/lib/system_smbd.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/system_smbd.c')
-rw-r--r--source3/lib/system_smbd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/lib/system_smbd.c b/source3/lib/system_smbd.c
index 580ef8a463..5eda37d903 100644
--- a/source3/lib/system_smbd.c
+++ b/source3/lib/system_smbd.c
@@ -41,6 +41,11 @@ static int getgrouplist_internals(const char *user, gid_t gid, gid_t *groups, in
gid_t *gids_saved;
int ret, ngrp_saved;
+ if (non_root_mode()) {
+ *grpcnt = 0;
+ return 0;
+ }
+
/* work out how many groups we need to save */
ngrp_saved = getgroups(0, NULL);
if (ngrp_saved == -1) {