diff options
author | Günther Deschner <gd@samba.org> | 2014-08-25 16:35:23 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2014-09-01 15:47:33 +0200 |
commit | af7613fa2562a80688b461cbbdc95dd14bb4ddb1 (patch) | |
tree | 4c466872db47c85993664fabf6a72b76e8f9feed /testprogs/blackbox | |
parent | 7982c373b04377da7eb998f94846db5f9e56dbb7 (diff) | |
download | samba-af7613fa2562a80688b461cbbdc95dd14bb4ddb1.tar.gz |
testprogs: allow to run passwords test with MIT and Heimdal kinit.
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
Diffstat (limited to 'testprogs/blackbox')
-rwxr-xr-x | testprogs/blackbox/test_passwords.sh | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/testprogs/blackbox/test_passwords.sh b/testprogs/blackbox/test_passwords.sh index 4810177d127..00a88b3a943 100755 --- a/testprogs/blackbox/test_passwords.sh +++ b/testprogs/blackbox/test_passwords.sh @@ -54,6 +54,18 @@ test_smbclient() { return $status } +do_kinit() { + file="$1" + password="$2" + shift + shift + if test -x $BINDIR/samba4kinit; then + $samba4kinit --password-file=$file --request-pac $@ + else + echo $password | $samba4kinit $@ + fi +} + UID_WRAPPER_ROOT=1 export UID_WRAPPER_ROOT @@ -71,7 +83,7 @@ export KRB5CCNAME echo $USERPASS > $PREFIX/tmpuserpassfile -testit "kinit with user password" $samba4kinit --password-file=$PREFIX/tmpuserpassfile --request-pac nettestuser@$REALM || failed=`expr $failed + 1` +testit "kinit with user password" do_kinit $PREFIX/tmpuserpassfile $USERPASS nettestuser@$REALM || failed=`expr $failed + 1` test_smbclient "Test login with user kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1` @@ -79,7 +91,7 @@ NEWUSERPASS=testPaSS@01% testit "change user password with 'samba-tool user password' (unforced)" $VALGRIND $samba_tool user password -W$DOMAIN -U$DOMAIN/nettestuser%$USERPASS -k no --newpassword=$NEWUSERPASS $@ || failed=`expr $failed + 1` echo $NEWUSERPASS > ./tmpuserpassfile -testit "kinit with user password" $samba4kinit --password-file=./tmpuserpassfile --request-pac nettestuser@$REALM || failed=`expr $failed + 1` +testit "kinit with user password" do_kinit ./tmpuserpassfile $NEWUSERPASS nettestuser@$REALM || failed=`expr $failed + 1` test_smbclient "Test login with user kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1` |