summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbind_nss_solaris.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/nsswitch/winbind_nss_solaris.c')
-rw-r--r--source3/nsswitch/winbind_nss_solaris.c11
1 files changed, 7 insertions, 4 deletions
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