nss_winbind: fix hang on Solaris on big groups
commitd3e51b9cfe3d56530253571e020af72da1877044
authorBjörn Jacke <bj@sernet.de>
Thu, 10 Sep 2015 12:35:32 +0000 (10 14:35 +0200)
committerBjoern Jacke <bj@sernet.de>
Thu, 10 Sep 2015 22:34:30 +0000 (11 00:34 +0200)
tree4a3beaa59e4a21cdf194f11b015487b9e668d57b
parenta997c7780e69117bcc18b43834275d9bb332c4ad
nss_winbind: fix hang on Solaris on big groups

The problem with large groups on Solaris in the the NSS winbind module is
Solaris wants the return value to be NSS_UNAVAIL if the buffer given is too
small for getgrnam_r.  The current code return NSS_TRYAGAIN which causes
Solaris/Illumos to loop without trying to resize the buffer.

Thanks to  Nathan Huff <nhuff@acm.org> for finding this out.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10365

Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: Ralph Böhme <rb@sernet.de>
nsswitch/winbind_nss_solaris.c