summaryrefslogtreecommitdiff
path: root/source3/script
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-03-09 13:14:18 -0800
committerJeremy Allison <jra@samba.org>2010-03-09 13:14:18 -0800
commit9adbba6fb9404bb7f6d88cf58e7d5ce06fe73b0e (patch)
treebaee0144d5c4b526dbfed94bf975e41aafff9574 /source3/script
parent25452a2268ac7013da28125f3df22085139af12d (diff)
downloadsamba-9adbba6fb9404bb7f6d88cf58e7d5ce06fe73b0e.tar.gz
samba-9adbba6fb9404bb7f6d88cf58e7d5ce06fe73b0e.tar.bz2
samba-9adbba6fb9404bb7f6d88cf58e7d5ce06fe73b0e.zip
Allow "make test" to complete as root. Obviously only safe on tightly
controlled developer machines. Jeremy.
Diffstat (limited to 'source3/script')
-rwxr-xr-xsource3/script/tests/selftest.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/source3/script/tests/selftest.sh b/source3/script/tests/selftest.sh
index 09f7dc8c97..9994e47035 100755
--- a/source3/script/tests/selftest.sh
+++ b/source3/script/tests/selftest.sh
@@ -302,6 +302,7 @@ EOF
## create a test account
##
+if [ "$USERID" != 0 ]; then
cat >$NSS_WRAPPER_PASSWD<<EOF
root:x:65533:65532:root gecos:$PREFIX_ABS:/bin/false
nobody:x:65534:65533:nobody gecos:$PREFIX_ABS:/bin/false
@@ -314,6 +315,21 @@ nogroup:x:65534:nobody
root:x:65532:
$USERNAME-group:x:$GROUPID:
EOF
+else
+##
+## Running as root...
+##
+cat >$NSS_WRAPPER_PASSWD<<EOF
+$USERNAME:x:$USERID:$GROUPID:$USERNAME gecos:$PREFIX_ABS:/bin/false
+nobody:x:65534:65533:nobody gecos:$PREFIX_ABS:/bin/false
+EOF
+
+cat >$NSS_WRAPPER_GROUP<<EOF
+$USERNAME-group:x:$GROUPID:
+nobody:x:65533:
+nogroup:x:65534:nobody
+EOF
+fi
MAKE_TEST_BINARY="bin/smbpasswd"
export MAKE_TEST_BINARY