[SSSD] [PATCH] Fix two errors in the nss responder

Sumit Bose sbose at redhat.com
Fri Oct 19 16:18:30 UTC 2012


Hi,

while testing other stuff I found those two issues.

bye,
Sumit
-------------- next part --------------
From 7c65a85f1b75c2b0c1f24039ecc6e808ed871753 Mon Sep 17 00:00:00 2001
From: Sumit Bose <sbose at redhat.com>
Date: Fri, 19 Oct 2012 18:10:43 +0200
Subject: [PATCH] Fix two errors in the nss responder

One is a copy-and-paste error which was introduce by
1774ee9a61b9d691dadd1a0538f32bcdcc84f72f.

The second fixes a missing explicit setting of the return value. In the
case where we want fully qualified names ret contains the number of
characters from the last snprintf() which is almost ever not 0.
---
 src/responder/nss/nsssrv_cmd.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c
index ec25611..036e88f 100644
--- a/src/responder/nss/nsssrv_cmd.c
+++ b/src/responder/nss/nsssrv_cmd.c
@@ -1869,6 +1869,8 @@ static int fill_members(struct sss_packet *packet,
         memnum++;
     }
 
+    ret = 0;
+
 done:
     *_memnum = memnum;
     *_rzero = rzero;
@@ -2689,7 +2691,7 @@ static void nss_cmd_getgrgid_cb(struct tevent_req *req)
     ret = nss_cmd_getgrgid_search(dctx);
     if (ret == EOK) {
         /* we have results to return */
-        ret = nss_cmd_getpw_send_reply(dctx, true);
+        ret = nss_cmd_getgr_send_reply(dctx, true);
     }
 
 done:
-- 
1.7.7.6



More information about the sssd-devel mailing list