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

Pavel Březina pbrezina at redhat.com
Tue Apr 3 07:17:41 UTC 2012


On 03/26/2012 08:57 PM, Jakub Hrozek wrote:
> 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.

Ok. The new patch tests ret instead of errnop and frees repbuf even in 
error branch. This should make the Coverity happy.

I didn't found a ticket for what you suggested so I created one:
https://fedorahosted.org/sssd/ticket/1285




More information about the sssd-devel mailing list