force-init of nsswitch modules?

Florian Weimer fw@deneb.enyo.de
Sat Dec 21 19:01:22 GMT 2024


* Michael Tokarev:

> Is there a way to force-init modules mentioned in nsswitch.conf, instead
> of doing lazy on-demand load/init as glibc currently does?
>
> This might be necessary before, say, entering a chroot jail, so that the
> libraries/modules wont be needed there (I understand some data files are
> still needed, like it need access to /etc/passwd when using getpwnam() et
> al with "files" module).

This has come up before:

| May I suggest a more radical approach?
|
| Load all the NSS service modules when the first modules is loaded,
| and keep the the fix in place?

<https://sourceware.org/pipermail/libc-alpha/2021-February/122737.html>

Maybe it's finally time to implement this.  Although current Fedora
now has five NSS modules active by default (not counting the built-in
files and dns modules provided by glibc).  It might add quite a bit of
overhead to a simple “ls -l” call.


More information about the Libc-help mailing list