Blame SOURCES/0003-Issue-50529-LDAP-server-returning-PWP-controls-in-di.patch

a3727e
From 606b7b6a45f6e2014119d0716774323f30862e0c Mon Sep 17 00:00:00 2001
a3727e
From: Mark Reynolds <mreynolds@redhat.com>
a3727e
Date: Fri, 2 Aug 2019 12:07:07 -0400
a3727e
Subject: [PATCH] Issue 50529 -  LDAP server returning PWP controls in
a3727e
 different sequence
a3727e
a3727e
Description:  The server returns password policy controls in different orders
a3727e
              depending on the state of grace logins.  The requested control,
a3727e
              if any, should be returned first, followed by any controls the
a3727e
              server might add.
a3727e
a3727e
relates: https://pagure.io/389-ds-base/issue/50529
a3727e
a3727e
Reviewed by: mreynolds (one line commit rule)
a3727e
---
a3727e
 ldap/servers/slapd/pw_mgmt.c | 2 +-
a3727e
 1 file changed, 1 insertion(+), 1 deletion(-)
a3727e
a3727e
diff --git a/ldap/servers/slapd/pw_mgmt.c b/ldap/servers/slapd/pw_mgmt.c
a3727e
index befac50cd..ca76fc12f 100644
a3727e
--- a/ldap/servers/slapd/pw_mgmt.c
a3727e
+++ b/ldap/servers/slapd/pw_mgmt.c
a3727e
@@ -207,10 +207,10 @@ skip:
a3727e
 
a3727e
         /* password expired and user exceeded limit of grace attemps.
a3727e
          * Send result and also the control */
a3727e
-        slapi_add_pwd_control(pb, LDAP_CONTROL_PWEXPIRED, 0);
a3727e
         if (pwresponse_req) {
a3727e
             slapi_pwpolicy_make_response_control(pb, -1, -1, LDAP_PWPOLICY_PWDEXPIRED);
a3727e
         }
a3727e
+        slapi_add_pwd_control(pb, LDAP_CONTROL_PWEXPIRED, 0);
a3727e
         slapi_send_ldap_result(pb, LDAP_INVALID_CREDENTIALS, NULL,
a3727e
                                "password expired!", 0, NULL);
a3727e
 
a3727e
-- 
a3727e
2.21.0
a3727e