glibc/glibc-nsswitch-usr.diff
Andreas Schwab 0c1833dfc6 Accepting request 807178 from home:Andreas_Schwab:Factory
- glibc-nsswitch-usr.diff: read /usr/etc/nsswitch.conf if
  /etc/nsswitch.conf does not exist
- Install default nsswitch.conf in /usr/etc
- Don't install gai.conf in /etc

OBS-URL: https://build.opensuse.org/request/show/807178
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=563
2020-05-19 10:03:06 +00:00

16 lines
567 B
Diff

Index: glibc-2.31/nss/nsswitch.c
===================================================================
--- glibc-2.31.orig/nss/nsswitch.c
+++ glibc-2.31/nss/nsswitch.c
@@ -134,6 +134,10 @@ __nss_database_lookup2 (const char *data
/* Read config file. */
service_table = nss_parse_file (_PATH_NSSWITCH_CONF);
+ /* Retry with the OS vendor provided config file. */
+ if (service_table == NULL)
+ service_table = nss_parse_file ("/usr" _PATH_NSSWITCH_CONF);
+
/* Test whether configuration data is available. */
if (service_table != NULL)
{