/* Authentication policies for Kerberos clients. */
-/* Get the TGT lifetime enforced by an authentication policy. */
-int64_t authn_policy_enforced_tgt_lifetime(const struct authn_kerberos_client_policy *policy)
+/* Get the raw TGT lifetime enforced by an authentication policy. */
+int64_t authn_policy_enforced_tgt_lifetime_raw(const struct authn_kerberos_client_policy *policy)
{
if (policy == NULL) {
return 0;
return 0;
}
- return policy->tgt_lifetime;
+ return policy->tgt_lifetime_raw;
}
/* Authentication policies for NTLM clients. */
struct authn_kerberos_client_policy;
-/* Get the TGT lifetime enforced by an authentication policy. */
-int64_t authn_policy_enforced_tgt_lifetime(const struct authn_kerberos_client_policy *policy);
+/* Get the raw TGT lifetime enforced by an authentication policy. */
+int64_t authn_policy_enforced_tgt_lifetime_raw(const struct authn_kerberos_client_policy *policy);
/* Authentication policies for NTLM clients. */
struct authn_kerberos_client_policy {
struct authn_policy policy;
DATA_BLOB allowed_to_authenticate_from;
- int64_t tgt_lifetime;
+ int64_t tgt_lifetime_raw;
};
struct authn_ntlm_client_policy {
}
if (authn_attrs.policy->tgt_lifetime != NULL) {
- client_policy->tgt_lifetime = ldb_msg_find_attr_as_int64(
+ client_policy->tgt_lifetime_raw = ldb_msg_find_attr_as_int64(
authn_policy_msg,
authn_attrs.policy->tgt_lifetime,
0);
const struct authn_kerberos_client_policy *authn_client_policy = NULL;
const struct authn_server_policy *authn_server_policy = NULL;
- int64_t enforced_tgt_lifetime;
+ int64_t enforced_tgt_lifetime_raw;
ZERO_STRUCTP(entry);
}
}
- enforced_tgt_lifetime = authn_policy_enforced_tgt_lifetime(authn_client_policy);
- if (enforced_tgt_lifetime != 0) {
- int64_t lifetime = enforced_tgt_lifetime;
+ enforced_tgt_lifetime_raw = authn_policy_enforced_tgt_lifetime_raw(authn_client_policy);
+ if (enforced_tgt_lifetime_raw != 0) {
+ int64_t lifetime = enforced_tgt_lifetime_raw;
lifetime /= INT64_C(1000) * 1000 * 10;
lifetime = MIN(lifetime, INT_MAX);
protected_user = result;
- if (protected_user && enforced_tgt_lifetime == 0)
+ if (protected_user && enforced_tgt_lifetime_raw == 0)
{
/*
* If a TGT lifetime hasn’t been set, Protected Users