[Freeipa-devel] [PATCH 133] ipa-range-check: do not treat missing objects as error
Sumit Bose
sbose at redhat.com
Tue Feb 24 17:47:57 UTC 2015
Hi,
this patch changes a return code and should fix
https://fedorahosted.org/freeipa/ticket/4924 .
bye,
Sumit
-------------- next part --------------
From e4a6c8f3cd7975bbb276585ec1ac25a7551f46d0 Mon Sep 17 00:00:00 2001
From: Sumit Bose <sbose at redhat.com>
Date: Tue, 24 Feb 2015 18:32:43 +0100
Subject: [PATCH] ipa-range-check: do not treat missing objects as error
Currently the range check plugin will return a 'Range Check error'
message if a ldapmodify operation tries to change a non-existing object.
Since the range check plugin does not need to care about non-existing
objects we can just return 0 indicating that the range check plugin has
done its work.
Resolves https://fedorahosted.org/freeipa/ticket/4924
---
daemons/ipa-slapi-plugins/ipa-range-check/ipa_range_check.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/daemons/ipa-slapi-plugins/ipa-range-check/ipa_range_check.c b/daemons/ipa-slapi-plugins/ipa-range-check/ipa_range_check.c
index 1fd543c185cda0a7b871875f1d4ba969a7bf910c..5b53a2fe58e1ad0ad6067ea75287f023402bb1c4 100644
--- a/daemons/ipa-slapi-plugins/ipa-range-check/ipa_range_check.c
+++ b/daemons/ipa-slapi-plugins/ipa-range-check/ipa_range_check.c
@@ -545,8 +545,9 @@ static int ipa_range_check_pre_op(Slapi_PBlock *pb, int modtype)
ret = slapi_search_internal_get_entry(dn, NULL, &entry,
ctx->plugin_id);
if (ret != 0 || entry == NULL) {
- LOG_FATAL("Missing entry to modify.\n");
- ret = LDAP_NO_SUCH_OBJECT;
+ LOG("Missing entry to modify.\n");
+ /* No range object, nothing to do. */
+ ret = 0;
goto done;
}
free_entry = true;
--
2.1.0
More information about the Freeipa-devel
mailing list