6 ms·
Why does glibc has to care about what systemd does ? I thought they are separate.
by hulitu 3y ago
Why does glibc has to care about what systemd does ?
I thought they are separate.
- suprjami 3y agoMy reading is that systemd was just used as an example of the benefit of this change. It could be any software which loads separate parts of glibc and so could run into problems during libc upgrade. Now with this idea of one shared object from musl, the entire system becomes more resilient. systemd is a benefactor but not the only one nor the reason for the change.
- mikelward 3y agoThe article mentions `nss_systemd`. NSS allows Linux systems to provide custom ways to look up users and groups. https://en.m.wikipedia.org/wiki/Name_Service_Switch https://en.m.wikipedia.org/wiki/Name_Service_Switch https://www.man7.org/linux/man-pages/man5/nsswitch.conf.5.html https://www.man7.org/linux/man-pages/man5/nsswitch.conf.5.ht... says this is implemented by having a shared object library for each "service". https://www.freedesktop.org/software/systemd/man/nss-systemd.html https://www.freedesktop.org/software/systemd/man/nss-systemd... says `nss_systemd` is mainly for systemd's DynamicUser feature. https://www.freedesktop.org/software/systemd/man/systemd.exec.html# https://www.freedesktop.org/software/systemd/man/systemd.exe... documents that setting: > DynamicUser= > Takes a boolean parameter. If set, a UNIX user and group pair is allocated dynamically when the unit is started, and released as soon as it is stopped. The user and group will not be added to /etc/passwd or /etc/group, but are managed transiently during runtime https://www.redhat.com/sysadmin/systemd-secure-services https://www.redhat.com/sysadmin/systemd-secure-services explains that this is for sandboxing.
- mikelward 3y agoThe glibc docs explain nsswitch well. https://www.gnu.org/software/libc/manual/html_node/Name-Service-Switch.html https://www.gnu.org/software/libc/manual/html_node/Name-Serv... https://www.gnu.org/software/libc/manual/html_node/Adding-another-Service-to-NSS.html https://www.gnu.org/software/libc/manual/html_node/Adding-an... in particular, which explains how to write a custom NSS service as a shared library. I expect the concern the article raises applies to all custom NSS services, such as: - sssd: https://ubuntu.com/server/docs/service-sssd-ad https://ubuntu.com/server/docs/service-sssd-ad - nsscache: https://github.com/google/nsscache https://github.com/google/nsscache