Enable checking sudoers syntax. Fixes #2850, probably.
This commit is contained in:
parent
4b144de367
commit
e68a5b265a
@ -81,10 +81,13 @@ in
|
||||
security.pam.services.sudo = { sshAgentAuth = true; };
|
||||
|
||||
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.
|
||||
# (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";
|
||||
mode = "0440";
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user