From c3e2f19bb995a0281f4cc56ad81bd67a5404dde6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 11 Aug 2010 07:25:02 -0700 Subject: Add self-contained test for NSS. While at it fix interaction between __nss_configure_lookup and nscd. Otherwise the test fails if nscd is runnung. --- grp/initgroups.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'grp') diff --git a/grp/initgroups.c b/grp/initgroups.c index cab63e5..180e653 100644 --- a/grp/initgroups.c +++ b/grp/initgroups.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1989,91,93,1996-2005,2006,2008 Free Software Foundation, Inc. +/* Copyright (C) 1989,91,93,1996-2006,2008,2010 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -56,7 +56,8 @@ internal_getgrouplist (const char *user, gid_t group, long int *size, if (__nss_not_use_nscd_group > 0 && ++__nss_not_use_nscd_group > NSS_NSCD_RETRY) __nss_not_use_nscd_group = 0; - if (!__nss_not_use_nscd_group) + if (!__nss_not_use_nscd_group + && !__nss_database_custom[NSS_DBSIDX_group]) { int n = __nscd_getgrouplist (user, group, size, groupsp, limit); if (n >= 0) -- cgit v1.1