Blame SOURCES/0041-Ticket-48967-passwordMinAge-attribute-doesn-t-limit-.patch

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