diff -ru eglibc-2.15/nss/nsswitch.c eglibc-2.15-nsswitch/nss/nsswitch.c --- eglibc-2.15/nss/nsswitch.c 2011-11-17 22:56:08.000000000 +0100 +++ eglibc-2.15-nsswitch/nss/nsswitch.c 2012-02-22 10:38:02.004928523 +0100 @@ -53,6 +53,8 @@ See ../option-groups.def for the details. */ #if __OPTION_EGLIBC_NSSWITCH +#include /* __libc_enable_secure */ + /* Prototypes for the local functions. */ static name_database *nss_parse_file (const char *fname) internal_function; static name_database_entry *nss_getline (char *line) internal_function; @@ -141,8 +143,16 @@ #if __OPTION_EGLIBC_NSSWITCH /* Are we initialized yet? */ if (service_table == NULL) - /* Read config file. */ - service_table = nss_parse_file (_PATH_NSSWITCH_CONF); + { + const char *ext_nss_config_file = NULL; + if (__libc_enable_secure == 0) + { + ext_nss_config_file = getenv ("NSSWITCH_CONF_PATH"); + } + /* Read config file. */ + service_table = nss_parse_file (ext_nss_config_file ? + ext_nss_config_file : _PATH_NSSWITCH_CONF); + } #endif /* Test whether configuration data is available. */ Only in eglibc-2.15-nsswitch/nss: nsswitch.c~ Only in eglibc-2.15-nsswitch/nss: nsswitch.c.orig Only in eglibc-2.15-nsswitch/nss: nsswitch.c.rej