From 755a15ebafb8ae98cef681512d3ab3ef0470e11d Mon Sep 17 00:00:00 2001
From: Noriko Hosoi <nhosoi@redhat.com>
Date: Tue, 23 Aug 2016 14:18:32 -0700
Subject: [PATCH 41/45] Ticket #48967 - passwordMinAge attribute doesn't limit
the minimum age of the password
Description: There was a logic error in check_pw_minage. Password-
MinAge was ignored by the error. This patch fixes the logic error.
https://fedorahosted.org/389/ticket/48967
Reviewed and tested by wibrown@redhat.com and spichugi@redhat.com.
(Thank you, William and Simon!)
(cherry picked from commit 790e723e4f30b3d245535ce7a9d5d00477878341)
---
ldap/servers/slapd/pw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ldap/servers/slapd/pw.c b/ldap/servers/slapd/pw.c
index 6b865ec..7469b9e 100644
--- a/ldap/servers/slapd/pw.c
+++ b/ldap/servers/slapd/pw.c
@@ -729,7 +729,7 @@ check_pw_minage ( Slapi_PBlock *pb, const Slapi_DN *sdn, struct berval **vals)
pwpolicy = new_passwdPolicy(pb, dn);
slapi_pblock_get ( pb, SLAPI_PWPOLICY, &pwresponse_req );
- if (!pb->pb_op->o_isroot && !pwpolicy->pw_minage) {
+ if (!pb->pb_op->o_isroot && pwpolicy->pw_minage) {
Slapi_Entry *e;
char *passwordAllowChangeTime;
--
2.4.11