An issue was encountered with FreeIPA where mods for the unhashed#user#password attribute are removed from the mods list before their 389 DS password policy plug-in is called. This plug-in expects the unhashed#user#password mod to be present.
After some investigation, it turns out that we correctly move the cleartext password into an unhashed#user#password mod just before we call the preop plug-ins in modify.c. By the time the FreeIPA password policy plug-in is called, the unhashed#user#password mod has been removed from the list of mods. It turns out that this happens when the FreeIPA UUID plug-in passes the mods out and resets them in the pblock:
(gdb) c Continuing. [Switching to Thread 0x7f36667e4700 (LWP 1862)] Hardware watchpoint 7: pb->pb_op->o_params.p.p_modify.modify_mods[9]
Old value = (LDAPMod ) 0x7f36993eb140 New value = (LDAPMod ) 0x0 slapi_ch_free (ptr=ptr@entry=0x7f3699776098) at ldap/servers/slapd/ch_malloc.c:365 365 if(!counters_created) (gdb) bt
pb=pb@entry=0x7f36999641c0, call_one=call_one@entry=0) at ldap/servers/slapd/plugin.c:1453
at ldap/servers/slapd/plugin.c:1415
at ldap/servers/slapd/plugin.c:398
at ldap/servers/slapd/modify.c:1052
The issue here is that pack_mods() is removing mods for attributes that have the "ignore" flag set. The unhashed#user#password mod has this flag set, so it gets removed. This was caused by the patch for ticket #47391. The unhashed#user#password mod can't be deleted, as it's needed for plug-ins like the FreeIPA password policy plug-in and for the replication changelog.
git patch file (master) 0001-Ticket-47419-Unhashed-userpassword-can-accidentally-.patch
Bug description: Change made in commit 4305deeaa41ea8703ebb9ea6529790dd609b3060 sets LDAP_MOD_IGNORE to unhashed password in mods once it's stashed in an entry extenstion. It could be freed any time once pack_mods is called.
Fix description: This patch stops setting LDAP_MOD_IGNORE to unhashed password in mods.
Reviewed by Nathan (Thanks!!)
Pushed to master: commit cce8d346c308f0852aaf6e74775180cb7d8ccfaa Pushed to 389-ds-base-1.3.1: commit f8fabcb4b4adf8cb0d734c385bcfd115c86ec27c Pushed to 389-ds-base-1.3.0: commit e1816e836484132ae9053cf48904cbb6f4855f7c
Linked to Bugzilla bug: https://bugzilla.redhat.com/show_bug.cgi?id=985013 (''Red Hat Enterprise Linux 7'')
Metadata Update from @nhosoi: - Issue assigned to nhosoi - Issue set to the milestone: 1.3.1.3
389-ds-base is moving from Pagure to Github. This means that new issues and pull requests will be accepted only in 389-ds-base's github repository.
This issue has been cloned to Github and is available here: - https://github.com/389ds/389-ds-base/issues/756
If you want to receive further updates on the issue, please navigate to the github issue and click on subscribe button.
subscribe
Thank you for understanding. We apologize for all inconvenience.
Metadata Update from @spichugi: - Issue close_status updated to: wontfix (was: Fixed)