[SSSD] [PATCH] Fix return value of attr_name_val_split()

Sumit Bose sbose at redhat.com
Thu Jun 12 08:31:26 UTC 2014


On Thu, Jun 12, 2014 at 09:21:55AM +0200, Lukas Slebodnik wrote:
> On (11/06/14 20:54), Sumit Bose wrote:
> >Hi,
> >
> >I found this wrong return value. I've checked the other recent posting
> >and didn't found a patch for this. If someone already send a patch for
> >this please point me to the right thread so that I can ack it.
> >
> >bye,
> >Sumit
> 
> >From 9c3d4f637d80448922779b093fc4a2da909054e4 Mon Sep 17 00:00:00 2001
> >From: Sumit Bose <sbose at redhat.com>
> >Date: Wed, 11 Jun 2014 20:49:31 +0200
> >Subject: [PATCH] Fix return value of attr_name_val_split()
> >
> >---
> > src/tools/sss_sync_ops.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/src/tools/sss_sync_ops.c b/src/tools/sss_sync_ops.c
> >index 232a711..667c8a6 100644
> >--- a/src/tools/sss_sync_ops.c
> >+++ b/src/tools/sss_sync_ops.c
> >@@ -83,7 +83,7 @@ static int attr_name_val_split(TALLOC_CTX *mem_ctx, const char *nameval,
> >     ret = EOK;
> > done:
> >     talloc_free(tmp_ctx);
> >-    return EOK;
> >+    return ret;
> ACK,
> but could you also change the same problem in "static int attr_op"
> (the same file).

Thank you, good catch, new version attached.

bye,
Sumit

> 
> LS
> _______________________________________________
> sssd-devel mailing list
> sssd-devel at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
-------------- next part --------------
From 1bcb5a8a6e9d4c032d5599ee900002a863ae8a4a Mon Sep 17 00:00:00 2001
From: Sumit Bose <sbose at redhat.com>
Date: Wed, 11 Jun 2014 20:49:31 +0200
Subject: [PATCH] Fix return value of attr_name_val_split() and attr_op()

---
 src/tools/sss_sync_ops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/tools/sss_sync_ops.c b/src/tools/sss_sync_ops.c
index 232a711..fd401cb 100644
--- a/src/tools/sss_sync_ops.c
+++ b/src/tools/sss_sync_ops.c
@@ -83,7 +83,7 @@ static int attr_name_val_split(TALLOC_CTX *mem_ctx, const char *nameval,
     ret = EOK;
 done:
     talloc_free(tmp_ctx);
-    return EOK;
+    return ret;
 }
 
 static int attr_op(struct ops_ctx *octx, const char *nameval, int op)
@@ -131,7 +131,7 @@ static int attr_op(struct ops_ctx *octx, const char *nameval, int op)
     ret = sysdb_set_user_attr(octx->domain, octx->name, attrs, op);
 done:
     talloc_free(tmp_ctx);
-    return EOK;
+    return ret;
 }
 /*
  * Generic modify groups member
-- 
1.8.3.1



More information about the sssd-devel mailing list