From 3483adaf0a66ddda30c828a478b859bd8270a2e5 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 27 Nov 2010 03:03:50 +0100 Subject: selftest: Allow using ldb* utilities from system. --- selftest/target/Samba4.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm index 3e42d034fa..12414f0307 100644 --- a/selftest/target/Samba4.pm +++ b/selftest/target/Samba4.pm @@ -9,6 +9,7 @@ use strict; use Cwd qw(abs_path); use FindBin qw($RealBin); use POSIX; +use SocketWrapper; sub new($$$$$) { my ($classname, $bindir, $ldap, $setupdir, $exeext) = @_; @@ -27,7 +28,10 @@ sub new($$$$$) { sub bindir_path($$) { my ($self, $path) = @_; - return "$self->{bindir}/$path$self->{exeext}"; + my $valpath = "$self->{bindir}/$path$self->{exeext}"; + + return $valpath if (-f $valpath); + return $path; } sub openldap_start($$$) { -- cgit