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

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

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():
>   ...
>   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 redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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