summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/back-nis.c56
1 files changed, 4 insertions, 52 deletions
diff --git a/src/back-nis.c b/src/back-nis.c
index 1361cb0..7d34079 100644
--- a/src/back-nis.c
+++ b/src/back-nis.c
@@ -945,58 +945,8 @@ bool_t
backend_entry_is_a_set(struct plugin_state *state,
Slapi_PBlock *pb, Slapi_Entry *e)
{
- Slapi_DN *entry_sdn, *plugin_sdn;
- Slapi_Filter *filter;
- bool_t ret;
- char map_configuration_filter[] = NIS_MAP_CONFIGURATION_FILTER;
-
- /* First, just do the scope test. */
- entry_sdn = slapi_sdn_new_ndn_byref(slapi_entry_get_ndn(e));
- if (entry_sdn == NULL) {
- return FALSE;
- } else {
- plugin_sdn = slapi_sdn_new_dn_byval(state->plugin_base);
- if (plugin_sdn == NULL) {
- slapi_sdn_free(&entry_sdn);
- return FALSE;
- }
- }
- if (slapi_sdn_scope_test(entry_sdn,
- plugin_sdn,
- LDAP_SCOPE_ONE) == 0) {
- /* Didn't match. */
- slapi_log_error(SLAPI_LOG_PLUGIN,
- state->plugin_desc->spd_id,
- "entry \"%s\" is not a child of \"%s\"\n",
- slapi_sdn_get_ndn(entry_sdn),
- slapi_sdn_get_ndn(plugin_sdn));
- ret = FALSE;
- } else {
- ret = TRUE;
- }
- slapi_sdn_free(&plugin_sdn);
- slapi_sdn_free(&entry_sdn);
- /* If it's actually part of our configuration tree, check if it's a
- * valid entry. */
- if (ret) {
- filter = slapi_str2filter(map_configuration_filter);
- if (filter != NULL) {
- if (slapi_vattr_filter_test(pb, e, filter, 0) != 0) {
- /* Didn't match. */
- slapi_log_error(SLAPI_LOG_PLUGIN,
- state->plugin_desc->spd_id,
- "entry \"%s\" doesn't look "
- "like a map configuration "
- "(didn't match filter "
- "\"%s\")\n",
- slapi_sdn_get_ndn(entry_sdn),
- NIS_MAP_CONFIGURATION_FILTER);
- ret = FALSE;
- }
- slapi_filter_free(filter, 1);
- }
- }
- return ret;
+ return backend_shr_entry_is_a_set(state, pb, e,
+ NIS_MAP_CONFIGURATION_FILTER);
}
/* Scan for the list of configured domains and maps. */
@@ -1010,5 +960,7 @@ backend_startup(struct plugin_state *state)
void
backend_init(Slapi_PBlock *pb, struct plugin_state *state)
{
+ slapi_log_error(SLAPI_LOG_PLUGIN, state->plugin_desc->spd_id,
+ "hooking up postoperation callbacks\n");
backend_shr_postop_init(pb, state);
}