summaryrefslogtreecommitdiff
path: root/src/responder/nss/nsssrv_cmd.c
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2012-10-19 18:10:43 +0200
committerJakub Hrozek <jhrozek@redhat.com>2012-10-23 15:26:33 +0200
commita489aec7d328ad4fd8f420e1ac011c1fdc247465 (patch)
treea02924e24186468a37b12f1a9bbf9d6f0a133247 /src/responder/nss/nsssrv_cmd.c
parent66318dfe1e7138ff3fc780c4b3f0b29c4b2d8712 (diff)
downloadsssd-a489aec7d328ad4fd8f420e1ac011c1fdc247465.tar.gz
sssd-a489aec7d328ad4fd8f420e1ac011c1fdc247465.tar.bz2
sssd-a489aec7d328ad4fd8f420e1ac011c1fdc247465.zip
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.
Diffstat (limited to 'src/responder/nss/nsssrv_cmd.c')
-rw-r--r--src/responder/nss/nsssrv_cmd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c
index ec256112..036e88f4 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: