diff options
author | Ulrich Drepper <drepper@redhat.com> | 1996-08-12 02:44:03 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1996-08-12 02:44:03 +0000 |
commit | a8874eadae699b5d4583aab3a860e06ecfcf5e5a (patch) | |
tree | 5165cfc605b53e459cc641ce9c2e614619ee867f /nss/XXX-lookup.c | |
parent | a3e59be8d1e0dbb1d2ab25c3dc4b0ad04e159ad2 (diff) | |
download | glibc-a8874eadae699b5d4583aab3a860e06ecfcf5e5a.tar.gz glibc-a8874eadae699b5d4583aab3a860e06ecfcf5e5a.tar.xz glibc-a8874eadae699b5d4583aab3a860e06ecfcf5e5a.zip |
Last minute change. cvs/libc-ud-960811-2
Mon Aug 12 04:33:09 1996 Ulrich Drepper <drepper@cygnus.com> * nss/nsswitch.c (__nss_database_lookup): Always release locks before returning. Reported by Miles Bader. (distributes): Add databases.def.
Diffstat (limited to 'nss/XXX-lookup.c')
-rw-r--r-- | nss/XXX-lookup.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/nss/XXX-lookup.c b/nss/XXX-lookup.c index 4a2d25cb42..1b43018d47 100644 --- a/nss/XXX-lookup.c +++ b/nss/XXX-lookup.c @@ -35,25 +35,26 @@ Boston, MA 02111-1307, USA. */ #define CONCAT3_1(Pre, Name, Post) CONCAT3_2 (Pre, Name, Post) #define CONCAT3_2(Pre, Name, Post) Pre##Name##Post +#define DATABASE_NAME_SYMBOL CONCAT3_1 (__nss_, DATABASE_NAME, _database) #define DATABASE_NAME_STRING STRINGIFY1 (DATABASE_NAME) #define STRINGIFY1(Name) STRINGIFY2 (Name) #define STRINGIFY2(Name) #Name #ifndef DEFAULT_CONFIG -#define DEFAULT_CONFIG 0 +#define DEFAULT_CONFIG NULL #endif -static service_user *database = NULL; +service_user *DATABASE_NAME_SYMBOL = NULL; int DB_LOOKUP_FCT (service_user **ni, const char *fct_name, void **fctp) { - if (database == NULL + if (DATABASE_NAME_SYMBOL == NULL && __nss_database_lookup (DATABASE_NAME_STRING, DEFAULT_CONFIG, - &database) < 0) + &DATABASE_NAME_SYMBOL) < 0) return -1; - *ni = database; + *ni = DATABASE_NAME_SYMBOL; return __nss_lookup (ni, fct_name, fctp); } |