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