979ee0
From 0335e799ce5f73a1a1e9901fb5e9c85aaa718ecd Mon Sep 17 00:00:00 2001
979ee0
From: Thierry Bordaz <tbordaz@redhat.com>
979ee0
Date: Tue, 24 Jul 2018 12:16:35 +0200
979ee0
Subject: [PATCH] In IPA 4.4 when updating userpassword with ldapmodify does
979ee0
 not update krbPasswordExpiration nor krbLastPwdChange
979ee0
979ee0
When making ipa-pwd-extop TXN aware, some callbacks are call twice.
979ee0
Particularily
979ee0
	ipapwd_pre_add is called during PRE_ADD and TXN_PRE_ADD
979ee0
	ipapwd_pre_mod is called during PRE_MOD and TXN_PRE_MOD
979ee0
	ipapwd_post_modadd is called during POST_ADD and TXN_POST_ADD
979ee0
	ipapwd_post_modadd is called during POST_MOD and TXN_POST_MOD
979ee0
It is not the expected behavior and it results on some skipped updates krbPasswordExpiration
979ee0
and krbLastPwdChange
979ee0
979ee0
https://pagure.io/freeipa/issue/7601
979ee0
979ee0
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
979ee0
---
979ee0
 daemons/ipa-slapi-plugins/ipa-pwd-extop/prepost.c | 4 ----
979ee0
 1 file changed, 4 deletions(-)
979ee0
979ee0
diff --git a/daemons/ipa-slapi-plugins/ipa-pwd-extop/prepost.c b/daemons/ipa-slapi-plugins/ipa-pwd-extop/prepost.c
979ee0
index c62eae33418f8368c831a91f611915addf7d423b..209d596255d05bfd03de432b7930e6406cc025dc 100644
979ee0
--- a/daemons/ipa-slapi-plugins/ipa-pwd-extop/prepost.c
979ee0
+++ b/daemons/ipa-slapi-plugins/ipa-pwd-extop/prepost.c
979ee0
@@ -1488,8 +1488,6 @@ int ipapwd_pre_init(Slapi_PBlock *pb)
979ee0
     ret = slapi_pblock_set(pb, SLAPI_PLUGIN_VERSION, SLAPI_PLUGIN_VERSION_01);
979ee0
     if (!ret) ret = slapi_pblock_set(pb, SLAPI_PLUGIN_DESCRIPTION, (void *)&ipapwd_plugin_desc);
979ee0
     if (!ret) ret = slapi_pblock_set(pb, SLAPI_PLUGIN_PRE_BIND_FN, (void *)ipapwd_pre_bind);
979ee0
-    if (!ret) ret = slapi_pblock_set(pb, SLAPI_PLUGIN_PRE_ADD_FN, (void *)ipapwd_pre_add);
979ee0
-    if (!ret) ret = slapi_pblock_set(pb, SLAPI_PLUGIN_PRE_MODIFY_FN, (void *)ipapwd_pre_mod);
979ee0
 
979ee0
     return ret;
979ee0
 }
979ee0
@@ -1513,9 +1511,7 @@ int ipapwd_post_init(Slapi_PBlock *pb)
979ee0
 
979ee0
     ret = slapi_pblock_set(pb, SLAPI_PLUGIN_VERSION, SLAPI_PLUGIN_VERSION_01);
979ee0
     if (!ret) ret = slapi_pblock_set(pb, SLAPI_PLUGIN_DESCRIPTION, (void *)&ipapwd_plugin_desc);
979ee0
-    if (!ret) ret = slapi_pblock_set(pb, SLAPI_PLUGIN_POST_ADD_FN, (void *)ipapwd_post_modadd);
979ee0
     if (!ret) ret = slapi_pblock_set(pb, SLAPI_PLUGIN_POST_DELETE_FN, (void *)ipapwd_post_updatecfg);
979ee0
-    if (!ret) ret = slapi_pblock_set(pb, SLAPI_PLUGIN_POST_MODIFY_FN, (void *)ipapwd_post_modadd);
979ee0
     if (!ret) ret = slapi_pblock_set(pb, SLAPI_PLUGIN_POST_MODRDN_FN, (void *)ipapwd_post_updatecfg);
979ee0
 
979ee0
     return ret;
979ee0
-- 
979ee0
2.17.1
979ee0