On Wed, Feb 22, 2012 at 11:20:54AM +0100, Jakub Hrozek wrote:
On Tue, Feb 21, 2012 at 02:57:25PM -0500, Simo Sorce wrote:
> On Tue, 2012-02-21 at 15:38 +0100, Jakub Hrozek wrote:
> > The cleanup is now simplified due to coping the buffer. There's only
> > one
> > exit from the function which is after the out: label, so unlocking is
> > performed there.
> >
> > Thank you for the review.
>
> After our discussion on IRC I came up with this alternative patch.
>
> Let me know what you think (note: it builds, but I haven't really tested
> it).
>
> Simo.
>
Ok, this is more readable than my original patch.
Squash in the attached one liner and you'll get an ack :-)
One more thing..can you also add a check to return EINVAL or similar in
case sss_nss_get_getgr_cache is called for GETGR_NAME with a NULL name
(and vice versa for GID).