]> git.ipfire.org Git - thirdparty/glibc.git/commit
Fix multiple nss_compat initgroups() bugs
authorUlrich Drepper <drepper@redhat.com>
Mon, 22 Nov 2010 16:11:24 +0000 (11:11 -0500)
committerAndreas Schwab <schwab@redhat.com>
Wed, 1 Dec 2010 14:35:20 +0000 (15:35 +0100)
commitd1d5508011bfbd594f4d1c61d20b0ab9fb1bdc1d
treef324d85726dfccbeb68070839ac9791fc8260235
parent24990266ba20fcff9fe4f08646350fdece96f27a
Fix multiple nss_compat initgroups() bugs

Compat initgroups() is completely broken; the code will always set
skip_initgroups_dyn to true, so initgroups() will never be actually
called, but due to the nature of the code, setgrent() won't be called
either - thus, subsequent invocations of initgroups() will not return
the NIS group list anymore.

This is a simple patch that makes sure skip_initgroups_dyn is set only
in case initgroups is not available; it also attempts to handle the
unavailability of other NSS interfaces better.

Conflicts:

ChangeLog
(cherry picked from commit 3056dcdb783a177158a5617657d1a33f872358d6)
ChangeLog
nis/nss_compat/compat-initgroups.c