[PATCH] nss: look for databases in /usr/share/ if they don't exist in /etc/

Florian Weimer fweimer@redhat.com
Fri Sep 27 08:54:31 GMT 2024


* Lennart Poettering:

> In order to improve compatibility with systems that implement a
> hermetic /usr/, this changes glibc NSS code to always look for its
> databases files in /usr/share/ too in case they don't exist (ENOENT) in
> /etc/. This allows distributions to move /etc/protocols and similar
> data files into /usr/share/. These days various of these files are kinda
> static anyway, and hence in many cases are better placed below the /usr/
> hierarchy than below the configurable /etc/.

We don't really know what's in /usr/share.  There's some evidence that
/usr/share/services/ was used as a directory at one point.  The patch
isn't directly incompatible with that, it's just that it can't be used
to move /etc/services to /usr/share/services on such systems.

Can we use a subdirectory of /usr/share instead, or perhaps /usr/etc?

Thanks,
Florian



More information about the Libc-alpha mailing list