From c254d4a57db83dac48cbfe4a1393cd050b48d2cb Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 4 Feb 2004 17:22:36 +0000 Subject: return NSS_SUCCESS if we have found the max number of gids possible on Solaris; patch from John Klinger (This used to be commit 28c2a74c850c0ead8a7d9f8e09705f587b6fae12) --- source3/nsswitch/winbind_nss_solaris.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'source3/nsswitch') diff --git a/source3/nsswitch/winbind_nss_solaris.c b/source3/nsswitch/winbind_nss_solaris.c index 8f03eb4cd6..1afa567746 100644 --- a/source3/nsswitch/winbind_nss_solaris.c +++ b/source3/nsswitch/winbind_nss_solaris.c @@ -270,10 +270,13 @@ _nss_winbind_getgroupsbymember_solwrap(nss_backend_t* be, void* args) &errnop); /* - * Always return NOTFOUND so nsswitch will get info from all - * the database backends specified in the nsswitch.conf file. - */ - return NSS_STATUS_NOTFOUND; + * If the maximum number of gids have been found, return + * SUCCESS so the switch engine will stop searching. Otherwise + * return NOTFOUND so nsswitch will continue to get groups + * from the remaining database backends specified in the + * nsswitch.conf file. + */ + return (gmem->numgids == gmem->maxgids ? NSS_STATUS_SUCCESS : NSS_STATUS_NOTFOUND); } static NSS_STATUS -- cgit