ldap/servers/plugins/mep/mep.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
New commits:
commit b4a4ef568491432a2d3f7287c82612c2d0a75ea6
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Wed May 15 15:01:09 2013 -0400
Ticket 47337 - mep_pre_op: Unable to fetch origin entry
Bug Description: After installing IPA, and adding a hostgroup, an error will be
written
to the error log if you delete this host group(Unable to fetch
origin entry).
This is caused by the referential integrity plugin trying to
cleanup
the deleted entry's membership. This causes the mep plugin to
process the
delete operation, but it can not find the origin entry(because it is
deleted).
Fix Description: If the operation is internal(from a server plugin) do not write the
error
to the standard log level.
https://fedorahosted.org/389/ticket/47337
Reviewed by: richm(Thanks!)
diff --git a/ldap/servers/plugins/mep/mep.c b/ldap/servers/plugins/mep/mep.c
index f8e3c2b..d4835ce 100644
--- a/ldap/servers/plugins/mep/mep.c
+++ b/ldap/servers/plugins/mep/mep.c
@@ -2227,9 +2227,18 @@ mep_pre_op(Slapi_PBlock * pb, int modop)
slapi_entry_free(origin_e);
mep_config_unlock();
} else {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ Slapi_Operation *op;
+
+ slapi_pblock_get(pb, SLAPI_OPERATION, &op);
+ if(operation_is_flag_set(op, OP_FLAG_INTERNAL)){
+ slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ "mep_pre_op: (internal operation) Unable to
fetch "
+ "origin entry \"%s\".\n",
origin_dn);
+ } else {
+ slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
"mep_pre_op: Unable to fetch origin entry
"
"\"%s\".\n", origin_dn);
+ }
}
slapi_ch_free_string(&origin_dn);