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

Pavel Březina pbrezina at redhat.com
Tue Apr 3 08:22:37 UTC 2012


On 04/03/2012 09:17 AM, Pavel Březina wrote:
> 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

Now with the patch attached :-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Memory-leak-in-sss_sudo_send_recv_generic.patch
Type: text/x-patch
Size: 1171 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120403/ba6cdc61/attachment.bin>


More information about the sssd-devel mailing list