diff options
author | Nikolay Amiantov <ab@fmap.me> | 2015-12-11 00:40:41 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2015-12-11 00:40:41 +0300 |
commit | 8ec4b45dbd2992e78cec15361acff4cfa8395c6b (patch) | |
tree | c70b4febac09295f899729e1857d67eb23d4fa61 /pkgs/build-support | |
parent | b398371e80adb8ef6e5394b47be7e036da90a2db (diff) | |
parent | 9b33ec1764c34d5e9d542f59ce932209941b64f1 (diff) | |
download | nixlib-8ec4b45dbd2992e78cec15361acff4cfa8395c6b.tar nixlib-8ec4b45dbd2992e78cec15361acff4cfa8395c6b.tar.gz nixlib-8ec4b45dbd2992e78cec15361acff4cfa8395c6b.tar.bz2 nixlib-8ec4b45dbd2992e78cec15361acff4cfa8395c6b.tar.lz nixlib-8ec4b45dbd2992e78cec15361acff4cfa8395c6b.tar.xz nixlib-8ec4b45dbd2992e78cec15361acff4cfa8395c6b.tar.zst nixlib-8ec4b45dbd2992e78cec15361acff4cfa8395c6b.zip |
Merge pull request #11602 from zimbatm/stricter-chroot-user
build-fhs-userenv: don't leak file descriptors
Diffstat (limited to 'pkgs/build-support')
-rwxr-xr-x | pkgs/build-support/build-fhs-userenv/chroot-user.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/build-support/build-fhs-userenv/chroot-user.rb b/pkgs/build-support/build-fhs-userenv/chroot-user.rb index 05b4914b6f6b..97316ac43695 100755 --- a/pkgs/build-support/build-fhs-userenv/chroot-user.rb +++ b/pkgs/build-support/build-fhs-userenv/chroot-user.rb @@ -140,10 +140,10 @@ if $cpid == 0 link_swdir.call swdir, Pathname.new('') # New environment - ENV.replace(Hash[ envvars.map { |x| [x, ENV[x]] } ]) + new_env = Hash[ envvars.map { |x| [x, ENV[x]] } ] # Finally, exec! - exec *execp + exec(new_env, *execp, close_others: true, unsetenv_others: true) end # Wait for a child. If we catch a signal, resend it to child and continue |