summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2013-02-14 10:13:59 +0100
committerJakub Hrozek <jhrozek@redhat.com>2013-02-21 11:12:07 +0100
commit9807576b4cb1d022e918b45bf7dabbe9b41b1c87 (patch)
tree9ec9e4e339c34c1dadebefbfad207eaec8c4e279
parent3a5dcd3c50b456c4d85281ec7a0972201e2f9426 (diff)
downloadsssd-9807576b4cb1d022e918b45bf7dabbe9b41b1c87.tar.gz
sssd-9807576b4cb1d022e918b45bf7dabbe9b41b1c87.tar.xz
sssd-9807576b4cb1d022e918b45bf7dabbe9b41b1c87.zip
Fix the krb5 password expiration warning
https://fedorahosted.org/sssd/ticket/1808
-rw-r--r--src/confdb/confdb.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/confdb/confdb.c b/src/confdb/confdb.c
index 31efd9443..31c48bd28 100644
--- a/src/confdb/confdb.c
+++ b/src/confdb/confdb.c
@@ -1020,7 +1020,11 @@ static int confdb_get_domain_internal(struct confdb_ctx *cdb,
goto done;
}
- /* Set the PAM warning time, if specified */
+ /* Set the PAM warning time, if specified. If not specified, pass on
+ * the "not set" value of "-1" which means "use provider default". The
+ * value 0 means "always display the warning if server sends one" */
+ domain->pwd_expiration_warning = -1;
+
val = ldb_msg_find_attr_as_int(res->msgs[0],
CONFDB_DOMAIN_PWD_EXPIRATION_WARNING,
-1);
@@ -1035,6 +1039,8 @@ static int confdb_get_domain_internal(struct confdb_ctx *cdb,
}
if (val > 0) {
+ DEBUG(SSSDBG_CONF_SETTINGS,
+ ("Setting domain password expiration warning to %d days\n", val));
/* The value is in days, transform it to seconds */
domain->pwd_expiration_warning = val * 24 * 3600;
}