From d9563ccf4d2fd92e64114844645f90e86d469d50 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Mon, 5 Mar 2012 19:29:38 -0500 Subject: 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 --- mkinitcpio | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkinitcpio b/mkinitcpio index c6528e9..bb34add 100755 --- a/mkinitcpio +++ b/mkinitcpio @@ -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 -- cgit v1.2.3-24-g4f1b