mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
r25080: Once we decrypted the packet but have timing problems (closkew, tkt not yet or
no longer valid) there is no point to bother the keytab routines. Guenther (This used to be commit 7e4dcf8e7ecfd35668e86e22bed5a9280ae83959)
This commit is contained in:
parent
35a616e82c
commit
cd45a258a7
@ -427,9 +427,16 @@ NTSTATUS ads_verify_ticket(TALLOC_CTX *mem_ctx,
|
||||
/* Try secrets.tdb first and fallback to the krb5.keytab if
|
||||
necessary */
|
||||
|
||||
auth_ok = ads_secrets_verify_ticket(context, auth_context, host_princ,
|
||||
auth_ok = ads_secrets_verify_ticket(context, auth_context, host_princ,
|
||||
ticket, &tkt, &keyblock, &ret);
|
||||
|
||||
if (!auth_ok &&
|
||||
(ret == KRB5KRB_AP_ERR_TKT_NYV ||
|
||||
ret == KRB5KRB_AP_ERR_TKT_EXPIRED ||
|
||||
ret == KRB5KRB_AP_ERR_SKEW)) {
|
||||
goto auth_failed;
|
||||
}
|
||||
|
||||
if (!auth_ok && lp_use_kerberos_keytab()) {
|
||||
auth_ok = ads_keytab_verify_ticket(context, auth_context,
|
||||
ticket, &tkt, &keyblock, &ret);
|
||||
@ -446,6 +453,7 @@ NTSTATUS ads_verify_ticket(TALLOC_CTX *mem_ctx,
|
||||
#endif
|
||||
}
|
||||
|
||||
auth_failed:
|
||||
if (!auth_ok) {
|
||||
DEBUG(3,("ads_verify_ticket: krb5_rd_req with auth failed (%s)\n",
|
||||
error_message(ret)));
|
||||
|
Loading…
x
Reference in New Issue
Block a user