diff options
Diffstat (limited to 'source4/selftest')
-rw-r--r-- | source4/selftest/env/Samba4.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/selftest/env/Samba4.pm b/source4/selftest/env/Samba4.pm index d7c37fab3e..2f846bbdb0 100644 --- a/source4/selftest/env/Samba4.pm +++ b/source4/selftest/env/Samba4.pm @@ -220,7 +220,11 @@ sub mk_openldap($$$) system("$self->{bindir}/ad2oLschema $configuration --option=convert:target=openldap -H $ldapdir/schema-tmp.ldb -I $self->{setupdir}/schema-map-openldap-2.3 -O $ldapdir/backend-schema.schema >&2") == 0 or die("schema conversion for OpenLDAP failed"); my $oldpath = $ENV{PATH}; - $ENV{PATH} = "$ENV{OPENLDAP_PATH}/usr/local/sbin:/usr/sbin:/sbin:$ENV{PATH}"; + my $olpath = ""; + if (defined $ENV{OPENLDAP_PATH}) { + $olpath = "$ENV{OPENLDAP_PATH}:" + } + $ENV{PATH} = "$olpath/usr/local/sbin:/usr/sbin:/sbin:$ENV{PATH}"; unlink($modconf); open(CONF, ">$modconf"); close(CONF); |