Skip to content

Commit

Permalink
[secureboot] only remove exec bit in secureboot
Browse files Browse the repository at this point in the history
Address issue sonic-net#4832
  • Loading branch information
Staphylo committed Jun 23, 2020
1 parent 1e81e1d commit f7d4317
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions files/initramfs-tools/union-mount.j2
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,12 @@ if $secureboot; then
else
allowlist_file=${rootmnt}/host/$image_dir/allowlist_paths.conf
fi

remove_not_in_allowlist_files "$allowlist_file" "$rw_dir"
fi

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

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

Expand Down

0 comments on commit f7d4317

Please sign in to comment.