Skip to content

Commit bf75bdb

Browse files
committed
Revert "Changed the way we untar a tar bundle to avoid the security vulnaribility"
This reverts commit c4cf461.
1 parent 9cc5e60 commit bf75bdb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/instance_agent/platform/linux_util.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ def self.script_executable?(path)
4040

4141
def self.extract_tar(bundle_file, dst)
4242
FileUtils.mkdir_p(dst)
43-
execute_tar_command("pushd #{dst} && /bin/tar -xpsf #{bundle_file} && popd")
43+
execute_tar_command("/bin/tar -xpsf #{bundle_file} -C #{dst}")
4444
end
4545

4646
def self.extract_tgz(bundle_file, dst)
4747
FileUtils.mkdir_p(dst)
48-
execute_tar_command("pushd #{dst} && /bin/tar -zxpsf #{bundle_file} && popd")
48+
execute_tar_command("/bin/tar -zxpsf #{bundle_file} -C #{dst}")
4949
end
5050

5151
def self.supports_process_groups?()

0 commit comments

Comments
 (0)