Skip to content

Commit dfbf72d

Browse files
committed
cmd-build-with-buildah: strip setgid bit from source
This is basically the equivalent of #2537 but for the container-native path. Fixes coreos/fedora-coreos-tracker#1969 (comment)
1 parent 06da492 commit dfbf72d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/cmd-build-with-buildah

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ build_with_buildah() {
8989

9090
# the config dir virtiofs mount is mounted ro; copy it to the tempdir
9191
cp -r src/config/ "${tempdir}/src"
92+
# Make sure there are no setgid/setuid bits in there.
93+
# See e.g. https://github.com/coreos/fedora-coreos-tracker/issues/1003.
94+
# This is analogous to the chmod we do in cmdlib.sh in the legacy path.
95+
chmod -R gu-s "${tempdir}/src"
9296

9397
tmp_oci_archive_path=$(realpath "${tempdir}/out.ociarchive")
9498

0 commit comments

Comments
 (0)