From ef4ea24420bfd3afbd10f28a0e0f288484dc46ae Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Mon, 16 Jun 2014 05:08:57 -0500 Subject: [PATCH] sudo: Always keepVisudo in order to simplify sudo build --- nixos/modules/security/sudo.nix | 2 +- nixos/tests/installer.nix | 1 - pkgs/tools/security/sudo/default.nix | 7 +------ pkgs/top-level/all-packages.nix | 2 -- 4 files changed, 2 insertions(+), 10 deletions(-) diff --git a/nixos/modules/security/sudo.nix b/nixos/modules/security/sudo.nix index 00b640dd2815..cbd1628caaec 100644 --- a/nixos/modules/security/sudo.nix +++ b/nixos/modules/security/sudo.nix @@ -83,7 +83,7 @@ in {src = pkgs.writeText "sudoers-in" cfg.configFile; } # Make sure that the sudoers file is syntactically valid. # (currently disabled - NIXOS-66) - "${pkgs.sudoWithVisudo}/sbin/visudo -f $src -c && + "${pkgs.sudo}/sbin/visudo -f $src -c && cp $src $out"; target = "sudoers"; mode = "0440"; diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index 13677be86e10..98e8142a0dfd 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -22,7 +22,6 @@ let isoImage.storeContents = [ pkgs.glibcLocales pkgs.sudo - pkgs.sudoWithVisudo pkgs.docbook5 pkgs.docbook5_xsl pkgs.grub diff --git a/pkgs/tools/security/sudo/default.nix b/pkgs/tools/security/sudo/default.nix index 6ed94da10ba0..d4c97253d998 100644 --- a/pkgs/tools/security/sudo/default.nix +++ b/pkgs/tools/security/sudo/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, coreutils, pam, groff, keepVisudo ? false }: +{ stdenv, fetchurl, coreutils, pam, groff }: stdenv.mkDerivation rec { name = "sudo-1.8.9p4"; @@ -32,11 +32,6 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; postInstall = '' - # ‘visudo’ does not make sense on NixOS - except for checking sudoers - # file syntax - rm ${if keepVisudo then "" else "$out/sbin/visudo"} \ - $out/share/man/man8/visudo.8 - rm $out/share/doc/sudo/ChangeLog ''; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4aa330a119c1..99874a72f91f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2082,8 +2082,6 @@ let sudo = callPackage ../tools/security/sudo { }; - sudoWithVisudo = sudo.override { keepVisudo = true; }; - suidChroot = builderDefsPackage (import ../tools/system/suid-chroot) { }; super = callPackage ../tools/security/super { };