summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-09-19 03:30:20 +0000
committerAndrew Tridgell <tridge@samba.org>2001-09-19 03:30:20 +0000
commit3e9bcd111df39a5801193bd79d22f7fbacaade45 (patch)
treec1e8695457ae7cb993a676e01fcb3f1bd3d7f9b5 /source3/smbd
parent01529e340c607f5ef6acf164283d7f3ee5b05569 (diff)
downloadsamba-3e9bcd111df39a5801193bd79d22f7fbacaade45.tar.gz
samba-3e9bcd111df39a5801193bd79d22f7fbacaade45.tar.bz2
samba-3e9bcd111df39a5801193bd79d22f7fbacaade45.zip
don't try to initgroups in non root mode
(This used to be commit 1a04ea247680fa7ad1ae7dc3f9953f753d8cf955)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/sec_ctx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/smbd/sec_ctx.c b/source3/smbd/sec_ctx.c
index 72e23306ec..830e759d09 100644
--- a/source3/smbd/sec_ctx.c
+++ b/source3/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 */