mirror of
https://github.com/ggrandou/abootimg.git
synced 2024-11-27 03:43:30 +08:00
always unpack initrd to relative paths
If cpio archive contains absolute filenames, files are unpacked relative to host root '/', not 'ramdisk' directory. If abootimg-unpack-initrd is run as root, that could break host system and make it unbootable by overwriting important system files.
This commit is contained in:
parent
7e127fee6a
commit
3e58173287
@ -16,5 +16,5 @@ fi
|
||||
|
||||
mkdir -p $ramdisk
|
||||
|
||||
zcat $initrd | ( cd $ramdisk; cpio -i )
|
||||
zcat $initrd | ( cd $ramdisk; cpio -i --no-absolute-filenames)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user