[SSSD] [PATCH] IPA: Rename label in users_get_send/groups_get_send

Lukas Slebodnik lslebodn at redhat.com
Wed Jun 18 11:13:39 UTC 2014


On (18/06/14 13:08), Lukas Slebodnik wrote:
>On (12/06/14 11:32), Pavel Reichl wrote:
>>On Wed, 2014-06-11 at 15:27 -0400, Simo Sorce wrote:
>>> On Wed, 2014-06-11 at 14:58 +0200, Pavel Reichl wrote:
>>> > Hello,
>>> > 
>>> > please see attached simple patch.
>>> 
>>> Personally I do not like two labels, the idea of having 'done/fail' is
>>> to have one place that terminates and cleans up in all cases.
>>> 
>>> Simo.
>>> 
>>
>>Hello Simo,
>>
>>thanks for comment, I think I misinterpreted the ticket description - my
>>bad. 
>>
>>Updated patch attached.
>>
>>Regards, 
>>PR
>>
>
>>From 8bd471aa7595999c1b027761ac8f237b69977c9a Mon Sep 17 00:00:00 2001
>>From: Pavel Reichl <preichl at redhat.com>
>>Date: Wed, 11 Jun 2014 13:11:19 +0100
>>Subject: [PATCH] IPA: Rename label in users_get_send/groups_get_send
>>
>>Resolves:
>>https://fedorahosted.org/sssd/ticket/2209
>>---
>> src/providers/ldap/ldap_id.c | 62 +++++++++++++++++++++-----------------------
>> 1 file changed, 30 insertions(+), 32 deletions(-)
>>
>>diff --git a/src/providers/ldap/ldap_id.c b/src/providers/ldap/ldap_id.c
>>index 297d6016ee0a64478a57036cd8efc04629a7e701..c788b6bdd6235f5b940d99382b115a2534dbb1d9 100644
>>--- a/src/providers/ldap/ldap_id.c
>>+++ b/src/providers/ldap/ldap_id.c
>>@@ -97,7 +97,7 @@ struct tevent_req *users_get_send(TALLOC_CTX *memctx,
>>     if (!state->op) {
>>         DEBUG(SSSDBG_OP_FAILURE, "sdap_id_op_create failed\n");
>>         ret = ENOMEM;
>>-        goto fail;
>>+        goto done;
>>     }
>> 
>>     state->domain = sdom->dom;
>>@@ -114,7 +114,7 @@ struct tevent_req *users_get_send(TALLOC_CTX *memctx,
>>         attr_name = ctx->opts->user_map[SDAP_AT_USER_NAME].name;
>>         ret = sss_filter_sanitize(state, name, &clean_name);
>>         if (ret != EOK) {
>>-            goto fail;
>>+            goto done;
>>         }
>>         break;
>>     case BE_FILTER_IDNUM:
>>@@ -125,7 +125,7 @@ struct tevent_req *users_get_send(TALLOC_CTX *memctx,
>>             uid = strtouint32(name, &endptr, 10);
>>             if (errno != EOK) {
>>                 ret = EINVAL;
>>-                goto fail;
>>+                goto done;
>>             }
>> 
>>             /* Convert the UID to its objectSID */
>>@@ -142,27 +142,27 @@ struct tevent_req *users_get_send(TALLOC_CTX *memctx,
>adding missing context
>                  if (ret == ENOENT) {
>                      /* Ignore errors to remove users that were not cached previously */
>>                     ret = EOK;
>>                 }
Previous sentence should have been

This is a reason why label should have name "done".

LS



More information about the sssd-devel mailing list