kcm: Allow disabling automatic TGT renewal

Add --no-automatic-renewal option to disable automatic TGT renewal.
Renewal can also be disabled by setting automatic_renewal to false
in the [kcm] section of krb5.conf.
This commit is contained in:
Steffen Kieß
2022-03-25 16:52:18 +01:00
committed by Nico Williams
parent 6932819419
commit 9a47ec2b02
3 changed files with 14 additions and 1 deletions

View File

@@ -220,7 +220,7 @@ kcm_ccache_make_default_event(krb5_context context,
event->fire_time = time(NULL); /* right away */
event->action = KCM_EVENT_ACQUIRE_CREDS;
} else if (is_primary_credential_p(context, ccache, newcred)) {
if (newcred->flags.b.renewable) {
if (automatic_renewal && newcred->flags.b.renewable) {
event->action = KCM_EVENT_RENEW_CREDS;
ccache->flags |= KCM_FLAGS_RENEWABLE;
} else {