From 3e9bcd111df39a5801193bd79d22f7fbacaade45 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 19 Sep 2001 03:30:20 +0000 Subject: don't try to initgroups in non root mode (This used to be commit 1a04ea247680fa7ad1ae7dc3f9953f753d8cf955) --- source3/smbd/sec_ctx.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3') 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 */ -- cgit