mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
Enable checking sudoers syntax. Fixes #2850, probably.
This commit is contained in:
parent
4b144de367
commit
e68a5b265a
1 changed files with 5 additions and 2 deletions
|
@ -81,10 +81,13 @@ in
|
||||||
security.pam.services.sudo = { sshAgentAuth = true; };
|
security.pam.services.sudo = { sshAgentAuth = true; };
|
||||||
|
|
||||||
environment.etc = singleton
|
environment.etc = singleton
|
||||||
{ source = pkgs.writeText "sudoers-in" cfg.configFile;
|
{ source =
|
||||||
|
pkgs.runCommand "sudoers"
|
||||||
|
{src = pkgs.writeText "sudoers-in" cfg.configFile; }
|
||||||
# Make sure that the sudoers file is syntactically valid.
|
# Make sure that the sudoers file is syntactically valid.
|
||||||
# (currently disabled - NIXOS-66)
|
# (currently disabled - NIXOS-66)
|
||||||
#"${pkgs.sudo}/sbin/visudo -f $src -c && cp $src $out";
|
"${pkgs.sudo.override {keepVisudo = true;}}/sbin/visudo -f $src -c &&
|
||||||
|
cp $src $out";
|
||||||
target = "sudoers";
|
target = "sudoers";
|
||||||
mode = "0440";
|
mode = "0440";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue