mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 20:25:32 +03:00
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, commit6d65f0ae03
; - reverted in 2014, commite68a5b265a
, but without ammending the comments.
This commit is contained in:
parent
c11da39117
commit
f0107b4f63
1 changed files with 1 additions and 3 deletions
|
@ -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";
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue