guix/gnu/services
Ludovic Courtès 3e2bd2e30b
services: nscd: Cause PID 1 to drop nscd database mappings on shutdown.
Partly fixes guix/guix#4269.

Fixes a bug whereby shepherd (PID 1) could retain memory mappings for
/var/run/nscd/dbXXX, which are created by glibc’s NSS from database file
descriptors sent by nscd.  Those mappings could then prevent
‘root-file-system’ from re-mounting the root file system as read-write.
This change causes PID 1 to drop these mappings.

PID 1 typically calls libc database functions such as ‘getgr’ when dealing
with AF_UNIX endpoints for socket-activated services, to look up the socket’s
owner and group.  This is where the bug would manifest.

The regression may have been introduced by
85ac164c41, which caused nscd to handle the
password and group databases.

* gnu/services/base.scm (nscd-shepherd-service): In ‘stop’ procedure, call
‘getpw’, ‘getgr’, and ‘getaddrinfo’.
* gnu/tests/base.scm (run-root-unmount-test) <"open libc NSS database">: New
test.
(%test-root-unmount): Add #:imported-modules.

Change-Id: I197cc8c82165c631f857415898137412ce9bd439
Reported-by: Rutherther <rutherther@ditigal.xyz>
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Merges: #4828
2025-12-19 00:05:43 +01:00
..
admin.scm Update Giacomo's email address. 2025-12-03 14:38:09 +09:00
audio.scm
auditd.scm
authentication.scm
avahi.scm
backup.scm Update Giacomo's email address. 2025-12-03 14:38:09 +09:00
base.scm services: nscd: Cause PID 1 to drop nscd database mappings on shutdown. 2025-12-19 00:05:43 +01:00
certbot.scm
cgit.scm
ci.scm services: forgejo-runner: Add ‘log-file’ option. 2025-10-24 16:42:53 +02:00
configuration.scm
containers.scm services: oci: Fix oci-image value field handling. 2025-12-11 15:31:09 +01:00
cuirass.scm
cups.scm
databases.scm services: postgres: Return #f on stop. 2025-12-13 14:02:08 +01:00
dbus.scm
desktop.scm gnu: Add iio-sensor-proxy-service-type. 2025-11-07 18:39:59 +01:00
dict.scm
dns.scm services: unbound: Remove dns from provision. 2025-10-23 19:35:07 +02:00
docker.scm Update Giacomo's email address. 2025-12-03 14:38:09 +09:00
file-sharing.scm
games.scm
ganeti.scm
getmail.scm services: getmail: Correct deprecated package. 2025-10-25 12:23:23 +02:00
guix.scm tests: nar-herder: Test the control port. 2025-10-25 10:54:05 +01:00
herd.scm services: herd: Remove ‘load-services/safe’. 2025-10-24 16:42:53 +02:00
high-availability.scm
hurd.scm
kerberos.scm
ldap.scm
lightdm.scm
linux.scm
lirc.scm
mail.scm services: opensmtd: Add back option to log to syslog. 2025-11-09 22:12:02 +01:00
mcron.scm
messaging.scm gnu: services: Add mollysocket service. 2025-11-12 12:20:22 +02:00
monitoring.scm
networking.scm gnu: ipfs-configuration: Update deprecated default value. 2025-12-17 15:48:26 +01:00
nfs.scm gnu: Add autofs-service-type. 2025-11-16 10:21:52 -08:00
nix.scm
pam-mount.scm
pm.scm
power.scm
rsync.scm
samba.scm
science.scm
sddm.scm
security-token.scm
security.scm
shepherd.scm
sound.scm
spice.scm
ssh.scm gnu: Remove lsh-service-type. 2025-11-21 14:35:35 +01:00
syncthing.scm
sysctl.scm
telephony.scm
upnp.scm
version-control.scm services: gitile: Add git-owner-validation? configuration. 2025-11-02 14:48:38 +01:00
virtualization.scm services: hurd-vm: Support persistent images again. 2025-12-03 17:56:15 +01:00
vnc.scm
vpn.scm
web.scm gnu: Fix patchwork service test. 2025-11-10 10:27:36 +00:00
xorg.scm