summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 6f98e9df6b..9ca63a0f95 100644
--- a/source3/smbd/sec_ctx.c
+++ b/source3/smbd/sec_ctx.c
@@ -109,6 +109,10 @@ static BOOL become_id(uid_t uid, gid_t gid)
static void gain_root(void)
{
+ if (non_root_mode()) {
+ return;
+ }
+
if (geteuid() != 0) {
set_effective_uid(0);