guix/gnu/tests
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
..
data
audio.scm
avahi.scm
base.scm services: nscd: Cause PID 1 to drop nscd database mappings on shutdown. 2025-12-19 00:05:43 +01:00
cachefilesd.scm
ci.scm
containers.scm Update Giacomo's email address. 2025-12-03 14:38:09 +09:00
cups.scm
databases.scm Update Giacomo's email address. 2025-12-03 14:38:09 +09:00
desktop.scm
dict.scm
dns.scm
docker.scm Update Giacomo's email address. 2025-12-03 14:38:09 +09:00
emacs.scm
file-sharing.scm
foreign.scm tests: debian-install: Use download mirror for uidmap source. 2025-11-24 19:09:39 +02:00
ganeti.scm
gdm.scm
guix.scm tests: guix: Remove %nar-herder-os from the end of the module. 2025-11-25 11:28:18 +00:00
high-availability.scm
image.scm
install.scm installer: Add Sway as an option in the Desktop environment page. 2025-11-04 17:49:29 +01:00
ldap.scm
lightdm.scm Reapply "Update Maxim's email address." 2025-09-18 13:44:12 +09:00
linux-modules.scm
mail.scm gnu: tests: Fix opensmtpd. 2025-11-08 11:26:14 +01:00
mcron.scm
messaging.scm Reapply "Update Maxim's email address." 2025-09-18 13:44:12 +09:00
monitoring.scm
networking.scm Reapply "Update Maxim's email address." 2025-09-18 13:44:12 +09:00
nfs.scm
package-management.scm
pam.scm
reconfigure.scm
rsync.scm
samba.scm gnu: tests: Fix the samba test. 2025-11-08 11:26:03 +01:00
sddm.scm
security-token.scm
security.scm gnu: tests: Fix fail2ban tests. 2025-11-08 11:25:55 +01:00
shadow.scm Update Giacomo's email address. 2025-12-03 14:38:09 +09:00
singularity.scm
ssh.scm
telephony.scm Reapply "Update Maxim's email address." 2025-09-18 13:44:12 +09:00
upnp.scm
version-control.scm gnu: tests: Fix gitile. 2025-11-02 14:48:38 +01:00
virtualization.scm Reapply "Update Maxim's email address." 2025-09-18 13:44:12 +09:00
vnc.scm Reapply "Update Maxim's email address." 2025-09-18 13:44:12 +09:00
vnstat.scm
web.scm gnu: Fix patchwork service test. 2025-11-10 10:27:36 +00:00