summaryrefslogtreecommitdiff
path: root/source4/selftest
diff options
context:
space:
mode:
Diffstat (limited to 'source4/selftest')
-rw-r--r--source4/selftest/env/Samba4.pm10
1 files changed, 7 insertions, 3 deletions
diff --git a/source4/selftest/env/Samba4.pm b/source4/selftest/env/Samba4.pm
index 2f846bbdb0..8a6d40f3ca 100644
--- a/source4/selftest/env/Samba4.pm
+++ b/source4/selftest/env/Samba4.pm
@@ -24,9 +24,13 @@ sub new($$$$) {
sub openldap_start($$$) {
my ($slapd_conf, $uri, $logs) = @_;
- my $oldpath = $ENV{PATH};
- $ENV{PATH} = "/usr/local/sbin:/usr/sbin:/sbin:$ENV{PATH}";
- system("slapd -d0 -f $slapd_conf -h $uri > $logs 2>&1 &");
+ my $oldpath = $ENV{PATH};
+ my $olpath = "";
+ if (defined $ENV{OPENLDAP_PATH}) {
+ $olpath = "$ENV{OPENLDAP_PATH}:"
+ }
+ $ENV{PATH} = "$olpath/usr/local/sbin:/usr/sbin:/sbin:$ENV{PATH}";
+ system("slapd -d63 -f $slapd_conf -h $uri > $logs 2>&1 &");
$ENV{PATH} = $oldpath;
}