summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/selftest/env/Samba4.pm25
-rwxr-xr-xsource4/selftest/selftest.pl2
2 files changed, 19 insertions, 8 deletions
diff --git a/source4/selftest/env/Samba4.pm b/source4/selftest/env/Samba4.pm
index f2ba37f618..4f8b96d332 100644
--- a/source4/selftest/env/Samba4.pm
+++ b/source4/selftest/env/Samba4.pm
@@ -46,7 +46,7 @@ sub slapd_start($$)
# running slapd in the background means it stays in the same process group, so it can be
# killed by timelimit
if ($self->{ldap} eq "fedora-ds") {
- system("$ENV{FEDORA_DS_PREFIX}/sbin/ns-slapd -D $env_vars->{FEDORA_DS_DIR} -d0 -i $env_vars->{FEDORA_DS_PIDFILE}> $env_vars->{LDAPDIR}/logs 2>&1 &");
+ system("$ENV{FEDORA_DS_ROOT}/sbin/ns-slapd -D $env_vars->{FEDORA_DS_DIR} -d0 -i $env_vars->{FEDORA_DS_PIDFILE}> $env_vars->{LDAPDIR}/logs 2>&1 &");
} elsif ($self->{ldap} eq "openldap") {
openldap_start($env_vars->{SLAPD_CONF}, $uri, "$env_vars->{LDAPDIR}/logs");
}
@@ -204,10 +204,10 @@ sub mk_fedora_ds($$$)
system("$self->{bindir}/ad2oLschema $configuration -H $ldapdir/schema-tmp.ldb --option=convert:target=fedora-ds -I $self->{setupdir}/schema-map-fedora-ds-1.0 -O $ldapdir/99_ad.ldif >&2") == 0 or die("schema conversion for Fedora DS failed");
my $dir = getcwd();
-chdir "$ENV{FEDORA_DS_PREFIX}/bin" || die;
- if (system("perl $ENV{FEDORA_DS_PREFIX}/sbin/setup-ds.pl --silent --file=$fedora_ds_inf >&2") != 0) {
+chdir "$ENV{FEDORA_DS_ROOT}/bin" || die;
+ if (system("perl $ENV{FEDORA_DS_ROOT}/sbin/setup-ds.pl --silent --file=$fedora_ds_inf >&2") != 0) {
chdir $dir;
- die("perl $ENV{FEDORA_DS_PREFIX}/sbin/setup-ds.pl --silent --file=$fedora_ds_inf FAILED: $?");
+ die("perl $ENV{FEDORA_DS_ROOT}/sbin/setup-ds.pl --silent --file=$fedora_ds_inf FAILED: $?");
}
chdir $dir || die;
@@ -227,10 +227,10 @@ sub mk_openldap($$$)
my $oldpath = $ENV{PATH};
my $olpath = "";
- my $olroot = "";
- if (defined $ENV{OPENLDAP_ROOT}) {
+ my $olroot = "";
+ if (defined $ENV{OPENLDAP_ROOT}) {
$olroot = "$ENV{OPENLDAP_ROOT}";
- $olpath = "$olroot/libexec:$olroot/sbin:";
+ $olpath = "$olroot/libexec:$olroot/sbin:";
}
$ENV{PATH} = "$olpath/usr/local/sbin:/usr/sbin:/sbin:$ENV{PATH}";
@@ -241,6 +241,17 @@ sub mk_openldap($$$)
open(CONF, ">$modconf");
# enable slapd modules
print CONF "
+modulepath $olpath/libexec/openldap
+moduleload back_hdb
+moduleload syncprov
+";
+ close(CONF);
+ }
+
+ if (system("slaptest -u -f $slapd_conf >&2") != 0) {
+ open(CONF, ">$modconf");
+ # enable slapd modules
+ print CONF "
moduleload back_hdb
moduleload syncprov
";
diff --git a/source4/selftest/selftest.pl b/source4/selftest/selftest.pl
index 8fccb8d4a0..7401205041 100755
--- a/source4/selftest/selftest.pl
+++ b/source4/selftest/selftest.pl
@@ -356,7 +356,7 @@ my $old_pwd = "$RealBin/..";
# Backwards compatibility:
if (defined($ENV{TEST_LDAP}) and $ENV{TEST_LDAP} eq "yes") {
- if (defined($ENV{FEDORA_DS_PREFIX})) {
+ if (defined($ENV{FEDORA_DS_ROOT})) {
$ldap = "fedora-ds";
} else {
$ldap = "openldap";