summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-09-13 10:26:32 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:18:33 -0500
commitf425072ed961f8cb832c8515ed71766142f07138 (patch)
tree19a04ecec5774e3f8f827a94451d8414fb533190 /source4
parentc706319c8f0fe0af828da5f75c2dc673cecadf36 (diff)
downloadsamba-f425072ed961f8cb832c8515ed71766142f07138.tar.gz
samba-f425072ed961f8cb832c8515ed71766142f07138.tar.bz2
samba-f425072ed961f8cb832c8515ed71766142f07138.zip
r18459: Set access to test LDAP server as system to anonymous, but also note
the correct authz-regexp for future use. Fail to test if slapd fails and TEST_LDAP=yes (This used to be commit 1daf4e7bd47df4f127447ab9b5d583bbe7b2a10a)
Diffstat (limited to 'source4')
-rwxr-xr-xsource4/script/tests/mktestsetup.sh8
-rwxr-xr-xsource4/script/tests/selftest.sh2
-rwxr-xr-xsource4/script/tests/test_functions.sh6
3 files changed, 11 insertions, 5 deletions
diff --git a/source4/script/tests/mktestsetup.sh b/source4/script/tests/mktestsetup.sh
index f107f54ace..9453a2f0cd 100755
--- a/source4/script/tests/mktestsetup.sh
+++ b/source4/script/tests/mktestsetup.sh
@@ -101,6 +101,8 @@ cat >$CONFFILE<<EOF
server max protocol = SMB2
notify:inotify = false
+system:anonymous = true
+
[tmp]
path = $TMPDIR
read only = no
@@ -292,13 +294,15 @@ argsfile $LDAPDIR/slapd.args
sasl-realm $DNSNAME
access to * by * write
+allow update_anon
+
authz-regexp
uid=([^,]*),cn=$DNSNAME,cn=digest-md5,cn=auth
- ldap:///$BASEDN??sub?(samAccountName=$1)
+ ldap:///$BASEDN??sub?(samAccountName=\$1)
authz-regexp
uid=([^,]*),cn=([^,]*),cn=digest-md5,cn=auth
- ldap:///$BASEDN??sub?(samAccountName=$1)
+ ldap:///$BASEDN??sub?(samAccountName=\$1)
include $LDAPDIR/modules.conf
diff --git a/source4/script/tests/selftest.sh b/source4/script/tests/selftest.sh
index 8c4c41e197..a6b1cb7fc3 100755
--- a/source4/script/tests/selftest.sh
+++ b/source4/script/tests/selftest.sh
@@ -63,7 +63,7 @@ incdir=`dirname $ARG0`
#Start slapd before smbd
if [ x"$TEST_LDAP" = x"yes" ]; then
- slapd_start
+ slapd_start || exit 1;
echo -n "LDAP PROVISIONING..."
$srcdir/bin/smbscript $srcdir/setup/provision $PROVISION_OPTIONS --ldap-backend=$LDAPI || {
echo "LDAP PROVISIONING failed: $srcdir/bin/smbscript $srcdir/setup/provision $PROVISION_OPTIONS --ldap-backend=$LDAPI"
diff --git a/source4/script/tests/test_functions.sh b/source4/script/tests/test_functions.sh
index b66e70935d..6baec4982d 100755
--- a/source4/script/tests/test_functions.sh
+++ b/source4/script/tests/test_functions.sh
@@ -69,10 +69,12 @@ slapd_start() {
OLDPATH=$PATH
PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH
export PATH
- slapd -f $SLAPD_CONF -h $LDAPI_ESCAPE
+# running slapd in the background means it stays in the same process group, so it can be
+# killed by timelimit
+ slapd -d0 -f $SLAPD_CONF -h $LDAPI_ESCAPE &
PATH=$OLDPATH
export PATH
- return 0;
+ return $?;
}
testit() {