dracut/initramfs-non-world-readable.patch

28 lines
769 B
Diff

From e1b48995c26c4f06d1a718539cb1bd5b0179af91 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 27 Sep 2012 10:18:29 +0200
Subject: [PATCH] dracut.sh: create the initramfs non-world readable
---
dracut.sh | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dracut.sh b/dracut.sh
index 7148d0f..96faa06 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1033,8 +1033,9 @@ if [[ $do_hardlink = yes ]] ; then
}
fi
+rm -f "$outfile"
dinfo "*** Creating image file ***"
-if ! ( cd "$initdir"; find . |cpio -R 0:0 -H newc -o --quiet| \
+if ! ( umask 077; cd "$initdir"; find . |cpio -R 0:0 -H newc -o --quiet| \
$compress > "$outfile"; ); then
dfatal "dracut: creation of $outfile failed"
exit 1
--
1.7.7.6