about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorMaciej Krüger <mkg20001@gmail.com>2023-09-21 15:12:00 +0200
committerMaciej Krüger <mkg20001@gmail.com>2023-09-22 15:14:14 +0200
commit04e64fa7165a88b978165b4592f550016136244e (patch)
tree8c11828334fdd70db23e670e5098092ddae59617 /nixos
parent03762aa42ae7398e2f57aa5fd903b518017e5000 (diff)
downloadnixlib-04e64fa7165a88b978165b4592f550016136244e.tar
nixlib-04e64fa7165a88b978165b4592f550016136244e.tar.gz
nixlib-04e64fa7165a88b978165b4592f550016136244e.tar.bz2
nixlib-04e64fa7165a88b978165b4592f550016136244e.tar.lz
nixlib-04e64fa7165a88b978165b4592f550016136244e.tar.xz
nixlib-04e64fa7165a88b978165b4592f550016136244e.tar.zst
nixlib-04e64fa7165a88b978165b4592f550016136244e.zip
nixosTests.sudo-rs: use sudo-rs
As the module was renamed, we need to use the new one
Diffstat (limited to 'nixos')
-rw-r--r--nixos/tests/sudo-rs.nix12
1 files changed, 8 insertions, 4 deletions
diff --git a/nixos/tests/sudo-rs.nix b/nixos/tests/sudo-rs.nix
index 150c0d5b4f1d..6006863217b6 100644
--- a/nixos/tests/sudo-rs.nix
+++ b/nixos/tests/sudo-rs.nix
@@ -5,7 +5,7 @@ let
   password = "helloworld";
 in
   import ./make-test-python.nix ({ lib, pkgs, ...} : {
-    name = "sudo";
+    name = "sudo-rs";
     meta.maintainers = pkgs.sudo-rs.meta.maintainers;
 
     nodes.machine =
@@ -22,7 +22,9 @@ in
           test5 = { isNormalUser = true; };
         };
 
-        security.sudo = {
+        security.sudo.enable = false;
+
+        security.sudo-rs = {
           enable = true;
           package = pkgs.sudo-rs;
           wheelNeedsPassword = false;
@@ -54,7 +56,9 @@ in
         noadmin = { isNormalUser = true; };
       };
 
-      security.sudo = {
+      security.sudo.enable = false;
+
+      security.sudo-rs = {
         package = pkgs.sudo-rs;
         enable = true;
         wheelNeedsPassword = false;
@@ -86,7 +90,7 @@ in
             machine.succeed("sudo -u test5 sudo -n -u test1 true")
 
         with subtest("test5 user should not be able to run commands under root"):
-            machine.fail("sudo -u test5 sudo -n -u root true")
+            machine.fail("sudo -u test5 sudo -n -u root true 2>/dev/null")
 
         with subtest("users in wheel should be able to run sudo despite execWheelOnly"):
             strict.succeed('faketty -- su - admin -c "sudo -u root true"')