If Samba is built against the system libldb, use the system tools.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Dec 5 09:36:40 UTC 2022 on sn-devel-184
TRUST_PASSWORD="$6"
wbinfo="$VALGRIND $BINDIR/wbinfo"
-ldbmodify="$VALGRIND $BINDIR/ldbmodify"
-ldbsearch="$VALGRIND $BINDIR/ldbsearch"
+ldbmodify="${VALGRIND} ldbmodify"
+if [ -x "${BINDIR}/ldbmodify" ]; then
+ ldbmodify="${VALGRIND} ${BINDIR}/ldbmodify"
+fi
+
+ldbsearch="${VALGRIND} ldbsearch"
+if [ -x "${BINDIR}/ldbsearch" ]; then
+ ldbsearch="${VALGRIND} ${BINDIR}/ldbsearch"
+fi
failed=0