1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

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.
This commit is contained in:
Ulrich Drepper
2010-08-11 07:25:02 -07:00
parent f15ce4d8dc
commit c3e2f19bb9
11 changed files with 297 additions and 12 deletions

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1996-1999, 2001-2007, 2009 Free Software Foundation, Inc.
/* Copyright (C) 1996-1999,2001-2007,2009,2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@ -71,6 +71,9 @@ static const struct
};
#define ndatabases (sizeof (databases) / sizeof (databases[0]))
/* Flags whether custom rules for database is set. */
bool __nss_database_custom[NSS_DBSIDX_max];
__libc_lock_define_initialized (static, lock)
@ -265,6 +268,7 @@ __nss_configure_lookup (const char *dbname, const char *service_line)
/* Install new rules. */
*databases[cnt].dbp = new_db;
__nss_database_custom[cnt] = true;
__libc_lock_unlock (lock);