summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-01-11 03:29:31 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-01-11 03:29:31 +0000
commit22d6569ed514bac025958d6cfdc99ec472a3f5cb (patch)
tree0bbf0c26ada292ea772ad3a8ca8641ee7b79998c
parentf9d66d10c236558c20a28f4caae3c6b4e2516fa9 (diff)
downloadsamba-22d6569ed514bac025958d6cfdc99ec472a3f5cb.tar.gz
samba-22d6569ed514bac025958d6cfdc99ec472a3f5cb.tar.bz2
samba-22d6569ed514bac025958d6cfdc99ec472a3f5cb.zip
Patch from Nik Conwell <nik@bu.edu>. Don't reference free()ed data when trying
to figure out if we have got our ticket yet. Andrew Bartlett (This used to be commit a66ced2cf69145c0a5be5ed91ac306db50c313d1)
-rw-r--r--source3/libads/kerberos_verify.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/libads/kerberos_verify.c b/source3/libads/kerberos_verify.c
index 03917466c6..c1402b1370 100644
--- a/source3/libads/kerberos_verify.c
+++ b/source3/libads/kerberos_verify.c
@@ -46,6 +46,7 @@ NTSTATUS ads_verify_ticket(ADS_STRUCT *ads, const DATA_BLOB *ticket,
char *password_s;
krb5_data password;
krb5_enctype *enctypes = NULL;
+ BOOL auth_ok = False;
if (!secrets_init()) {
DEBUG(1,("secrets_init failed\n"));
@@ -124,11 +125,12 @@ NTSTATUS ads_verify_ticket(ADS_STRUCT *ads, const DATA_BLOB *ticket,
if (!(ret = krb5_rd_req(context, &auth_context, &packet,
NULL, keytab, NULL, &tkt))) {
krb5_free_ktypes(context, enctypes);
+ auth_ok = True;
break;
}
}
- if (!enctypes[i]) {
+ if (!auth_ok) {
DEBUG(3,("krb5_rd_req with auth failed (%s)\n",
error_message(ret)));
return NT_STATUS_LOGON_FAILURE;