mirror of
https://github.com/samba-team/samba.git
synced 2025-03-07 00:58:40 +03:00
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)
This commit is contained in:
parent
f9d66d10c2
commit
22d6569ed5
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user