mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
s4:kdc: Don’t issue forwardable or proxiable tickets to Protected Users
If an authentication policy enforces a maximum TGT lifetime for a Protected User, that limit should stand in place of the four-hour limit usually applied to Protected Users; we should nevertheless continue to ensure that forwardable or proxiable tickets are not issued to such users. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
7026b08e23
commit
0cf658cd10
@ -63,7 +63,10 @@
|
||||
#
|
||||
^samba.tests.krb5.authn_policy_tests.samba.tests.krb5.authn_policy_tests.AuthnPolicyTests.test_authn_policy_allowed_from_empty.ad_dc
|
||||
^samba.tests.krb5.authn_policy_tests.samba.tests.krb5.authn_policy_tests.AuthnPolicyTests.test_authn_policy_allowed_to_empty.ad_dc
|
||||
^samba.tests.krb5.authn_policy_tests.samba.tests.krb5.authn_policy_tests.AuthnPolicyTests.test_authn_policy_protected_flags_with_policy_error.ad_dc
|
||||
#
|
||||
# This test fails; but that is acceptable, for we have an alternative test
|
||||
# (test_authn_policy_protected_flags_with_policy_error) that expects to receive
|
||||
# a policy error.
|
||||
^samba.tests.krb5.authn_policy_tests.samba.tests.krb5.authn_policy_tests.AuthnPolicyTests.test_authn_policy_protected_flags_without_policy_error.ad_dc
|
||||
#
|
||||
# PK-INIT tests
|
||||
|
@ -72,8 +72,11 @@
|
||||
#
|
||||
^samba.tests.krb5.authn_policy_tests.samba.tests.krb5.authn_policy_tests.AuthnPolicyTests.test_authn_policy_allowed_from_no_fast_negative_lifetime.ad_dc
|
||||
^samba.tests.krb5.authn_policy_tests.samba.tests.krb5.authn_policy_tests.AuthnPolicyTests.test_authn_policy_allowed_to_user_deny_s4u2self_constrained_delegation.ad_dc
|
||||
#
|
||||
# This test fails; but that is acceptable, for we have an alternative test
|
||||
# (test_authn_policy_protected_flags_without_policy_error) that expects to
|
||||
# receive a policy error.
|
||||
^samba.tests.krb5.authn_policy_tests.samba.tests.krb5.authn_policy_tests.AuthnPolicyTests.test_authn_policy_protected_flags_with_policy_error.ad_dc
|
||||
^samba.tests.krb5.authn_policy_tests.samba.tests.krb5.authn_policy_tests.AuthnPolicyTests.test_authn_policy_protected_flags_without_policy_error.ad_dc
|
||||
#
|
||||
# PK-INIT tests
|
||||
#
|
||||
|
@ -1478,17 +1478,18 @@ static krb5_error_code samba_kdc_message2entry(krb5_context context,
|
||||
|
||||
protected_user = result;
|
||||
|
||||
if (protected_user && enforced_tgt_lifetime_raw == 0)
|
||||
{
|
||||
/*
|
||||
* If a TGT lifetime hasn’t been set, Protected Users
|
||||
* enforces a four hour TGT lifetime.
|
||||
*/
|
||||
*entry->max_life = MIN(*entry->max_life, 4 * 60 * 60);
|
||||
*entry->max_renew = MIN(*entry->max_renew, 4 * 60 * 60);
|
||||
|
||||
if (protected_user) {
|
||||
entry->flags.forwardable = 0;
|
||||
entry->flags.proxiable = 0;
|
||||
|
||||
if (enforced_tgt_lifetime_raw == 0) {
|
||||
/*
|
||||
* If a TGT lifetime hasn’t been set, Protected
|
||||
* Users enforces a four hour TGT lifetime.
|
||||
*/
|
||||
*entry->max_life = MIN(*entry->max_life, 4 * 60 * 60);
|
||||
*entry->max_renew = MIN(*entry->max_renew, 4 * 60 * 60);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user