libselinux: seusers: fix to handle large sets of groups

If a user was in too many groups the check_group function might not pass
a large enough buffer to getgrnam_r to handle things.  This could return
ERANGE which we then aborted.  Instead we should make the buffer larger and
try again.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
1 file changed