From f8fabcb4b4adf8cb0d734c385bcfd115c86ec27c Mon Sep 17 00:00:00 2001 From: Noriko Hosoi Date: Jul 03 2013 02:01:49 +0000 Subject: Ticket #47419 - Unhashed userpassword can accidentally get removed from mods 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. https://fedorahosted.org/389/ticket/47419 Reviewed by Nathan (Thank you!!) (cherry picked from commit cce8d346c308f0852aaf6e74775180cb7d8ccfaa) --- diff --git a/ldap/servers/slapd/entry.c b/ldap/servers/slapd/entry.c index 4830a3f..ba7f338 100644 --- a/ldap/servers/slapd/entry.c +++ b/ldap/servers/slapd/entry.c @@ -3495,7 +3495,6 @@ slapi_entry_apply_mod_extension(Slapi_Entry *e, const LDAPMod *mod, int modcnt) rc = 0; break; } - ((LDAPMod *)mod)->mod_op = LDAP_MOD_IGNORE; /* we don't need it any more */ } } bail: