summaryrefslogtreecommitdiffstats
path: root/src/providers
diff options
context:
space:
mode:
Diffstat (limited to 'src/providers')
-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 f4e6d28f0..58cc2d356 100644
--- a/src/providers/ldap/ldap_auth.c
+++ b/src/providers/ldap/ldap_auth.c
@@ -200,7 +200,7 @@ static errno_t check_pwexpire_ldap(struct pam_data *pd,
{
int ret = EOK;
- if (ppolicy->grace > 0 || ppolicy->expire > 0) {
+ if (ppolicy->grace >= 0 || ppolicy->expire > 0) {
uint32_t *data;
uint32_t *ptr;
@@ -215,7 +215,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 f77d03805..304a7be5b 100644
--- a/src/providers/ldap/sdap_async_connection.c
+++ b/src/providers/ldap/sdap_async_connection.c
@@ -615,7 +615,7 @@ static void simple_bind_done(struct sdap_op *op,
("Password was reset. "
"User must set a new password.\n"));
ret = ERR_PASSWORD_EXPIRED;
- } else if (pp_grace > 0) {
+ } else if (pp_grace >= 0) {
DEBUG(SSSDBG_TRACE_LIBS,
("Password expired. "
"[%d] grace logins remaining.\n",