Re: [PATCH] util: Improve error reporting from getgrnam_r and friends

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/08/2012 06:54 AM, Peter Krempa wrote:
> Error reporting for getgrnam_r() isn't that broken as in getgrnam().
> 
> This patch enhances virGetUserIDByName() and virGetGroupIDByName() so
> that they error out if retrieval of the information failed but just log
> a debug message if the entry was not found.

I agree that this is needed.

> 
>>From the man page for getgrnam_r():
> 
> RETURN VALUE
>   ...
>   On success, getgrnam_r() and getgrgid_r() return zero, and set *result
>   to grp.  If no matching group record was found, these functions return
>   0 and store NULL in *result.  In case of error, an error number is
>   returned, and NULL is stored in *result.
> ---
> This patch has to be applied on top of:
> http://www.redhat.com/archives/libvir-list/2012-October/msg00190.html

However, this is a bit worrisome, since I had review comments on that
series.  Can we get these patches merged together into a single series,
to make sure that the final version going in is clean?

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]