File 0029-bsc1170715-ITS-8327-fix-ppolicy_get_default.patch of Package openldap2.17838

From 3a305253a09a637cc86c4941cbadab0c0ca4f2dd Mon Sep 17 00:00:00 2001
From: Howard Chu <hyc@openldap.org>
Date: Thu, 3 Dec 2015 00:58:33 +0000
Subject: [PATCH] ITS#8327 fix ppolicy_get_default

pwdMaxRecordedFailure must never be zero
---
 servers/slapd/overlays/ppolicy.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/servers/slapd/overlays/ppolicy.c b/servers/slapd/overlays/ppolicy.c
index 58a91cdb9..e2fc9a559 100644
--- a/servers/slapd/overlays/ppolicy.c
+++ b/servers/slapd/overlays/ppolicy.c
@@ -483,6 +483,8 @@ ppolicy_get( Operation *op, Entry *e, PassPolicy *pp )
 
 	/* Users can change their own password by default */
     	pp->pwdAllowUserChange = 1;
+	if ( !pp->pwdMaxRecordedFailure )
+		pp->pwdMaxRecordedFailure = PPOLICY_DEFAULT_MAXRECORDED_FAILURE;
 
 	if ((a = attr_find( e->e_attrs, ad_pwdPolicySubentry )) == NULL) {
 		/*
-- 
2.16.4
openSUSE Build Service is sponsored by