3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #186760 from ck3d/fix-nscd-dbus

nixos: fix nscd for plugins which depends on dbus
This commit is contained in:
Christian Kögler 2022-08-16 22:29:53 +02:00 committed by GitHub
commit 8cad1262a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,16 +62,11 @@ import ./make-test-python.nix (
# Test nss_mymachines without nscd
machine.succeed('LD_LIBRARY_PATH="/run/current-system/sw/lib" getent -s hosts:mymachines hosts ${containerName}');
# Test failing nss_mymachines via nscd
# nscd has not enough rights to connect to systemd bus
# via sd_bus_open_system() in
# https://github.com/systemd/systemd/blob/main/src/nss-mymachines/nss-mymachines.c#L287
machine.fail("getent hosts ${containerName}");
# Test nss_mymachines via nscd
machine.succeed("getent hosts ${containerName}");
# Test systemd-nspawn network configuration
machine.succeed("systemctl stop nscd");
machine.succeed('LD_LIBRARY_PATH="/run/current-system/sw/lib" ping -n -c 1 ${containerName}');
machine.succeed("systemctl start nscd");
machine.succeed("ping -n -c 1 ${containerName}");
# Test systemd-nspawn uses a user namespace
machine.succeed("test $(machinectl status ${containerName} | grep 'UID Shift: ' | wc -l) = 1")