SHA256
1
0
forked from pool/glibc

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
This commit is contained in:
Andreas Schwab 2020-05-19 10:03:06 +00:00 committed by Git OBS Bridge
parent 7f8046cfb0
commit 0c1833dfc6
3 changed files with 31 additions and 6 deletions

15
glibc-nsswitch-usr.diff Normal file
View File

@ -0,0 +1,15 @@
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)
{

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon May 18 12:25:49 UTC 2020 - Andreas Schwab <schwab@suse.de>
- 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
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Apr 20 12:43:19 UTC 2020 - Andreas Schwab <schwab@suse.de> Mon Apr 20 12:43:19 UTC 2020 - Andreas Schwab <schwab@suse.de>

View File

@ -235,6 +235,8 @@ Patch14: glibc-bindresvport-blacklist.diff
Patch15: glibc-2.3.90-langpackdir.diff Patch15: glibc-2.3.90-langpackdir.diff
# PATCH-FEATURE-SLE Use nscd user for nscd # PATCH-FEATURE-SLE Use nscd user for nscd
Patch19: nscd-server-user.patch Patch19: nscd-server-user.patch
# PATCH-FEATURE-SLE read nsswich.conf from /usr
Patch20: glibc-nsswitch-usr.diff
### Locale related patches ### Locale related patches
# PATCH-FIX-OPENSUSE Add additional locales # PATCH-FIX-OPENSUSE Add additional locales
@ -460,6 +462,7 @@ makedb: A program to create a database for nss
%patch14 -p1 %patch14 -p1
%patch15 -p1 %patch15 -p1
%patch19 -p1 %patch19 -p1
%patch20 -p1
%patch100 -p1 %patch100 -p1
%patch102 -p1 %patch102 -p1
@ -833,8 +836,7 @@ rm -rf %{buildroot}%{_datadir}/locale/*/
# Miscelanna: # Miscelanna:
install -m 644 %{SOURCE7} %{buildroot}/etc install -m 644 %{SOURCE7} %{buildroot}/etc
install -m 644 %{SOURCE5} %{buildroot}/etc install -D -m 644 %{SOURCE5} %{buildroot}%{_prefix}/etc/nsswitch.conf
install -m 644 posix/gai.conf %{buildroot}/etc
mkdir -p %{buildroot}/etc/default mkdir -p %{buildroot}/etc/default
install -m 644 nis/nss %{buildroot}/etc/default/ install -m 644 nis/nss %{buildroot}/etc/default/
@ -843,8 +845,6 @@ mkdir -p %{buildroot}%{_includedir}/resolv
install -m 0644 resolv/mapv4v6addr.h %{buildroot}%{_includedir}/resolv/ install -m 0644 resolv/mapv4v6addr.h %{buildroot}%{_includedir}/resolv/
install -m 0644 resolv/mapv4v6hostent.h %{buildroot}%{_includedir}/resolv/ install -m 0644 resolv/mapv4v6hostent.h %{buildroot}%{_includedir}/resolv/
touch %{buildroot}%{_libdir}/gconv/gconv-modules.cache
%if %{build_html} %if %{build_html}
mkdir -p %{buildroot}%{_datadir}/doc/glibc mkdir -p %{buildroot}%{_datadir}/doc/glibc
cp -p cc-base/manual/libc/*.html %{buildroot}%{_datadir}/doc/glibc cp -p cc-base/manual/libc/*.html %{buildroot}%{_datadir}/doc/glibc
@ -1084,8 +1084,10 @@ exit 0
%config /etc/ld.so.conf %config /etc/ld.so.conf
%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/ld.so.cache %attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/ld.so.cache
%config(noreplace) /etc/rpc %config(noreplace) /etc/rpc
%verify(not md5 size mtime) %config(noreplace) /etc/nsswitch.conf %attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/nsswitch.conf
%verify(not md5 size mtime) %config(noreplace) /etc/gai.conf %{_prefix}/etc/nsswitch.conf
%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/gai.conf
%doc posix/gai.conf
%config(noreplace) /etc/default/nss %config(noreplace) /etc/default/nss
%doc %{_mandir}/man1/gencat.1.gz %doc %{_mandir}/man1/gencat.1.gz
%doc %{_mandir}/man1/getconf.1.gz %doc %{_mandir}/man1/getconf.1.gz