Skip to content

Commit 80b0701

Browse files
authored
Merge pull request #377 from fluent/avoid-CVE-2022-24765
Fix cannot build fluentd correctly on Ubuntu bionic & focal
2 parents 92d195e + 6b412b8 commit 80b0701

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/apt/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ run mkdir -p build
4949
run cp /host/tmp/${PACKAGE}-${VERSION}.tar.gz \
5050
build/${PACKAGE}_${VERSION}.orig.tar.gz
5151
run cd build
52-
run tar xfz ${PACKAGE}_${VERSION}.orig.tar.gz
52+
run tar xfz ${PACKAGE}_${VERSION}.orig.tar.gz --no-same-owner
5353
case "${VERSION}" in
5454
*~dev*)
5555
run mv ${PACKAGE}-$(echo $VERSION | sed -e 's/~dev/-dev/') \

lib/yum/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ if [ -n "${SOURCE_ARCHIVE}" ]; then
9595
0.dev*)
9696
source_archive_base_name=$( \
9797
echo ${SOURCE_ARCHIVE} | sed -e 's/\.tar\.gz$//')
98-
run tar xf /host/tmp/${SOURCE_ARCHIVE} \
98+
run tar xf /host/tmp/${SOURCE_ARCHIVE} --no-same-owner \
9999
--transform="s,^[^/]*,${PACKAGE},"
100100
run mv \
101101
${PACKAGE} \

td-agent/Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ class BuildTask
427427
cd(DOWNLOADS_DIR) do
428428
archive_path = @download_task.file_fluentd_archive
429429
fluentd_dir = archive_path.sub(/\.tar\.gz$/, '')
430-
tar_options = []
430+
tar_options = ["--no-same-owner"]
431431
tar_options << "--force-local" if windows?
432432
sh(*tar_command, "xvf", archive_path, *tar_options) unless File.exists?(fluentd_dir)
433433
cd("fluentd-#{FLUENTD_REVISION}") do

0 commit comments

Comments
 (0)