summaryrefslogtreecommitdiffstats
path: root/source3/script/tests
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2014-11-27 17:13:23 +1300
committerAndrew Bartlett <abartlet@samba.org>2014-11-27 07:38:02 +0100
commit82c0ecbb2c45b9a38792ef9e5428522abc3dc71e (patch)
tree225262dc5537b661210f153a4907e7c28a133350 /source3/script/tests
parent5ab6fa18a4e5fffd10c46824dbcd04dd87bbf2f4 (diff)
downloadsamba-82c0ecbb2c45b9a38792ef9e5428522abc3dc71e.tar.gz
samba-82c0ecbb2c45b9a38792ef9e5428522abc3dc71e.tar.xz
samba-82c0ecbb2c45b9a38792ef9e5428522abc3dc71e.zip
gse_krb5: Avoid a segfault when we can not read the dedicated keytab file
This improved code simply cleans up the memory as soon as possible, rather than using memcmp(). Otherwise, we segfault if krb5_kt_start_seq_get fails, as it can set the fd element in the handle to -1. Change-Id: Ib4821ef944a7e12cd8a891ae07dbfc0567c65495 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Nov 27 07:38:02 CET 2014 on sn-devel-104
Diffstat (limited to 'source3/script/tests')
-rwxr-xr-xsource3/script/tests/test_ntlm_auth_krb5.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/source3/script/tests/test_ntlm_auth_krb5.sh b/source3/script/tests/test_ntlm_auth_krb5.sh
index 5989d01046..773cb57581 100755
--- a/source3/script/tests/test_ntlm_auth_krb5.sh
+++ b/source3/script/tests/test_ntlm_auth_krb5.sh
@@ -27,5 +27,6 @@ export KRB5CCNAME
testit "ntlm_auth with krb5 gss-spnego-client and gss-spnego server" $PYTHON $SRC3DIR/torture/test_ntlm_auth.py $NTLM_AUTH $ADDARGS --target-hostname=$SERVER --target-service=host --client-helper=gss-spnego-client --server-helper=gss-spnego --server-use-winbindd || failed=`expr $failed + 1`
+echo YR| testit "ntlm_auth with krb5 and an invalid keytab" $NTLM_AUTH --helper-protocol=gss-spnego --option=security=ads --option=kerberosmethod='dedicatedkeytab' --option=dedicatedkeytabfile=FILE:`pwd`/$CCACHE.keytab-does-not-exist || failed=`expr $failed + 1`
testok $0 $failed