mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-11-02 20:30:26 -06:00
slapi-plugins: Add replication checking to the Modrdn plugin
The Modrdn plugin doesn't check whether the operation it processes is replicated. This results in duplicate operations on each replica, for example, when deleting a saved user. To fix this behavior, a check was added to the Modrdn plugin that the operation is not replicated. Fixes: https://pagure.io/freeipa/issue/9867 Signed-off-by: vectinx <vectinx@yandex.ru> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
1 parent
b38b681480
commit
a4a218b4eb
1 file changed
+12
@@ -709,6 +709,7 @@ static int ipamodrdn_post_op(Slapi_PBlock *pb)
|
||||
Slapi_Attr *sattr = NULL;
|
||||
Slapi_Attr *tattr = NULL;
|
||||
int ret = LDAP_SUCCESS;
|
||||
int is_repl_op;
|
||||
|
||||
LOG_TRACE("--in-->\n");
|
||||
|
||||
@@ -717,6 +718,17 @@ static int ipamodrdn_post_op(Slapi_PBlock *pb)
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (slapi_pblock_get(pb, SLAPI_IS_REPLICATED_OPERATION, &is_repl_op) != 0) {
|
||||
LOG_FATAL("unable to retrieve replication operation status\n");
|
||||
ret = LDAP_OPERATIONS_ERROR;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* pass through if this is a replicated operation */
|
||||
if (is_repl_op) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
slapi_pblock_get(pb, SLAPI_ENTRY_POST_OP, &e);
|
||||
if (NULL == e) {
|
||||
goto done;
|
||||
|
||||
Reference in new issue
Block a user