aboutsummaryrefslogtreecommitdiff
path: root/nss/XXX-lookup.c
diff options
context:
space:
mode:
Diffstat (limited to 'nss/XXX-lookup.c')
-rw-r--r--nss/XXX-lookup.c38
1 files changed, 22 insertions, 16 deletions
diff --git a/nss/XXX-lookup.c b/nss/XXX-lookup.c
index 1b43018..67a3be1 100644
--- a/nss/XXX-lookup.c
+++ b/nss/XXX-lookup.c
@@ -1,21 +1,21 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include "nsswitch.h"
@@ -40,6 +40,12 @@ Boston, MA 02111-1307, USA. */
#define STRINGIFY1(Name) STRINGIFY2 (Name)
#define STRINGIFY2(Name) #Name
+#ifdef ALTERNATE_NAME
+#define ALTERNATE_NAME_STRING STRINGIFY1 (ALTERNATE_NAME)
+#else
+#define ALTERNATE_NAME_STRING NULL
+#endif
+
#ifndef DEFAULT_CONFIG
#define DEFAULT_CONFIG NULL
#endif
@@ -50,8 +56,8 @@ int
DB_LOOKUP_FCT (service_user **ni, const char *fct_name, void **fctp)
{
if (DATABASE_NAME_SYMBOL == NULL
- && __nss_database_lookup (DATABASE_NAME_STRING, DEFAULT_CONFIG,
- &DATABASE_NAME_SYMBOL) < 0)
+ && __nss_database_lookup (DATABASE_NAME_STRING, ALTERNATE_NAME_STRING,
+ DEFAULT_CONFIG, &DATABASE_NAME_SYMBOL) < 0)
return -1;
*ni = DATABASE_NAME_SYMBOL;