Skip to content

Commit d8fea6c

Browse files
committed
Reset environment of the jailed process
According to `jexec(1)`: > -l Execute in a clean environment. The environment is > discarded except for HOME, SHELL, TERM, USER, and anything > from the login class capability database for the user.
1 parent 50619e7 commit d8fea6c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/bolt/transport/jail/connection.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def connect
4949
end
5050

5151
def execute(command)
52-
args = ["-U", @user]
52+
args = ['-lU', @user]
5353

5454
jail_command = %w[jexec] + args + [jail_id] + Shellwords.split(command)
5555
@logger.trace { "Executing #{jail_command.join(' ')}" }

0 commit comments

Comments
 (0)