Bug 2126383 - update_pw_encoding - Could not read password attribute with chain on update
Summary: update_pw_encoding - Could not read password attribute with chain on update
Keywords:
Status: NEW
Alias: None
Product: Red Hat Directory Server
Classification: Red Hat
Component: 389-ds-base
Version: 12.1
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: DS12.2
: dirsrv-12.3
Assignee: LDAP Maintainers
QA Contact: LDAP QA Team
Zuzana Zoubkova
URL:
Whiteboard: sync-to-jira
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-09-13 09:59 UTC by Anton Bobrov
Modified: 2023-07-13 11:17 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker IDMDS-2639 0 None None None 2022-11-16 16:25:51 UTC

Description Anton Bobrov 2022-09-13 09:59:10 UTC
Description of problem:

When chain on update feature is enabled and userpassword attribute value has to be updated on bind (eg due to new default password storage scheme) the update_pw_encoding() logs WARNing messages like these

[26/Aug/2022:15:00:51.987076753 +0000] - WARN - update_pw_encoding - Could not read password attribute on '<DN>'

Regardless of whether or not a local bind should chain update_pw_encoding(), the message is misleading so it should be addressed either by chaining such updates if needed or not attempting them in the first place for remote backends.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Anton Bobrov 2022-09-13 10:07:23 UTC
diff --git a/ldap/servers/slapd/bind.c b/ldap/servers/slapd/bind.c
index a1f00005c..e76207c55 100644
--- a/ldap/servers/slapd/bind.c
+++ b/ldap/servers/slapd/bind.c
@@ -799,7 +799,8 @@ do_bind(Slapi_PBlock *pb)
                      * if it was successful, and if we used a PW (else we replace the pw
                      * with the token, which would be bad!)
                      */
-                    if (pb_conn->c_bind_auth_token == 0 && config_get_enable_upgrade_hash()) {
+                    if (pb_conn->c_bind_auth_token == 0 && config_get_enable_upgrade_hash() &&
+                        !slapi_be_is_flag_set(be, SLAPI_BE_FLAG_REMOTE_DATA)) {
                         update_pw_encoding(pb, bind_target_entry, sdn, cred.bv_val);
                     }

This blind fix should silence it however the problem should probably be addressed in the chain on update feature instead.


Note You need to log in before you can comment on or make changes to this bug.