summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/afs_settoken.c2
-rw-r--r--source3/lib/debug.c2
-rw-r--r--source3/lib/fault.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/source3/lib/afs_settoken.c b/source3/lib/afs_settoken.c
index 6421c0a55b..80eed13e52 100644
--- a/source3/lib/afs_settoken.c
+++ b/source3/lib/afs_settoken.c
@@ -236,7 +236,7 @@ bool afs_settoken_str(const char *token_string)
if (!afs_decode_token(token_string, &cell, &ticket, &ct))
return False;
- if (geteuid() != 0)
+ if (geteuid() != sec_initial_uid())
ct.ViceId = getuid();
result = afs_settoken(cell, &ct, ticket);
diff --git a/source3/lib/debug.c b/source3/lib/debug.c
index 80b8310ab2..83211dd5e6 100644
--- a/source3/lib/debug.c
+++ b/source3/lib/debug.c
@@ -738,7 +738,7 @@ void check_log_size( void )
* loop check do a new check as root.
*/
- if( geteuid() != 0 )
+ if( geteuid() != sec_initial_uid() )
return;
if(log_overflow || !need_to_check_log_size() )
diff --git a/source3/lib/fault.c b/source3/lib/fault.c
index bf61bb26c4..50fa2b8370 100644
--- a/source3/lib/fault.c
+++ b/source3/lib/fault.c
@@ -304,7 +304,7 @@ void dump_core_setup(const char *progname)
/* If we're running as non root we might not be able to dump the core
* file to the corepath. There must not be an unbecome_root() before
* we call abort(). */
- if (geteuid() != 0) {
+ if (geteuid() != sec_initial_uid()) {
become_root();
}