testprogs: Use the system binaries for KRB5 if we don't build in-tree heimdal.
[samba.git] / testprogs / blackbox / test_kinit.sh
index adfed78255574e0ab0eda90a78a4110aabda70d2..000303ac71fccab8f9c2b584323dc54e080aaef4 100755 (executable)
@@ -23,10 +23,18 @@ failed=0
 
 samba4bindir="$BINDIR"
 samba4srcdir="$SRCDIR/source4"
-samba4kinit="$samba4bindir/samba4kinit"
+samba4kinit=kinit
+if test -x $BINDIR/samba4kinit; then
+       samba4kinit=$BINDIR/samba4kinit
+fi
+
 samba_tool="$samba4bindir/samba-tool"
 rkpty="$samba4bindir/rkpty"
-samba4kpasswd="$samba4bindir/samba4kpasswd"
+samba4kpasswd=kpasswd
+if test -x $BINDIR/samba4kpasswd; then
+       samba4kpasswd=$BINDIR/samba4kpasswd
+fi
+
 enableaccount="$samba_tool user enable"
 machineaccountccache="$samba4srcdir/scripting/bin/machineaccountccache"