From 489eb799a83619b1da696fc3e6ca9c6f4b22af01 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 29 Nov 2024 16:15:12 +0100 Subject: [PATCH] build_library/build_image_util.sh: Fix copy-pasta We were supposed to collect allowed users and allowed groups into separate arrays. Due to the copy-paste mistake, we overwrote allowed users array with allowed groups while leaving the array for allowed groups empty, so we ended up passing only allowed groups instead of both. --- build_library/build_image_util.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_library/build_image_util.sh b/build_library/build_image_util.sh index a29470dc82..921e8ea8f3 100755 --- a/build_library/build_image_util.sh +++ b/build_library/build_image_util.sh @@ -654,7 +654,7 @@ finish_image() { # --allow-user=root # --allow-user=core mapfile -t allowed_users < <(grep '^COPY_USERS=' "${root_fs_dir}/sbin/flatcar-tmpfiles" | sed -e 's/.*="\([^"]*\)"/\1/' | tr '|' '\n' | sed -e 's/^/--allow-user=/') - mapfile -t allowed_users < <(grep '^COPY_GROUPS=' "${root_fs_dir}/sbin/flatcar-tmpfiles" | sed -e 's/.*="\([^"]*\)"/\1/' | tr '|' '\n' | sed -e 's/^/--allow-group=/') + mapfile -t allowed_groups < <(grep '^COPY_GROUPS=' "${root_fs_dir}/sbin/flatcar-tmpfiles" | sed -e 's/.*="\([^"]*\)"/\1/' | tr '|' '\n' | sed -e 's/^/--allow-group=/') sudo "${BUILD_LIBRARY_DIR}/gen_tmpfiles.py" --root="${root_fs_dir}" \ --output="${root_fs_dir}/usr/lib/tmpfiles.d/base_image_var.conf" \ "${ignores[@]}" "${allowed_users[@]}" "${allowed_groups[@]}" "${root_fs_dir}/var"