summaryrefslogtreecommitdiffstats
path: root/src/sss_client
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2012-04-03 09:13:06 +0200
committerStephen Gallagher <sgallagh@redhat.com>2012-04-18 10:23:56 -0400
commitdc2750954d694eeef46ec9bf31c7f675b2b1fb27 (patch)
treec9ecfb0acfeedad402d7a414d50202c11087d2b9 /src/sss_client
parentf001756e1de68175c37b9353b88576717a9da55f (diff)
downloadsssd_unused-dc2750954d694eeef46ec9bf31c7f675b2b1fb27.zip
sssd_unused-dc2750954d694eeef46ec9bf31c7f675b2b1fb27.tar.gz
sssd_unused-dc2750954d694eeef46ec9bf31c7f675b2b1fb27.tar.xz
sudo api: check sss_status instead of errnop in sss_sudo_send_recv_generic()
Diffstat (limited to 'src/sss_client')
-rw-r--r--src/sss_client/sudo/sss_sudo.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sss_client/sudo/sss_sudo.c b/src/sss_client/sudo/sss_sudo.c
index cb3c746..378df98 100644
--- a/src/sss_client/sudo/sss_sudo.c
+++ b/src/sss_client/sudo/sss_sudo.c
@@ -51,8 +51,9 @@ static int sss_sudo_send_recv_generic(enum sss_cli_command command,
errnop = 0;
ret = sss_sudo_make_request(command, request,
&reply_buf, &reply_len, &errnop);
- if (errnop != EOK) {
- return errnop;
+ if (ret != SSS_STATUS_SUCCESS) {
+ ret = errnop;
+ goto done;
}
/* parse structure */
@@ -60,6 +61,7 @@ static int sss_sudo_send_recv_generic(enum sss_cli_command command,
ret = sss_sudo_parse_response((const char*)reply_buf, reply_len,
_result, _error);
+done:
free(reply_buf);
return ret;
}