Merge pull request #153281 from delroth/sudo-1.9.8p2

This commit is contained in:
Sandro 2022-01-04 21:09:04 +01:00 committed by GitHub
commit 05fb73cb9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -73,7 +73,7 @@ in
machine.fail('su - test1 -c "sudo -n -u root true"')
with subtest("users in group 'foobar' should be able to use sudo with password"):
machine.succeed("sudo -u test2 echo ${password} | sudo -S -u root true")
machine.succeed('su - test2 -c "echo ${password} | sudo -S -u root true"')
with subtest("users in group 'barfoo' should be able to use sudo without password"):
machine.succeed("sudo -u test3 sudo -n -u root true")

View file

@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchurl
, buildPackages
, coreutils
, pam
, groff
@ -13,11 +14,11 @@
stdenv.mkDerivation rec {
pname = "sudo";
version = "1.9.7p2";
version = "1.9.8p2";
src = fetchurl {
url = "https://www.sudo.ws/dist/${pname}-${version}.tar.gz";
sha256 = "sha256-KLXucl2/iaeFL0LzCcqHfSgQqVMbTuz+WfOoS2tK/Kg=";
sha256 = "sha256-njuLjafe9DtuYMJXq+gEZyBWcP0PfAgd4UI8QUtoDy0=";
};
prePatch = ''
@ -56,6 +57,7 @@ stdenv.mkDerivation rec {
installFlags="sudoers_uid=$(id -u) sudoers_gid=$(id -g) sysconfdir=$out/etc rundir=$TMPDIR/dummy vardir=$TMPDIR/dummy DESTDIR=/"
'';
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ groff ];
buildInputs = [ pam ];