[SCM] Samba Shared Repository - branch v3-4-test updated -
release-4-0-0alpha7-938-g11041fe
Jeremy Allison
jra at samba.org
Mon May 11 16:44:39 GMT 2009
The branch, v3-4-test has been updated
via 11041fe1c24575c25d3ac82e61d9fb2b651db3aa (commit)
from 7d1e25a885637b65c75b4ddd78949c4a2091bb6d (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test
- Log -----------------------------------------------------------------
commit 11041fe1c24575c25d3ac82e61d9fb2b651db3aa
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 fdccd9e..b50999d 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