summaryrefslogtreecommitdiff
path: root/testprogs/blackbox/test_kinit.sh
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-02-03 16:23:13 +0100
committerStefan Metzmacher <metze@samba.org>2009-02-03 16:31:04 +0100
commit8b408f781970b3f2b310389f9ae73ad0c5e42881 (patch)
treea983f8474e5863e8babc93f03524e0166f41b4ea /testprogs/blackbox/test_kinit.sh
parent7c72853b50b14653fe3c62fde3bf653b45c755f8 (diff)
downloadsamba-8b408f781970b3f2b310389f9ae73ad0c5e42881.tar.gz
samba-8b408f781970b3f2b310389f9ae73ad0c5e42881.tar.bz2
samba-8b408f781970b3f2b310389f9ae73ad0c5e42881.zip
s4:selftest: avoid hardcoded pathes in blackbox tests
metze
Diffstat (limited to 'testprogs/blackbox/test_kinit.sh')
-rwxr-xr-xtestprogs/blackbox/test_kinit.sh22
1 files changed, 12 insertions, 10 deletions
diff --git a/testprogs/blackbox/test_kinit.sh b/testprogs/blackbox/test_kinit.sh
index 90e3d37453..b19edfbb38 100755
--- a/testprogs/blackbox/test_kinit.sh
+++ b/testprogs/blackbox/test_kinit.sh
@@ -19,10 +19,12 @@ PREFIX=$6
shift 6
failed=0
-samba4bindir=`dirname $0`/../../source4/bin
-smbclient=$samba4bindir/smbclient
-samba4kinit=$samba4bindir/samba4kinit
-net=$samba4bindir/net
+samba4bindir="$BUILDDIR/bin"
+smbclient="$samba4bindir/smbclient$EXEEXT"
+samba4kinit="$samba4bindir/samba4kinit$EXEEXT"
+net="$samba4bindir/net$EXEEXT"
+rkpty="$samba4bindir/rkpty$EXEEXT"
+samba4kpasswd="$samba4bindir/samba4kpasswd$EXEEXT"
enableaccount="$PYTHON `dirname $0`/../../source4/setup/enableaccount"
. `dirname $0`/subunit.sh
@@ -68,7 +70,7 @@ testit "enable user with kerberos cache" $VALGRIND $enableaccount nettestuser -H
KRB5CCNAME="$PREFIX/tmpuserccache"
export KRB5CCNAME
-testit "kinit with user password" $samba4bindir/samba4kinit --password-file=./tmpuserpassfile --request-pac nettestuser@$REALM || failed=`expr $failed + 1`
+testit "kinit with user password" $samba4kinit --password-file=./tmpuserpassfile --request-pac nettestuser@$REALM || failed=`expr $failed + 1`
test_smbclient "Test login with user kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1`
@@ -76,7 +78,7 @@ NEWUSERPASS=testPaSS@34%
testit "change user password with 'net password change' (rpc)" $VALGRIND $net password change -W$DOMAIN -U$DOMAIN\\nettestuser%$USERPASS $CONFIGURATION -k no $NEWUSERPASS $@ || failed=`expr $failed + 1`
echo $NEWUSERPASS > ./tmpuserpassfile
-testit "kinit with user password" $samba4bindir/samba4kinit --password-file=./tmpuserpassfile --request-pac nettestuser@$REALM || failed=`expr $failed + 1`
+testit "kinit with user password" $samba4kinit --password-file=./tmpuserpassfile --request-pac nettestuser@$REALM || failed=`expr $failed + 1`
test_smbclient "Test login with user kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1`
@@ -95,9 +97,9 @@ send ${NEWUSERPASS}\n
expect Success
EOF
-testit "change user password with kpasswd" $samba4bindir/rkpty ./tmpkpasswdscript $samba4bindir/samba4kpasswd nettestuser@$REALM || failed=`expr $failed + 1`
+testit "change user password with kpasswd" $rkpty ./tmpkpasswdscript $samba4kpasswd nettestuser@$REALM || failed=`expr $failed + 1`
-testit "kinit with user password" $samba4bindir/samba4kinit --password-file=./tmpuserpassfile --request-pac nettestuser@$REALM || failed=`expr $failed + 1`
+testit "kinit with user password" $samba4kinit --password-file=./tmpuserpassfile --request-pac nettestuser@$REALM || failed=`expr $failed + 1`
NEWUSERPASS=testPaSS@78%
echo $NEWUSERPASS > ./tmpuserpassfile
@@ -112,9 +114,9 @@ send ${NEWUSERPASS}\n
expect Success
EOF
-testit "set user password with kpasswd" $samba4bindir/rkpty ./tmpkpasswdscript $samba4bindir/samba4kpasswd --cache=$PREFIX/tmpccache nettestuser@$REALM || failed=`expr $failed + 1`
+testit "set user password with kpasswd" $rkpty ./tmpkpasswdscript $samba4kpasswd --cache=$PREFIX/tmpccache nettestuser@$REALM || failed=`expr $failed + 1`
-testit "kinit with user password" $samba4bindir/samba4kinit --password-file=./tmpuserpassfile --request-pac nettestuser@$REALM || failed=`expr $failed + 1`
+testit "kinit with user password" $samba4kinit --password-file=./tmpuserpassfile --request-pac nettestuser@$REALM || failed=`expr $failed + 1`
test_smbclient "Test login with user kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1`