[SCM] Samba Shared Repository - branch master updated -
release-4-0-0alpha7-1544-g8a785a6
Jeremy Allison
jra at samba.org
Mon May 11 16:43:13 GMT 2009
The branch, master has been updated
via 8a785a60475bc4bc537fecd57e72fa78eb9b8df2 (commit)
from a82bb4bd516e6a8e50c0272b79df8e506ea0cc91 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 8a785a60475bc4bc537fecd57e72fa78eb9b8df2
Author: Jeremy Allison <jra at samba.org>
Date: Mon May 11 09:42:08 2009 -0700
Add checks for non_root mode to help buildfarm spoolss tests.
Reviewed by Guenther.
Jeremy.
-----------------------------------------------------------------------
Summary of changes:
source3/lib/smbrun.c | 32 ++++++++++++++++++--------------
1 files changed, 18 insertions(+), 14 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/lib/smbrun.c b/source3/lib/smbrun.c
index 14e6a76..75713d2 100644
--- a/source3/lib/smbrun.c
+++ b/source3/lib/smbrun.c
@@ -165,14 +165,16 @@ static int smbrun_internal(const char *cmd, int *outfd, bool sanitize)
become_user_permanently(uid, gid);
- if (getuid() != uid || geteuid() != uid ||
- getgid() != gid || getegid() != gid) {
- /* we failed to lose our privileges - do not execute
- the command */
- exit(81); /* we can't print stuff at this stage,
- instead use exit codes for debugging */
+ if (!non_root_mode()) {
+ if (getuid() != uid || geteuid() != uid ||
+ getgid() != gid || getegid() != gid) {
+ /* we failed to lose our privileges - do not execute
+ the command */
+ exit(81); /* we can't print stuff at this stage,
+ instead use exit codes for debugging */
+ }
}
-
+
#ifndef __INSURE__
/* close all other file descriptors, leaving only 0, 1 and 2. 0 and
2 point to /dev/null from the startup code */
@@ -322,14 +324,16 @@ int smbrunsecret(const char *cmd, const char *secret)
become_user_permanently(uid, gid);
- if (getuid() != uid || geteuid() != uid ||
- getgid() != gid || getegid() != gid) {
- /* we failed to lose our privileges - do not execute
- the command */
- exit(81); /* we can't print stuff at this stage,
- instead use exit codes for debugging */
+ if (!non_root_mode()) {
+ if (getuid() != uid || geteuid() != uid ||
+ getgid() != gid || getegid() != gid) {
+ /* we failed to lose our privileges - do not execute
+ the command */
+ exit(81); /* we can't print stuff at this stage,
+ instead use exit codes for debugging */
+ }
}
-
+
#ifndef __INSURE__
/* close all other file descriptors, leaving only 0, 1 and 2. 0 and
2 point to /dev/null from the startup code */
--
Samba Shared Repository
More information about the samba-cvs
mailing list