[0/8] Move nss_files into libc

Message ID cover.1623085295.git.fweimer@redhat.com
Headers
Series Move nss_files into libc |

Message

Florian Weimer June 7, 2021, 5:37 p.m. UTC
  I plan to use this to tackle the --enable-static-nss regression in glibc
2.33.

I plan to move nss_dns into libc as well, and then we can add a library
with dlopen stubs that blocks all dlopen calls.  If a programmer wants
to build a truly static binary, they can link with -lglibc-nodlopen (or
something like that), and the behavior will be as if glibc was
configured with --enable-static-nss.

Tested on i686-linux-gnu and x86_64-linux-gnu.  Built using
build-many-glibcs.py.

Thanks,
Florian

Florian Weimer (8):
  nss: Fix NSS_DECLARE_MODULE_FUNCTIONS handling of _nss_*_endnetgrent
  inet: Add hidden prototype for __inet_network
  libio: Add hidden prototype for ungetc
  libio: Replace internal _IO_getdelim symbol with __getdelim
  nss_files: Allocate nscd file registration data on the heap
  nss_files: Add generic code for set*ent, end*ent and file open
  nss_files: Move into libc
  nss: Access nss_files through direct references

 iconv/gconv_conf.c                      |   4 -
 include/arpa/inet.h                     |   2 +
 include/libc-symbols.h                  |  23 ----
 include/netdb.h                         |   2 +-
 include/nss_files.h                     |  80 +++++++++++-
 include/stdio.h                         |   2 +
 inet/inet_net.c                         |   4 +-
 libio/iogetdelim.c                      |   7 +-
 libio/ioungetc.c                        |   6 +-
 libio/libioP.h                          |   1 -
 nss/Makefile                            |  14 +--
 nss/Versions                            |  17 ++-
 nss/nss.h                               |   2 +-
 nss/nss_files/files-XXX.c               |  73 +++--------
 nss/nss_files/files-alias.c             |  86 ++++---------
 nss/nss_files/files-ethers.c            |   2 -
 nss/nss_files/files-grp.c               |   2 -
 nss/nss_files/files-hosts.c             |  17 +--
 nss/nss_files/files-init.c              |  58 ++++-----
 nss/nss_files/files-initgroups.c        |   3 +-
 nss/nss_files/files-netgrp.c            |  11 +-
 nss/nss_files/files-network.c           |   4 +-
 nss/nss_files/files-parse.c             |   8 +-
 nss/nss_files/files-proto.c             |   2 -
 nss/nss_files/files-pwd.c               |   2 -
 nss/nss_files/files-rpc.c               |   2 -
 nss/nss_files/files-service.c           |   2 -
 nss/nss_files/files-sgrp.c              |   2 -
 nss/nss_files/files-spwd.c              |   2 -
 nss/nss_files_data.c                    | 159 ++++++++++++++++++++++++
 nss/nss_files_functions.c               |  43 +++++++
 nss/nss_module.c                        |  38 +++++-
 nss/nss_module.h                        |   4 +
 nss/nss_readline.c                      |   4 +-
 stdio-common/getline.c                  |   2 +-
 sysdeps/unix/sysv/linux/readonly-area.c |   2 +-
 36 files changed, 440 insertions(+), 252 deletions(-)
 create mode 100644 nss/nss_files_data.c
 create mode 100644 nss/nss_files_functions.c