blob: 81602e2a9143b0e29727544ccdf1b3fe3c0a6785 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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
|