summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2001-09-15 02:10:22 +0000
committerAndrew Bartlett <abartlet@samba.org>2001-09-15 02:10:22 +0000
commit9a846daf441c3d82e4fc750382fd12fcb8fb9a6d (patch)
treea214adcd12a6ee0ffbf55034557642f6caa3b153 /source3/lib
parent1c8c7c558b563e9a3bd0a11e9bc11947f99d700a (diff)
downloadsamba-9a846daf441c3d82e4fc750382fd12fcb8fb9a6d.tar.gz
samba-9a846daf441c3d82e4fc750382fd12fcb8fb9a6d.tar.bz2
samba-9a846daf441c3d82e4fc750382fd12fcb8fb9a6d.zip
Restore the profiling data shmem parinoia. This whole area needs to be
fixed - an mmaped file or the like would be a good idea. (This used to be commit bc1385fc5e55eeed626615fad92877296064a27e)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util_sec.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/lib/util_sec.c b/source3/lib/util_sec.c
index 985b07f421..231f0b178d 100644
--- a/source3/lib/util_sec.c
+++ b/source3/lib/util_sec.c
@@ -48,6 +48,7 @@ extern int DEBUGLEVEL;
/* are we running as non-root? This is used by the regresison test code,
and potentially also for sites that want non-root smbd */
static uid_t initial_uid;
+static gid_t initial_gid;
/****************************************************************************
remember what uid we got started as - this allows us to run correctly
@@ -56,6 +57,7 @@ as non-root while catching trapdoor systems
void sec_init(void)
{
initial_uid = geteuid();
+ initial_gid = getegid();
}
/****************************************************************************
@@ -67,6 +69,14 @@ uid_t sec_initial_uid(void)
}
/****************************************************************************
+some code (eg. winbindd, profiling shm) needs to know what gid we started as
+****************************************************************************/
+gid_t sec_initial_gid(void)
+{
+ return initial_gid;
+}
+
+/****************************************************************************
are we running in non-root mode?
****************************************************************************/
BOOL non_root_mode(void)