From 83c27a9d413d6d02ffe61f681e2f20a1000f6c05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Tempel?= Date: Mon, 12 Mar 2018 11:38:43 +0100 Subject: [PATCH] mkinitfs: set EXTRACT_UNSAFE_SYMLINKS=1 This is needed because busybox >= 1.28 complains if a cpio archive contains symlinks with ".." components or symlinks starting with "/". In this case the archive contains the symlink /bin/sh which points to /bin/busybox and thus causes the following warning to be emitted: cpio: skipping unsafe symlink to '/bin/busybox' in archive, set EXTRACT_UNSAFE_SYMLINKS=1 to extract This commit fixes this by setting the magic environment variable. --- mkinitfs.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mkinitfs.in b/mkinitfs.in index 83333ca..e783a18 100755 --- a/mkinitfs.in +++ b/mkinitfs.in @@ -47,7 +47,8 @@ initfs_base() { $(feature_files "$basedir" files) \ \ | sed -e "s|^$basedir||" | sort -u \ - | cpio --quiet -pdm "$tmpdir" || return 1 + | EXTRACT_UNSAFE_SYMLINKS=1 cpio --quiet -pdm "$tmpdir" \ + || return 1 # copy init cd "$startdir" -- 2.16.2