[SSSD] [PATCH] sudo api: return only errno in sss_sudo_make_request()

Jakub Hrozek jhrozek at redhat.com
Mon Mar 26 18:57:42 UTC 2012


On Fri, Mar 23, 2012 at 01:04:52PM +0100, Pavel Březina wrote:
> https://fedorahosted.org/sssd/ticket/1233
> 
> As Jakub suggested, I changed sss_sudo_make_request() to return only
> errno code, instead of errno and sss_status. I hope this will make the
> Coverity happy.

Sorry, that's not exactly what I had mind. I was thinking about
modifying sss_cli_check_socket() and sss_cli_make_request_nochecks() to
not return separate sss_status and errno return codes but only errno.
This patch only modifies the sudo caller of the two functions.

The catch is that especially with NSS calls, some errors are
recoverable. Notably the combination of NSS_STATUS_TRYAGAIN and ERANGE
tells the glibc to retry the lookup with a bigger buffer. So should we
only use one return code, we would have to account for this case, too.



More information about the sssd-devel mailing list