--- glibc-2.2.4/resolv/res_init.c.old Sat Aug 25 17:09:38 2001 +++ glibc-2.2.4/resolv/res_init.c Sat Aug 25 17:18:44 2001 @@ -156,6 +156,9 @@ #ifndef RFC1535 int dots; #endif +#ifndef DISALLOW_ENV_PATH_RESCONF + char *path_resconf; +#endif if (!preinit) { statp->retrans = RES_TIMEOUT; @@ -226,7 +229,17 @@ (line[sizeof(name) - 1] == ' ' || \ line[sizeof(name) - 1] == '\t')) - if ((fp = fopen(_PATH_RESCONF, "r")) != NULL) { + fp = NULL; + +#ifndef DISALLOW_ENV_PATH_RESCONF + if ((path_resconf = getenv("PATH_RESCONF")) != NULL) + fp = fopen(path_resconf, "r"); +#endif + + if (fp == NULL) + fp = fopen(_PATH_RESCONF, "r"); + + if (fp != NULL) { /* No threads use this stream. */ __fsetlocking (fp, FSETLOCKING_BYCALLER); /* read the config file */