]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut.sh: create the initramfs non-world readable
authorHarald Hoyer <harald@redhat.com>
Thu, 27 Sep 2012 08:18:29 +0000 (10:18 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 27 Sep 2012 08:18:29 +0000 (10:18 +0200)
dracut.sh

index 7148d0f3cd621919342abb19c3664fe4058b94a4..96faa061b5ec4048afed10303f6e255aba71f847 100755 (executable)
--- 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