1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-11 16:58:40 +03:00

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)
This commit is contained in:
Andrew Bartlett 2006-09-13 10:26:32 +00:00 committed by Gerald (Jerry) Carter
parent c706319c8f
commit f425072ed9
3 changed files with 11 additions and 5 deletions

View File

@ -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

View File

@ -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"

View File

@ -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() {