summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-07-05 07:49:21 +0000
committerAndrew Tridgell <tridge@samba.org>2001-07-05 07:49:21 +0000
commit11914f7b3963d1595cba73d999752c029bd8419c (patch)
treef8865afba77bae25f8a2ce563b618cb300cb7fd9
parentc1ba63f2bc30547b65868f9aa1a9dbb0786c9e25 (diff)
downloadsamba-11914f7b3963d1595cba73d999752c029bd8419c.tar.gz
samba-11914f7b3963d1595cba73d999752c029bd8419c.tar.xz
samba-11914f7b3963d1595cba73d999752c029bd8419c.zip
non_root_mode() fix for 2.2
-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 6f98e9df6b0..9ca63a0f957 100644
--- a/source/smbd/sec_ctx.c
+++ b/source/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);