Skip to content

Commit 719c8e6

Browse files
authored
[secureboot] only remove exec bit in secureboot (sonic-net#4836)
Address issue sonic-net#4832
2 parents de07029 + f7d4317 commit 719c8e6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

files/initramfs-tools/union-mount.j2

+4-3
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,12 @@ if $secureboot; then
9494
else
9595
allowlist_file=${rootmnt}/host/$image_dir/allowlist_paths.conf
9696
fi
97+
9798
remove_not_in_allowlist_files "$allowlist_file" "$rw_dir"
98-
fi
9999

100-
## Remove the executable permission for all the files in rw folder except home folder
101-
find ${rw_dir} -type f -not -path ${rw_dir}/home -exec chmod a-x {} +
100+
## Remove the executable permission for all the files in rw folder except home folder
101+
find ${rw_dir} -type f -not -path ${rw_dir}/home -exec chmod a-x {} +
102+
fi
102103

103104
mount -n -o lowerdir=${rootmnt},upperdir=${rw_dir},workdir=${work_dir} -t overlay root-overlay ${rootmnt}
104105

0 commit comments

Comments
 (0)