[2585] 2009-09-10 Felix Zielcke <[email protected]>

Felix Zielcke <[email protected]> Thu, 10 Sep 2009 19:04:43 +0000
Newsgroups gmane.comp.boot-loaders.grub.cvs
Message-ID <[email protected]>
Revision: 2585
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2585
Author:   fzielcke
Date:     2009-09-10 19:04:43 +0000 (Thu, 10 Sep 2009)
Log Message:
-----------
2009-09-10  Felix Zielcke  <[email protected]>

	* util/grub-mkconfig.in: Make the created config mode 400 and
	print a warning if it fails.

Modified Paths:
--------------
    trunk/grub2/ChangeLog
    trunk/grub2/util/grub-mkconfig.in

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog	2009-09-10 12:53:25 UTC (rev 2584)
+++ trunk/grub2/ChangeLog	2009-09-10 19:04:43 UTC (rev 2585)
@@ -1,3 +1,8 @@
+2009-09-10  Felix Zielcke  <[email protected]>
+
+	* util/grub-mkconfig.in: Make the created config mode 400 and
+	print a warning if it fails.
+
 2009-09-10  Robert Millan  <[email protected]>
 
 	* util/grub.d/40_custom.in: Ask user to type custom entries below

Modified: trunk/grub2/util/grub-mkconfig.in
===================================================================
--- trunk/grub2/util/grub-mkconfig.in	2009-09-10 12:53:25 UTC (rev 2584)
+++ trunk/grub2/util/grub-mkconfig.in	2009-09-10 19:04:43 UTC (rev 2585)
@@ -232,7 +232,8 @@
 
   # Allow this to fail, since /boot/grub/ might need to be fatfs to support some
   # firmware implementations (e.g. OFW or EFI).
-  chmod 444 ${grub_cfg}.new || true
+  chmod 400 ${grub_cfg}.new || grub_warn "Could not make ${grub_cfg}.new readable by only root.\
+  This means that if the generated config contains a password it is readable by everyone"
 fi
 echo "Generating grub.cfg ..." >&2