aboutsummaryrefslogtreecommitdiffstats
path: root/main/mkinitfs/0001-mkinitfs-ensure-that-initramfs-image-is-not-world-wr.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/mkinitfs/0001-mkinitfs-ensure-that-initramfs-image-is-not-world-wr.patch')
-rw-r--r--main/mkinitfs/0001-mkinitfs-ensure-that-initramfs-image-is-not-world-wr.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/main/mkinitfs/0001-mkinitfs-ensure-that-initramfs-image-is-not-world-wr.patch b/main/mkinitfs/0001-mkinitfs-ensure-that-initramfs-image-is-not-world-wr.patch
new file mode 100644
index 0000000000..81602e2a91
--- /dev/null
+++ b/main/mkinitfs/0001-mkinitfs-ensure-that-initramfs-image-is-not-world-wr.patch
@@ -0,0 +1,25 @@
+From ba9ab744c9ede5f9d70d57b1623505d47f9024e4 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 26 Oct 2011 14:10:58 +0000
+Subject: [PATCH] mkinitfs: ensure that initramfs image is not world writable
+
+---
+ mkinitfs.in | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/mkinitfs.in b/mkinitfs.in
+index f79a204..a7dd090 100755
+--- a/mkinitfs.in
++++ b/mkinitfs.in
+@@ -143,6 +143,8 @@ initfs_apk_keys() {
+
+ initfs_cpio() {
+ [ -n "$list_sources" ] && return
++ rm -f $outfile
++ umask 0022
+ (cd "$tmpdir" && find . | cpio -o -H newc | gzip) > $outfile
+ }
+
+--
+1.7.7.1
+