]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9863 - Forward lastbind updates if configured
authorQuanah Gibson-Mount <quanah@openldap.org>
Thu, 23 Jun 2022 17:03:07 +0000 (17:03 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Wed, 6 Jul 2022 20:46:49 +0000 (20:46 +0000)
Mark lastbind operations as being on the frontendDB so that chaining configurations are honored.

Make pwdLastSuccess flag SLAP_AT_MANAGEABLE

servers/slapd/back-ldap/bind.c
servers/slapd/bind.c
servers/slapd/schema_prep.c

index cad7cfe691da1a0e130314bce7313ec519780aee..02fb60ea360563007521f184c5b068c19eeeeab6 100644 (file)
@@ -1417,7 +1417,7 @@ retry_lock:;
                                sb->sb_realm.bv_val,
                                sb->sb_authcId.bv_val,
                                sb->sb_cred.bv_val,
-                               NULL );
+                               sb->sb_authzId.bv_val );
                if ( defaults == NULL ) {
                        rs->sr_err = LDAP_OTHER;
                        LDAP_BACK_CONN_ISBOUND_CLEAR( lc );
index 1a74a8cd478f0961a12d8d094870e407b0b3beef..4b8eda69b5d747625cc55d2f046c7ccedd0890c6 100644 (file)
@@ -472,9 +472,6 @@ fe_op_lastbind( Operation *op )
        op2.o_dn = op->o_bd->be_rootdn;
        op2.o_ndn = op->o_bd->be_rootndn;
 
-       /*
-        * TODO: this is core+frontend, not everything works the same way?
-        */
        /*
         * Code for forwarding of updates adapted from ppolicy.c of slapo-ppolicy
         *
@@ -485,6 +482,8 @@ fe_op_lastbind( Operation *op )
         * must be configured appropriately for this to be useful.
         */
        if ( SLAP_SHADOW( op->o_bd ) ) {
+               op2.o_bd = frontendDB;
+
                /* Must use Relax control since these are no-user-mod */
                op2.o_relax = SLAP_CONTROL_CRITICAL;
                op2.o_ctrls = ca;
index 2c557905c3f9b4d0742604c963436bf4d9938071..b8793f50f14e7a7eff38c6827099b0784215471d 100644 (file)
@@ -1028,7 +1028,7 @@ static struct slap_schema_ad_map {
                        "SINGLE-VALUE "
                        "NO-USER-MODIFICATION "
                        "USAGE directoryOperation )",
-               NULL, 0,
+               NULL, SLAP_AT_MANAGEABLE,
                NULL, NULL,
                NULL, NULL, NULL, NULL, NULL,
                offsetof(struct slap_internal_schema, si_ad_pwdLastSuccess) },