diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-03-06 01:29:38 +0100 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2012-03-06 01:29:38 +0100 |
commit | d9563ccf4d2fd92e64114844645f90e86d469d50 (patch) | |
tree | 33c9b0c8ad152f29dec913c11d4da385ac8e8263 | |
parent | 1ac0adf4052ff7e0258fcf5f745f19551de3faa5 (diff) | |
download | mkinitcpio-d9563ccf4d2fd92e64114844645f90e86d469d50.tar.gz mkinitcpio-d9563ccf4d2fd92e64114844645f90e86d469d50.tar.xz |
mkinitcpio: force UID/GID 0 for files written to image
This fixes a strange edge where-in a user creates an image as non-root
and attempts to boot from it. Any setuid binaries (such as mount) will
fail, as the ownership is preserved.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rwxr-xr-x | mkinitcpio | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -391,7 +391,7 @@ if [[ "${GENIMG}" ]]; then pushd "$BUILDROOT" >/dev/null find . -print0 | - bsdcpio $( (( QUIET )) && echo '--quiet' ) -0oH newc | + bsdcpio $( (( QUIET )) && echo '--quiet' ) -R 0:0 -0oH newc | $COMPRESSION $COMPRESSION_OPTIONS > "$IMGPATH" pipesave=("${PIPESTATUS[@]}") # save immediately popd >/dev/null |