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

Marcelo Cerri mhcerri at linux.vnet.ibm.com
Mon Oct 8 18:30:09 UTC 2012


I'll squash it so. I think it makes more sense to have these things merged.

On Mon, Oct 08, 2012 at 07:34:26PM +0200, Peter Krempa wrote:
> On 10/08/12 19:16, Eric Blake wrote:
> >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?
> >
> 
> I don't mind if Marcelo squashes this into his series in the next
> version. If he doesn't I'll re-send it.
> 
> Peter
> 




More information about the libvir-list mailing list