Re: [Freeipa-devel] [PATCH] extdom: return LDAP_NO_SUCH_OBJECT to the client

2015-03-18 Thread Jan Cholasta

Dne 10.3.2015 v 11:57 Tomas Babej napsal(a):


On 03/05/2015 07:28 AM, Alexander Bokovoy wrote:

On Wed, 04 Mar 2015, Sumit Bose wrote:

Hi,

with this patch the extdom plugin will properly indicate to a client if
the search object does not exist instead of returning a generic error.
This is important for the client to act accordingly and improve
debugging possibilities.

bye,
Sumit



From 3895fa21524efc3a22bfb36b1a9aa34277b8dd46 Mon Sep 17 00:00:00 2001
From: Sumit Bose 
Date: Wed, 4 Mar 2015 13:39:04 +0100
Subject: [PATCH] extdom: return LDAP_NO_SUCH_OBJECT to the client

---
daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c | 8
++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git
a/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c
b/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c
index
a70ed20f1816a7e00385edae8a81dd5dad9e9362..a040f2beba073d856053429face2f464347b2524
100644
--- a/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c
+++ b/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c
@@ -123,8 +123,12 @@ static int ipa_extdom_extop(Slapi_PBlock *pb)

ret = handle_request(ctx, req, &ret_val);
if (ret != LDAP_SUCCESS) {
-rc = LDAP_OPERATIONS_ERROR;
-err_msg = "Failed to handle the request.\n";
+if (ret == LDAP_NO_SUCH_OBJECT) {
+rc = LDAP_NO_SUCH_OBJECT;
+} else {
+rc = LDAP_OPERATIONS_ERROR;
+err_msg = "Failed to handle the request.\n";
+}
goto done;
}

--
2.1.0


ACK.



Pushed to master: 024463804c0c73e89ed76e709a838762a8302f04



and to ipa-4-1: c55632374d3b41e23521461667da1699a7264947

--
Jan Cholasta

--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code


Re: [Freeipa-devel] [PATCH] extdom: return LDAP_NO_SUCH_OBJECT to the client

2015-03-10 Thread Tomas Babej


On 03/05/2015 07:28 AM, Alexander Bokovoy wrote:

On Wed, 04 Mar 2015, Sumit Bose wrote:

Hi,

with this patch the extdom plugin will properly indicate to a client if
the search object does not exist instead of returning a generic error.
This is important for the client to act accordingly and improve
debugging possibilities.

bye,
Sumit



From 3895fa21524efc3a22bfb36b1a9aa34277b8dd46 Mon Sep 17 00:00:00 2001
From: Sumit Bose 
Date: Wed, 4 Mar 2015 13:39:04 +0100
Subject: [PATCH] extdom: return LDAP_NO_SUCH_OBJECT to the client

---
daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c | 8 
++--

1 file changed, 6 insertions(+), 2 deletions(-)

diff --git 
a/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c 
b/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c
index 
a70ed20f1816a7e00385edae8a81dd5dad9e9362..a040f2beba073d856053429face2f464347b2524 
100644

--- a/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c
+++ b/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c
@@ -123,8 +123,12 @@ static int ipa_extdom_extop(Slapi_PBlock *pb)

ret = handle_request(ctx, req, &ret_val);
if (ret != LDAP_SUCCESS) {
-rc = LDAP_OPERATIONS_ERROR;
-err_msg = "Failed to handle the request.\n";
+if (ret == LDAP_NO_SUCH_OBJECT) {
+rc = LDAP_NO_SUCH_OBJECT;
+} else {
+rc = LDAP_OPERATIONS_ERROR;
+err_msg = "Failed to handle the request.\n";
+}
goto done;
}

--
2.1.0


ACK.



Pushed to master: 024463804c0c73e89ed76e709a838762a8302f04

--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code


Re: [Freeipa-devel] [PATCH] extdom: return LDAP_NO_SUCH_OBJECT to the client

2015-03-04 Thread Alexander Bokovoy

On Wed, 04 Mar 2015, Sumit Bose wrote:

Hi,

with this patch the extdom plugin will properly indicate to a client if
the search object does not exist instead of returning a generic error.
This is important for the client to act accordingly and improve
debugging possibilities.

bye,
Sumit



From 3895fa21524efc3a22bfb36b1a9aa34277b8dd46 Mon Sep 17 00:00:00 2001
From: Sumit Bose 
Date: Wed, 4 Mar 2015 13:39:04 +0100
Subject: [PATCH] extdom: return LDAP_NO_SUCH_OBJECT to the client

---
daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c 
b/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c
index 
a70ed20f1816a7e00385edae8a81dd5dad9e9362..a040f2beba073d856053429face2f464347b2524
 100644
--- a/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c
+++ b/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c
@@ -123,8 +123,12 @@ static int ipa_extdom_extop(Slapi_PBlock *pb)

ret = handle_request(ctx, req, &ret_val);
if (ret != LDAP_SUCCESS) {
-rc = LDAP_OPERATIONS_ERROR;
-err_msg = "Failed to handle the request.\n";
+if (ret == LDAP_NO_SUCH_OBJECT) {
+rc = LDAP_NO_SUCH_OBJECT;
+} else {
+rc = LDAP_OPERATIONS_ERROR;
+err_msg = "Failed to handle the request.\n";
+}
goto done;
}

--
2.1.0


ACK.

--
/ Alexander Bokovoy

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


[Freeipa-devel] [PATCH] extdom: return LDAP_NO_SUCH_OBJECT to the client

2015-03-04 Thread Sumit Bose
Hi,

with this patch the extdom plugin will properly indicate to a client if
the search object does not exist instead of returning a generic error.
This is important for the client to act accordingly and improve
debugging possibilities.

bye,
Sumit
From 3895fa21524efc3a22bfb36b1a9aa34277b8dd46 Mon Sep 17 00:00:00 2001
From: Sumit Bose 
Date: Wed, 4 Mar 2015 13:39:04 +0100
Subject: [PATCH] extdom: return LDAP_NO_SUCH_OBJECT to the client

---
 daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c 
b/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c
index 
a70ed20f1816a7e00385edae8a81dd5dad9e9362..a040f2beba073d856053429face2f464347b2524
 100644
--- a/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c
+++ b/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c
@@ -123,8 +123,12 @@ static int ipa_extdom_extop(Slapi_PBlock *pb)
 
 ret = handle_request(ctx, req, &ret_val);
 if (ret != LDAP_SUCCESS) {
-rc = LDAP_OPERATIONS_ERROR;
-err_msg = "Failed to handle the request.\n";
+if (ret == LDAP_NO_SUCH_OBJECT) {
+rc = LDAP_NO_SUCH_OBJECT;
+} else {
+rc = LDAP_OPERATIONS_ERROR;
+err_msg = "Failed to handle the request.\n";
+}
 goto done;
 }
 
-- 
2.1.0

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel