ldap/servers/plugins/automember/automember.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 6ceca021ba37cdcff82841df38fec5c39883f652
Author: Nathan Kinder <nkinder(a)redhat.com>
Date: Wed Aug 24 10:39:24 2011 -0700
Bug 732541 - Ignore error 32 when adding automember config
When you add a new automember config entry, we validate it at the
pre-op stage. Part of this validation includes searching for child
regex rule entries. We use the config entry DN as the search base,
but this fails when a new config entry is being added since it the
entry doesn't yet exist at the pre-op phase. This results in the
new entry being considered invalid, which causes us to return an
unwilling to perform error that blocks the config entry from
being added.
We can safely ignore a LDAP_NO_SUCH_OBJECT error when attempting
to search for child regex rules.
diff --git a/ldap/servers/plugins/automember/automember.c
b/ldap/servers/plugins/automember/automember.c
index 7fd6dab..c469382 100644
--- a/ldap/servers/plugins/automember/automember.c
+++ b/ldap/servers/plugins/automember/automember.c
@@ -624,7 +624,10 @@ automember_parse_config_entry(Slapi_Entry * e, int apply)
slapi_search_internal_pb(search_pb);
slapi_pblock_get(search_pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
- if (LDAP_SUCCESS != result) {
+ /* If this is a new config entry being added, it won't exist yet
+ * when we are simply validating config. We can just ignore no
+ * such object errors. */
+ if ((LDAP_SUCCESS != result) && (LDAP_NO_SUCH_OBJECT != result)) {
slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_parse_config_entry: Error searching "
"for child rule entries for config \"%s\"
(err=%d).",
Show replies by date