ktpass: fix the search path for when running in samba's source dir
authorMatthieu Patou <mat@matws.net>
Tue, 19 Oct 2010 13:23:57 +0000 (17:23 +0400)
committerMatthieu Patou <mat@samba.org>
Fri, 12 Nov 2010 19:40:21 +0000 (19:40 +0000)
source4/scripting/bin/ktpass.sh

index 92b197693233406072101483437f1f67b04d7c2e..7c13fe4ac0e7ab3d002cb530c9b151118dfedf93 100755 (executable)
@@ -55,6 +55,9 @@ if [ -z "$enc" ]; then
 fi
 if [ -z "$path" ]; then
   path=`dirname $0`/../bin/
+  if [ ! -f ${path}ldbsearch ]; then
+    path=`dirname $0`/../../bin/
+  fi
 fi
 if [ -z "$outfile" -o -z "$princ" -o -z "$pass" ]; then
   echo "At least one mandatory parameter (--out, --princ, --pass) was not specified"