fi
return $status
}
+
+# work out the top level source directory
+if [ -d source4 ]; then
+ SRCDIR="."
+else
+ SRCDIR=".."
+fi
+export SRCDIR
failed=0
samba4bindir="$BUILDDIR/bin"
+samba4srcdir="$SRCDIR/source4"
smbclient="$samba4bindir/smbclient$EXEEXT"
samba4kinit="$samba4bindir/samba4kinit$EXEEXT"
-machineaccountccache="$BUILDDIR/scripting/bin/machineaccountccache"
+
+machineaccountccache="$samba4srcdir/scripting/bin/machineaccountccache"
. `dirname $0`/subunit.sh
#This is important because it puts the ticket for the old KVNO and password into a local ccache
test_smbclient "Test login with kerberos ccache before password change" 'ls' -k yes || failed=`expr $failed + 1`
-testit "change dc password" ./scripting/devel/chgtdcpass -s $PROVDIR/etc/smb.conf || failed=`expr $failed + 1`
+testit "change dc password" $samba4srcdir/scripting/devel/chgtdcpass -s $PROVDIR/etc/smb.conf || failed=`expr $failed + 1`
#This is important because it shows that the old ticket remains valid (as it must) for incoming connections after the DC password is changed
test_smbclient "Test login with kerberos ccache after password change" 'ls' -k yes || failed=`expr $failed + 1`
failed=0
samba4bindir="$BUILDDIR/bin"
+samba4srcdir="$SRCDIR/source4"
smbclient="$samba4bindir/smbclient$EXEEXT"
samba4kinit="$samba4bindir/samba4kinit$EXEEXT"
samba_tool="$samba4bindir/samba-tool$EXEEXT"
rkpty="$samba4bindir/rkpty$EXEEXT"
samba4kpasswd="$samba4bindir/samba4kpasswd$EXEEXT"
enableaccount="$samba_tool enableaccount"
-machineaccountccache="$BUILDDIR/scripting/bin/machineaccountccache"
+machineaccountccache="$samba4srcdir/scripting/bin/machineaccountccache"
. `dirname $0`/subunit.sh
samba_tool="$BUILDDIR/bin/samba-tool"
samba4bindir="$BUILDDIR/bin"
+samba4srcdir="$SRCDIR/source4"
samba4kinit="$samba4bindir/samba4kinit$EXEEXT"
CONFIG="--configfile=$PREFIX/dc/etc/smb.conf"
export KRB5CCNAME
echo "testp@ssw0Rd" >$PREFIX/tmppassfile
testit "kinit with passwd" $samba4kinit -e arcfour-hmac-md5 --password-file=$PREFIX/tmppassfile $TESTUSER@SAMBA.EXAMPLE.COM || failed=`expr $failed + 1`
-testit "ktpass" $BUILDDIR/scripting/bin/ktpass.sh --host LOCALDC --out $PREFIX/testuser.kt --princ $TESTUSER --pass "testp@ssw0Rd" --path-to-ldbsearch=$BUILDDIR/bin|| failed=`expr $failed + 1`
+testit "ktpass" $samba4srcdir/scripting/bin/ktpass.sh --host LOCALDC --out $PREFIX/testuser.kt --princ $TESTUSER --pass "testp@ssw0Rd" --path-to-ldbsearch=$BUILDDIR/bin|| failed=`expr $failed + 1`
rm -f $KRB5CCNAME
failed=0
samba4bindir="$BUILDDIR/bin"
+samba4srcdir="$SRCDIR/source4"
smbclient="$samba4bindir/smbclient$EXEEXT"
samba4kinit="$samba4bindir/samba4kinit$EXEEXT"
samba_tool="$samba4bindir/samba-tool$EXEEXT"
rkpty="$samba4bindir/rkpty$EXEEXT"
samba4kpasswd="$samba4bindir/samba4kpasswd$EXEEXT"
enableaccount="$samba_tool enableaccount"
-machineaccountccache="$BUILDDIR/scripting/bin/machineaccountccache"
+machineaccountccache="$samba4srcdir/scripting/bin/machineaccountccache"
. `dirname $0`/subunit.sh