git.iko.soy/typeable/nixpkgs
on master help sign in
setuid-wrappers: remove config.system.path from the closure

The motivation is using sudo in chroot nix builds, a somewhat special edge case I have and pulling system path into chroot yields to some very nasty bug like https://github.com/NixOS/nixpkgs/issues/15581 Previously: $ cat /var/setuid-wrappers/sudo.real /nix/store/3sm04dzh0994r86xqxy52jjc0lqnkn65-system-path/bin/sudo After the change: $ cat /var/setuid-wrappers/sudo.real /nix/store/4g9sxbzy8maxf1v217ikp69c0c3q12as-sudo-1.8.15/bin/sudo

commit16535d4a71a21fe118adbcccdc97968513911098 authorDomen Kožar <domen@dev.si> dateMon 23 May 2016, 13:09 (11 years ago) parent03f76c1
1 file changed+1−1
nixos/modules/security/setuid-wrappers.nix+1−1
nixos/modules/security/setuid-wrappers.nix+1−1
@@ -96,7 +96,7 @@ in
9696 }:
9797
9898 ''
99− if ! source=${if source != "" then source else "$(PATH=$SETUID_PATH type -tP ${program})"}; then
99+ if ! source=${if source != "" then source else "$(readlink -f $(PATH=$SETUID_PATH type -tP ${program}))"}; then
100100 # If we can't find the program, fall back to the
101101 # system profile.
102102 source=/nix/var/nix/profiles/default/bin/${program}