diff options
author | nicoo <nicoo@mur.at> | 2023-09-07 14:38:51 +0000 |
---|---|---|
committer | nicoo <nicoo@mur.at> | 2023-09-18 17:36:15 +0000 |
commit | f0107b4f63a70925050954f647d14f6e256362d8 (patch) | |
tree | 0c9e368ee33b4216f5e38d555a971b464b39018b /nixos/modules/security/sudo.nix | |
parent | c11da39117871fce949423b3e27da6b796d36957 (diff) |
nixos/sudo: Check syntax using the configured package
This is preferable even for regular `sudo`, but will ensure the check is useful when using `sudo-rs` in the future. Also, dropped antediluvian comment about the syntax check being disabled, when it was clearly not commented out: - introduced in 2007, commit 6d65f0ae03ae14f3e978d89959253d9a8f5e0ec1; - reverted in 2014, commit e68a5b265a96134243a1572f43dfc4ff75dd082b, but without ammending the comments.
Diffstat (limited to 'nixos/modules/security/sudo.nix')
-rw-r--r-- | nixos/modules/security/sudo.nix | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/nixos/modules/security/sudo.nix b/nixos/modules/security/sudo.nix index 4bf214f73eaff..528c230686f71 100644 --- a/nixos/modules/security/sudo.nix +++ b/nixos/modules/security/sudo.nix @@ -283,9 +283,7 @@ in src = pkgs.writeText "sudoers-in" cfg.configFile; preferLocalBuild = true; } - # Make sure that the sudoers file is syntactically valid. - # (currently disabled - NIXOS-66) - "${pkgs.buildPackages.sudo}/sbin/visudo -f $src -c && cp $src $out"; + "${cfg.package}/bin/visudo -f $src -c && cp $src $out"; mode = "0440"; }; |