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 gnu: tests: Replace deprecated dhcp client service. 2025-07-24 18:46:34 +02:00
avahi.scm gnu: tests: Replace deprecated dhcp client service. 2025-07-24 18:46:34 +02:00
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 gnu: tests: Replace deprecated dhcp client service. 2025-07-24 18:46:34 +02:00
containers.scm Update Giacomo's email address. 2025-12-03 14:38:09 +09:00
cups.scm gnu: tests: Replace deprecated dhcp client service. 2025-07-24 18:46:34 +02:00
databases.scm Update Giacomo's email address. 2025-12-03 14:38:09 +09:00
desktop.scm
dict.scm gnu: tests: Replace deprecated dhcp client service. 2025-07-24 18:46:34 +02:00
dns.scm gnu: tests: Replace deprecated dhcp client service. 2025-07-24 18:46:34 +02:00
docker.scm Update Giacomo's email address. 2025-12-03 14:38:09 +09:00
emacs.scm
file-sharing.scm gnu: tests: Replace deprecated dhcp client service. 2025-07-24 18:46:34 +02:00
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 services: Add rabbitmq service. 2025-07-19 01:47:50 +01:00
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 gnu: tests: Replace deprecated dhcp client service. 2025-07-24 18:46:34 +02:00
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 gnu: tests: Replace deprecated dhcp client service. 2025-07-24 18:46:34 +02:00
networking.scm Reapply "Update Maxim's email address." 2025-09-18 13:44:12 +09:00
nfs.scm gnu: tests: Replace deprecated dhcp client service. 2025-07-24 18:46:34 +02:00
package-management.scm gnu: tests: Replace deprecated dhcp client service. 2025-07-24 18:46:34 +02:00
pam.scm
reconfigure.scm
rsync.scm gnu: tests: Replace deprecated dhcp client service. 2025-07-24 18:46:34 +02:00
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 gnu: tests: Replace deprecated dhcp client service. 2025-07-24 18:46:34 +02:00
telephony.scm Reapply "Update Maxim's email address." 2025-09-18 13:44:12 +09:00
upnp.scm gnu: tests: Replace deprecated dhcp client service. 2025-07-24 18:46:34 +02:00
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 gnu: tests: Replace deprecated dhcp client service. 2025-07-24 18:46:34 +02:00
web.scm gnu: Fix patchwork service test. 2025-11-10 10:27:36 +00:00