summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2013-04-22 11:38:27 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-05-02 12:52:49 +0200
commitac77faa9765f2877a82f71dc9584ba26aeb39a25 (patch)
treec1695144e440efa0382106852dc49e930ca7837e /src
parent3896c82a127ec0858429e04b8019773dbf7e7b92 (diff)
downloadsssd-ac77faa9765f2877a82f71dc9584ba26aeb39a25.tar.gz
sssd-ac77faa9765f2877a82f71dc9584ba26aeb39a25.tar.xz
sssd-ac77faa9765f2877a82f71dc9584ba26aeb39a25.zip
Display the last grace warning, too
Due to a comparison error, the last warning when an LDAP password was in its grace period was never displayed. https://fedorahosted.org/sssd/ticket/1890
Diffstat (limited to 'src')
-rw-r--r--src/providers/ldap/ldap_auth.c4
-rw-r--r--src/providers/ldap/sdap_async_connection.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/providers/ldap/ldap_auth.c b/src/providers/ldap/ldap_auth.c
index b0dd30ce6..6aba14c96 100644
--- a/src/providers/ldap/ldap_auth.c
+++ b/src/providers/ldap/ldap_auth.c
@@ -209,7 +209,7 @@ static errno_t check_pwexpire_ldap(struct pam_data *pd,
enum sdap_result *result,
int pwd_exp_warning)
{
- if (ppolicy->grace > 0 || ppolicy->expire > 0) {
+ if (ppolicy->grace >= 0 || ppolicy->expire > 0) {
uint32_t *data;
uint32_t *ptr;
int ret;
@@ -225,7 +225,7 @@ static errno_t check_pwexpire_ldap(struct pam_data *pd,
}
ptr = data;
- if (ppolicy->grace > 0) {
+ if (ppolicy->grace >= 0) {
*ptr = SSS_PAM_USER_INFO_GRACE_LOGIN;
ptr++;
*ptr = ppolicy->grace;
diff --git a/src/providers/ldap/sdap_async_connection.c b/src/providers/ldap/sdap_async_connection.c
index ff9924843..44536c730 100644
--- a/src/providers/ldap/sdap_async_connection.c
+++ b/src/providers/ldap/sdap_async_connection.c
@@ -608,7 +608,7 @@ static void simple_bind_done(struct sdap_op *op,
("Password was reset. "
"User must set a new password.\n"));
state->result = LDAP_X_SSSD_PASSWORD_EXPIRED;
- } else if (pp_grace > 0) {
+ } else if (pp_grace >= 0) {
DEBUG(SSSDBG_TRACE_LIBS,
("Password expired. "
"[%d] grace logins remaining.\n",