svn commit: samba r21720 - in
branches/SAMBA_4_0/source/script/tests: .
abartlet at samba.org
abartlet at samba.org
Tue Mar 6 06:30:37 GMT 2007
Author: abartlet
Date: 2007-03-06 06:30:36 +0000 (Tue, 06 Mar 2007)
New Revision: 21720
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21720
Log:
Try to make 'TEST_LDAP=yes make test' work again. These recent
changes seem to have been lost in the merge, and some variables were
not yet exported.
Andrew Bartlett
Modified:
branches/SAMBA_4_0/source/script/tests/Samba4.pm
branches/SAMBA_4_0/source/script/tests/mk-fedora-ds.sh
branches/SAMBA_4_0/source/script/tests/mk-openldap.sh
branches/SAMBA_4_0/source/script/tests/mktestsetup.sh
branches/SAMBA_4_0/source/script/tests/selftest.pl
Changeset:
Modified: branches/SAMBA_4_0/source/script/tests/Samba4.pm
===================================================================
--- branches/SAMBA_4_0/source/script/tests/Samba4.pm 2007-03-06 05:30:25 UTC (rev 21719)
+++ branches/SAMBA_4_0/source/script/tests/Samba4.pm 2007-03-06 06:30:36 UTC (rev 21720)
@@ -16,17 +16,17 @@
sub slapd_start($$)
{
my ($conf, $uri) = @_;
+ # running slapd in the background means it stays in the same process group, so it can be
+ # killed by timelimit
if (defined($ENV{FEDORA_DS_PREFIX})) {
- system("$ENV{FEDORA_DS_PREFIX}/lib/fedora-ds/ds_newinst.pl $ENV{FEDORA_DS_INF}") or die("Unable to provision fedora ds ldapd");
+ system("$ENV{FEDORA_DS_PREFIX}/sbin/ns-slapd -D $ENV{FEDORA_DS_DIR} -d0 &");
} else {
my $oldpath = $ENV{PATH};
$ENV{PATH} = "/usr/local/sbin:/usr/sbin:/sbin:$ENV{PATH}";
- # running slapd in the background means it stays in the same process group, so it can be
- # killed by timelimit
system("slapd -d0 -f $conf -h $uri &");
$ENV{PATH} = $oldpath;
}
- return $? >> 8;
+ return 1;
}
sub slapd_stop()
@@ -132,8 +132,8 @@
sub provision_ldap($$)
{
my ($bindir, $setupdir) = @_;
- system("$bindir/smbscript $setupdir/provision $ENV{PROVISION_OPTIONS} \"$ENV{PROVISION_ACI}\" --ldap-backend=$ENV{LDAPI}") or
- die("LDAP PROVISIONING failed: $bindir/smbscript $setupdir/provision $ENV{PROVISION_OPTIONS} \"$ENV{PROVISION_ACI}\" --ldap-backend=$ENV{LDAPI}");
+ system("$bindir/smbscript $setupdir/provision $ENV{PROVISION_OPTIONS} \"$ENV{PROVISION_ACI}\" --ldap-backend=$ENV{LDAP_URI}") and
+ die("LDAP PROVISIONING failed: $bindir/smbscript $setupdir/provision $ENV{PROVISION_OPTIONS} \"$ENV{PROVISION_ACI}\" --ldap-backend=$ENV{LDAP_URI}");
}
1;
Modified: branches/SAMBA_4_0/source/script/tests/mk-fedora-ds.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/mk-fedora-ds.sh 2007-03-06 05:30:25 UTC (rev 21719)
+++ branches/SAMBA_4_0/source/script/tests/mk-fedora-ds.sh 2007-03-06 06:30:36 UTC (rev 21720)
@@ -1,9 +1,9 @@
FEDORA_DS_INF=$LDAPDIR/fedorads.inf
-export FEDORA_DS_INF
FEDORA_DS_INITIAL_LDIF=$LDAPDIR/fedorads-initial.ldif
#Make the subdirectory be as fedora DS would expect
FEDORA_DS_DIR=$LDAPDIR/slapd-samba4
+echo FEDORA_DS_DIR=$FEDORA_DS_DIR
cat >$FEDORA_DS_INF <<EOF
[General]
@@ -63,7 +63,8 @@
$srcdir/bin/ad2oLschema $CONFIGURATION -H $PRIVATEDIR/sam.ldb --option=convert:target=fedora-ds -I $srcdir/setup/schema-map-fedora-ds-1.0 -O $FEDORA_DS_DIR/schema/99_ad.ldif >&2
-LDAP_URI_ESCAPE=$LDAP_URI;
+LDAP_URI_ESCAPE="ldapi://"`echo $LDAPDIR/ldapi | sed 's|/|%2F|g'`
+
PROVISION_OPTIONS="$PROVISION_OPTIONS --ldap-module=nsuniqueid"
#it is easier to base64 encode this than correctly escape it:
# (targetattr = "*") (version 3.0;acl "full access to all by all";allow (all)(userdn = "ldap:///anyone");)
Modified: branches/SAMBA_4_0/source/script/tests/mk-openldap.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/mk-openldap.sh 2007-03-06 05:30:25 UTC (rev 21719)
+++ branches/SAMBA_4_0/source/script/tests/mk-openldap.sh 2007-03-06 06:30:36 UTC (rev 21720)
@@ -80,11 +80,6 @@
set_tmp_dir $LDAPDIR/db/tmp
EOF
-LDAP_URI="ldapi://$LDAPDIR/ldapi"
-LDAP_URI_ESCAPE="ldapi://"`echo $LDAPDIR/ldapi | sed 's|/|%2F|g'`
-export LDAP_URI
-export LDAP_URI_ESCAPE
-
#This uses the provision we just did, to read out the schema
$srcdir/bin/ad2oLschema $CONFIGURATION -H $PRIVATEDIR/sam.ldb -I $srcdir/setup/schema-map-openldap-2.3 -O $LDAPDIR/ad.schema >&2
Modified: branches/SAMBA_4_0/source/script/tests/mktestsetup.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/mktestsetup.sh 2007-03-06 05:30:25 UTC (rev 21719)
+++ branches/SAMBA_4_0/source/script/tests/mktestsetup.sh 2007-03-06 06:30:36 UTC (rev 21720)
@@ -255,6 +255,9 @@
PROVISION_OPTIONS="$PROVISION_OPTIONS --simple-bind-dn=cn=Manager,$BASEDN --password=$PASSWORD --root=$ROOT"
$srcdir/bin/smbscript $srcdir/setup/provision $PROVISION_OPTIONS >&2
+LDAP_URI="ldapi://$LDAPDIR/ldapi"
+LDAP_URI_ESCAPE="ldapi://"`echo $LDAPDIR/ldapi | sed 's|/|%2F|g'`
+
. `dirname $0`/mk-openldap.sh
test -z "$FEDORA_DS_PREFIX" || {
@@ -285,7 +288,6 @@
echo "NETBIOSNAME=$NETBIOSNAME"
echo "LDAP_URI=$LDAP_URI"
echo "LDAP_URI_ESCAPE=$LDAP_URI_ESCAPE"
-echo "FEDORA_DS_INF=$FEDORA_DS_INF"
echo "DOMAIN=$DOMAIN"
echo "USERNAME=$USERNAME"
echo "REALM=$REALM"
@@ -296,3 +298,5 @@
echo "PREFIX=$PREFIX"
echo "SMBD_LOGLEVEL=$SMBD_LOGLEVEL"
echo "LDAPDIR=$LDAPDIR"
+echo "PROVISION_OPTIONS=$PROVISION_OPTIONS"
+echo "PROVISION_ACI=$PROVISION_ACI"
\ No newline at end of file
Modified: branches/SAMBA_4_0/source/script/tests/selftest.pl
===================================================================
--- branches/SAMBA_4_0/source/script/tests/selftest.pl 2007-03-06 05:30:25 UTC (rev 21719)
+++ branches/SAMBA_4_0/source/script/tests/selftest.pl 2007-03-06 06:30:36 UTC (rev 21720)
@@ -416,7 +416,7 @@
# Start slapd before smbd
if ($ldap) {
- Samba4::slapd_start($ENV{SLAPD_CONF}, $ENV{LDAPI_ESCAPE}) or die("couldn't start slapd");
+ Samba4::slapd_start($ENV{SLAPD_CONF}, $ENV{LDAP_URI_ESCAPE}) or die("couldn't start slapd");
print "LDAP PROVISIONING...";
Samba4::provision_ldap($bindir, $setupdir);
More information about the samba-cvs
mailing list