diff options
author | Ulrich Drepper <drepper@redhat.com> | 2010-08-11 07:25:02 -0700 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2010-08-11 07:25:02 -0700 |
commit | c3e2f19bb995a0281f4cc56ad81bd67a5404dde6 (patch) | |
tree | 5bdbd8e1cb8119cd07cb48c60ef4f383c6b2d875 /nss/nsswitch.c | |
parent | f15ce4d8dc139523fe0c273580b604b2453acba6 (diff) | |
download | glibc-c3e2f19bb995a0281f4cc56ad81bd67a5404dde6.tar.gz glibc-c3e2f19bb995a0281f4cc56ad81bd67a5404dde6.tar.xz glibc-c3e2f19bb995a0281f4cc56ad81bd67a5404dde6.zip |
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.
Diffstat (limited to 'nss/nsswitch.c')
-rw-r--r-- | nss/nsswitch.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nss/nsswitch.c b/nss/nsswitch.c index da94ca9838..92e6f5f91f 100644 --- a/nss/nsswitch.c +++ b/nss/nsswitch.c @@ -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); |