Skip to content

Commit

Permalink
Merge pull request #122 from smortex/env-housekeeping
Browse files Browse the repository at this point in the history
(misc) Cleanup environment when changing user
  • Loading branch information
ripienaar authored Jan 13, 2021
2 parents 73c3f10 + 07acb42 commit fb08c47
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/mcollective/util/tasks_support.rb
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ def spawn_command(command, environment, stdin, spooldir, run_as)
if pid.nil?
Process.gid = Process.egid = u.gid
Process.uid = Process.euid = u.uid
ENV.delete_if { |name| name !~ /^LC_/ }
Process.exec(environment, command, options)
end
else
Expand Down

0 comments on commit fb08c47

Please sign in to comment.