All of lore.kernel.org
 help / color / mirror / Atom feed
* chmod of generated grub.cfg
@ 2009-09-06 12:29 Felix Zielcke
  2009-09-06 13:38 ` Colin Watson
  0 siblings, 1 reply; 16+ messages in thread
From: Felix Zielcke @ 2009-09-06 12:29 UTC (permalink / raw)
  To: The development of GRUB 2

Currently grub-mkconfig uses chmod 444 on the newly generated grub.cfg
Wouldn't it be better to use 400 now that we have plaintext password
support?
Or should we add support for a GRUB_CHMOD variable so users can override
this setting as they please?

Else I'd need to add a /etc/grub.d/999_chmod file in grub-installer
which changes the mode of grub.cfg.new if the user wants to have a
password.

-- 
Felix Zielcke
Proud Debian Maintainer




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: chmod of generated grub.cfg
  2009-09-06 12:29 chmod of generated grub.cfg Felix Zielcke
@ 2009-09-06 13:38 ` Colin Watson
  2009-09-06 13:43   ` Felix Zielcke
                     ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Colin Watson @ 2009-09-06 13:38 UTC (permalink / raw)
  To: The development of GRUB 2

On Sun, Sep 06, 2009 at 02:29:03PM +0200, Felix Zielcke wrote:
> Currently grub-mkconfig uses chmod 444 on the newly generated grub.cfg
> Wouldn't it be better to use 400 now that we have plaintext password
> support?
> Or should we add support for a GRUB_CHMOD variable so users can override
> this setting as they please?

I'd prefer to see this done only if they set a password. A GRUB_CHMOD
variable seems overkill, though.

> Else I'd need to add a /etc/grub.d/999_chmod file in grub-installer
> which changes the mode of grub.cfg.new if the user wants to have a
> password.

I think it'd be more sensible to do this in grub-mkconfig itself - it
doesn't really fit well into the /etc/grub.d/ hook system, which is
really just for generating output.

-- 
Colin Watson                                       [cjwatson@ubuntu.com]



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: chmod of generated grub.cfg
  2009-09-06 13:38 ` Colin Watson
@ 2009-09-06 13:43   ` Felix Zielcke
  2009-09-06 13:57     ` Colin Watson
  2009-09-06 15:01   ` Robert Millan
  2009-09-06 17:22   ` Vladimir 'phcoder' Serbinenko
  2 siblings, 1 reply; 16+ messages in thread
From: Felix Zielcke @ 2009-09-06 13:43 UTC (permalink / raw)
  To: The development of GRUB 2

Am Sonntag, den 06.09.2009, 14:38 +0100 schrieb Colin Watson:
> On Sun, Sep 06, 2009 at 02:29:03PM +0200, Felix Zielcke wrote:
> > Currently grub-mkconfig uses chmod 444 on the newly generated grub.cfg
> > Wouldn't it be better to use 400 now that we have plaintext password
> > support?
> > Or should we add support for a GRUB_CHMOD variable so users can override
> > this setting as they please?
> 
> I'd prefer to see this done only if they set a password. A GRUB_CHMOD
> variable seems overkill, though.

> > Else I'd need to add a /etc/grub.d/999_chmod file in grub-installer
> > which changes the mode of grub.cfg.new if the user wants to have a
> > password.
> 
> I think it'd be more sensible to do this in grub-mkconfig itself - it
> doesn't really fit well into the /etc/grub.d/ hook system, which is
> really just for generating output.

You mean we check with grep if there's a password line in the generated
config and then just use chmod 400 instead of 444?
Sounds good.


-- 
Felix Zielcke
Proud Debian Maintainer




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: chmod of generated grub.cfg
  2009-09-06 13:43   ` Felix Zielcke
@ 2009-09-06 13:57     ` Colin Watson
  2009-09-06 14:58       ` Felix Zielcke
  0 siblings, 1 reply; 16+ messages in thread
From: Colin Watson @ 2009-09-06 13:57 UTC (permalink / raw)
  To: The development of GRUB 2

On Sun, Sep 06, 2009 at 03:43:46PM +0200, Felix Zielcke wrote:
> Am Sonntag, den 06.09.2009, 14:38 +0100 schrieb Colin Watson:
> > I think it'd be more sensible to do this in grub-mkconfig itself - it
> > doesn't really fit well into the /etc/grub.d/ hook system, which is
> > really just for generating output.
> 
> You mean we check with grep if there's a password line in the generated
> config and then just use chmod 400 instead of 444?
> Sounds good.

Yeah, that kind of thing.

-- 
Colin Watson                                       [cjwatson@ubuntu.com]



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: chmod of generated grub.cfg
  2009-09-06 13:57     ` Colin Watson
@ 2009-09-06 14:58       ` Felix Zielcke
  2009-09-06 15:09         ` Robert Millan
  0 siblings, 1 reply; 16+ messages in thread
From: Felix Zielcke @ 2009-09-06 14:58 UTC (permalink / raw)
  To: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 681 bytes --]

Am Sonntag, den 06.09.2009, 14:57 +0100 schrieb Colin Watson:
> On Sun, Sep 06, 2009 at 03:43:46PM +0200, Felix Zielcke wrote:
> > Am Sonntag, den 06.09.2009, 14:38 +0100 schrieb Colin Watson:
> > > I think it'd be more sensible to do this in grub-mkconfig itself - it
> > > doesn't really fit well into the /etc/grub.d/ hook system, which is
> > > really just for generating output.
> > 
> > You mean we check with grep if there's a password line in the generated
> > config and then just use chmod 400 instead of 444?
> > Sounds good.
> 
> Yeah, that kind of thing.
> 

Ok here's now a patch.
Robert do you think this can go into 1.97?

-- 
Felix Zielcke
Proud Debian Maintainer

[-- Attachment #2: chmod.diff --]
[-- Type: text/x-patch, Size: 804 bytes --]

2009-09-06  Felix Zielcke  <fzielcke@z-51.de>

	* util/grub-mkconfig.in: Make generated config file mode 400 if
	it contains a password and print a warning if it fails.

Index: util/grub-mkconfig.in
===================================================================
--- util/grub-mkconfig.in	(revision 2574)
+++ util/grub-mkconfig.in	(working copy)
@@ -260,6 +260,11 @@ for i in ${grub_mkconfig_dir}/* ; do
   esac
 done
 
+if [ "x${grub_cfg}" != "x" ] && grep -q "^password " ${grub_cfg}.new ; then
+  chmod 400 ${grub_cfg}.new || grub_warn "Could not make ${grub_cfg}.new readable by only root.\
+  This means your password is readable by everyone"
+fi
+
 if test "x${grub_cfg}" != "x" ; then
   # none of the children aborted with error, install the new grub.cfg
   mv -f ${grub_cfg}.new ${grub_cfg}

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: chmod of generated grub.cfg
  2009-09-06 13:38 ` Colin Watson
  2009-09-06 13:43   ` Felix Zielcke
@ 2009-09-06 15:01   ` Robert Millan
  2009-09-06 17:22   ` Vladimir 'phcoder' Serbinenko
  2 siblings, 0 replies; 16+ messages in thread
From: Robert Millan @ 2009-09-06 15:01 UTC (permalink / raw)
  To: The development of GRUB 2

On Sun, Sep 06, 2009 at 02:38:18PM +0100, Colin Watson wrote:
> 
> A GRUB_CHMOD
> variable seems overkill, though.

Yes.  Please not a new config option just for this.  Just pick a reasonable
mode and set to it.

Auto-detection doesn't sound bad, although I'd be fine with just using
0400.

> > Else I'd need to add a /etc/grub.d/999_chmod file in grub-installer
> > which changes the mode of grub.cfg.new if the user wants to have a
> > password.
> 
> I think it'd be more sensible to do this in grub-mkconfig itself - it
> doesn't really fit well into the /etc/grub.d/ hook system, which is
> really just for generating output.

Agreed.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: chmod of generated grub.cfg
  2009-09-06 14:58       ` Felix Zielcke
@ 2009-09-06 15:09         ` Robert Millan
  2009-09-06 15:17           ` Felix Zielcke
  0 siblings, 1 reply; 16+ messages in thread
From: Robert Millan @ 2009-09-06 15:09 UTC (permalink / raw)
  To: The development of GRUB 2

On Sun, Sep 06, 2009 at 04:58:40PM +0200, Felix Zielcke wrote:
> 
> Ok here's now a patch.
> Robert do you think this can go into 1.97?

For 1.97 I'd be more comfortable with a simple s/444/400/.  An automated check
smells like it could have corner cases.  In fact I found one:

> @@ -260,6 +260,11 @@ for i in ${grub_mkconfig_dir}/* ; do
>    esac
>  done
>  
> +if [ "x${grub_cfg}" != "x" ] && grep -q "^password " ${grub_cfg}.new ; then
> +  chmod 400 ${grub_cfg}.new || grub_warn "Could not make ${grub_cfg}.new readable by only root.\
> +  This means your password is readable by everyone"
> +fi

There's a short time window in which /boot/grub/grub.cfg.new exists, has been
fully generated, and its mode is 444 rather than 400.  An attacker could poll
this file and with some luck extract a password from it.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: chmod of generated grub.cfg
  2009-09-06 15:09         ` Robert Millan
@ 2009-09-06 15:17           ` Felix Zielcke
  2009-09-06 19:32             ` Robert Millan
  0 siblings, 1 reply; 16+ messages in thread
From: Felix Zielcke @ 2009-09-06 15:17 UTC (permalink / raw)
  To: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 994 bytes --]

Am Sonntag, den 06.09.2009, 17:09 +0200 schrieb Robert Millan:
> On Sun, Sep 06, 2009 at 04:58:40PM +0200, Felix Zielcke wrote:
> > 
> > Ok here's now a patch.
> > Robert do you think this can go into 1.97?
> 
> For 1.97 I'd be more comfortable with a simple s/444/400/.  An automated check
> smells like it could have corner cases.  In fact I found one:
> 
> > @@ -260,6 +260,11 @@ for i in ${grub_mkconfig_dir}/* ; do
> >    esac
> >  done
> >  
> > +if [ "x${grub_cfg}" != "x" ] && grep -q "^password " ${grub_cfg}.new ; then
> > +  chmod 400 ${grub_cfg}.new || grub_warn "Could not make ${grub_cfg}.new readable by only root.\
> > +  This means your password is readable by everyone"
> > +fi
> 
> There's a short time window in which /boot/grub/grub.cfg.new exists, has been
> fully generated, and its mode is 444 rather than 400.  An attacker could poll
> this file and with some luck extract a password from it.
> 

Oh right. So how about this?

-- 
Felix Zielcke
Proud Debian Maintainer

[-- Attachment #2: chmod.diff.2 --]
[-- Type: text/plain, Size: 1196 bytes --]

2009-09-06  Felix Zielcke  <fzielcke@z-51.de>

	* util/grub-mkconfig.in: Make the temporary created config mode
	400 and print a warning if it fails.  Change mode to 444 if it
	does not contain a plaintext password.

Index: util/grub-mkconfig.in
===================================================================
--- util/grub-mkconfig.in	(revision 2574)
+++ util/grub-mkconfig.in	(working copy)
@@ -232,7 +232,8 @@ if test "x${grub_cfg}" != "x"; then
 
   # 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
 
@@ -260,6 +261,10 @@ for i in ${grub_mkconfig_dir}/* ; do
   esac
 done
 
+if [ "x${grub_cfg}" != "x" ] && ! grep -q "^password " ${grub_cfg}.new ; then
+  chmod 444 ${grub_cfg}.new || true
+fi
+
 if test "x${grub_cfg}" != "x" ; then
   # none of the children aborted with error, install the new grub.cfg
   mv -f ${grub_cfg}.new ${grub_cfg}

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: chmod of generated grub.cfg
  2009-09-06 13:38 ` Colin Watson
  2009-09-06 13:43   ` Felix Zielcke
  2009-09-06 15:01   ` Robert Millan
@ 2009-09-06 17:22   ` Vladimir 'phcoder' Serbinenko
  2009-09-07  1:21     ` richardvoigt
  2009-09-08 14:48     ` Robert Millan
  2 siblings, 2 replies; 16+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2009-09-06 17:22 UTC (permalink / raw)
  To: The development of GRUB 2

On Sun, Sep 6, 2009 at 3:38 PM, Colin Watson<cjwatson@ubuntu.com> wrote:
> On Sun, Sep 06, 2009 at 02:29:03PM +0200, Felix Zielcke wrote:
>> Currently grub-mkconfig uses chmod 444 on the newly generated grub.cfg
>> Wouldn't it be better to use 400 now that we have plaintext password
>> support?
>> Or should we add support for a GRUB_CHMOD variable so users can override
>> this setting as they please?
>
> I'd prefer to see this done only if they set a password. A GRUB_CHMOD
> variable seems overkill, though.
Is there a reason a non-root would like to look at grub.cfg on
production system? Developers can always override chmod. If there is
no real reason for non-root to look into grub.cfg I would follow the
best friend in security considerations called "paranoia" and just use
mode 400
>
>> Else I'd need to add a /etc/grub.d/999_chmod file in grub-installer
>> which changes the mode of grub.cfg.new if the user wants to have a
>> password.
>
> I think it'd be more sensible to do this in grub-mkconfig itself - it
> doesn't really fit well into the /etc/grub.d/ hook system, which is
> really just for generating output.

>
> --
> Colin Watson                                       [cjwatson@ubuntu.com]
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>



-- 
Regards
Vladimir 'phcoder' Serbinenko

Personal git repository: http://repo.or.cz/w/grub2/phcoder.git



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: chmod of generated grub.cfg
  2009-09-06 15:17           ` Felix Zielcke
@ 2009-09-06 19:32             ` Robert Millan
  0 siblings, 0 replies; 16+ messages in thread
From: Robert Millan @ 2009-09-06 19:32 UTC (permalink / raw)
  To: The development of GRUB 2

On Sun, Sep 06, 2009 at 05:17:34PM +0200, Felix Zielcke wrote:
> Am Sonntag, den 06.09.2009, 17:09 +0200 schrieb Robert Millan:
> > On Sun, Sep 06, 2009 at 04:58:40PM +0200, Felix Zielcke wrote:
> > > 
> > > Ok here's now a patch.
> > > Robert do you think this can go into 1.97?
> > 
> > For 1.97 I'd be more comfortable with a simple s/444/400/.  An automated check
> > smells like it could have corner cases.  In fact I found one:
> > 
> > > @@ -260,6 +260,11 @@ for i in ${grub_mkconfig_dir}/* ; do
> > >    esac
> > >  done
> > >  
> > > +if [ "x${grub_cfg}" != "x" ] && grep -q "^password " ${grub_cfg}.new ; then
> > > +  chmod 400 ${grub_cfg}.new || grub_warn "Could not make ${grub_cfg}.new readable by only root.\
> > > +  This means your password is readable by everyone"
> > > +fi
> > 
> > There's a short time window in which /boot/grub/grub.cfg.new exists, has been
> > fully generated, and its mode is 444 rather than 400.  An attacker could poll
> > this file and with some luck extract a password from it.
> > 
> 
> Oh right. So how about this?

Ok.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: chmod of generated grub.cfg
  2009-09-06 17:22   ` Vladimir 'phcoder' Serbinenko
@ 2009-09-07  1:21     ` richardvoigt
  2009-09-07  9:06       ` Felix Zielcke
  2009-09-08 14:48     ` Robert Millan
  1 sibling, 1 reply; 16+ messages in thread
From: richardvoigt @ 2009-09-07  1:21 UTC (permalink / raw)
  To: The development of GRUB 2

On Sun, Sep 6, 2009 at 12:22 PM, Vladimir 'phcoder'
Serbinenko<phcoder@gmail.com> wrote:
> On Sun, Sep 6, 2009 at 3:38 PM, Colin Watson<cjwatson@ubuntu.com> wrote:
>> On Sun, Sep 06, 2009 at 02:29:03PM +0200, Felix Zielcke wrote:
>>> Currently grub-mkconfig uses chmod 444 on the newly generated grub.cfg
>>> Wouldn't it be better to use 400 now that we have plaintext password
>>> support?
>>> Or should we add support for a GRUB_CHMOD variable so users can override
>>> this setting as they please?
>>
>> I'd prefer to see this done only if they set a password. A GRUB_CHMOD
>> variable seems overkill, though.
> Is there a reason a non-root would like to look at grub.cfg on
> production system? Developers can always override chmod. If there is
> no real reason for non-root to look into grub.cfg I would follow the
> best friend in security considerations called "paranoia" and just use
> mode 400

Shouldn't it be u+rw anyway, or 0600 ?



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: chmod of generated grub.cfg
  2009-09-07  1:21     ` richardvoigt
@ 2009-09-07  9:06       ` Felix Zielcke
  0 siblings, 0 replies; 16+ messages in thread
From: Felix Zielcke @ 2009-09-07  9:06 UTC (permalink / raw)
  To: The development of GRUB 2

Am Sonntag, den 06.09.2009, 20:21 -0500 schrieb richardvoigt@gmail.com:
> On Sun, Sep 6, 2009 at 12:22 PM, Vladimir 'phcoder'
> Serbinenko<phcoder@gmail.com> wrote:
> > On Sun, Sep 6, 2009 at 3:38 PM, Colin Watson<cjwatson@ubuntu.com> wrote:
> >> On Sun, Sep 06, 2009 at 02:29:03PM +0200, Felix Zielcke wrote:
> >>> Currently grub-mkconfig uses chmod 444 on the newly generated grub.cfg
> >>> Wouldn't it be better to use 400 now that we have plaintext password
> >>> support?
> >>> Or should we add support for a GRUB_CHMOD variable so users can override
> >>> this setting as they please?
> >>
> >> I'd prefer to see this done only if they set a password. A GRUB_CHMOD
> >> variable seems overkill, though.
> > Is there a reason a non-root would like to look at grub.cfg on
> > production system? Developers can always override chmod. If there is
> > no real reason for non-root to look into grub.cfg I would follow the
> > best friend in security considerations called "paranoia" and just use
> > mode 400
> 
> Shouldn't it be u+rw anyway, or 0600 ?

I don't think this would be good.
The next grub-mkconfig run would just overwrite your changes you made
directly in grub.cfg
If any admin wants to do this nevertheless the warning at the top of it,
then he can also just change the mode or use with vim for example `:w!'


-- 
Felix Zielcke
Proud Debian Maintainer




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: chmod of generated grub.cfg
  2009-09-06 17:22   ` Vladimir 'phcoder' Serbinenko
  2009-09-07  1:21     ` richardvoigt
@ 2009-09-08 14:48     ` Robert Millan
  2009-09-08 14:51       ` Felix Zielcke
  1 sibling, 1 reply; 16+ messages in thread
From: Robert Millan @ 2009-09-08 14:48 UTC (permalink / raw)
  To: The development of GRUB 2

On Sun, Sep 06, 2009 at 07:22:36PM +0200, Vladimir 'phcoder' Serbinenko wrote:
> On Sun, Sep 6, 2009 at 3:38 PM, Colin Watson<cjwatson@ubuntu.com> wrote:
> > On Sun, Sep 06, 2009 at 02:29:03PM +0200, Felix Zielcke wrote:
> >> Currently grub-mkconfig uses chmod 444 on the newly generated grub.cfg
> >> Wouldn't it be better to use 400 now that we have plaintext password
> >> support?
> >> Or should we add support for a GRUB_CHMOD variable so users can override
> >> this setting as they please?
> >
> > I'd prefer to see this done only if they set a password. A GRUB_CHMOD
> > variable seems overkill, though.
> Is there a reason a non-root would like to look at grub.cfg on
> production system? Developers can always override chmod. If there is
> no real reason for non-root to look into grub.cfg I would follow the
> best friend in security considerations called "paranoia" and just use
> mode 400

I like the idea of using 0400 right away, for simplicity.

OTOH, world-readable grub.cfg is useful, at least in Debian, because
reportbug includes this file in bug reports.

But if it's only useful for Debian, we shouldn't let this change our
agenda (ah, the conflict of wearing two hats...).

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: chmod of generated grub.cfg
  2009-09-08 14:48     ` Robert Millan
@ 2009-09-08 14:51       ` Felix Zielcke
  2009-09-10 18:56         ` Robert Millan
  0 siblings, 1 reply; 16+ messages in thread
From: Felix Zielcke @ 2009-09-08 14:51 UTC (permalink / raw)
  To: The development of GRUB 2

Am Dienstag, den 08.09.2009, 16:48 +0200 schrieb Robert Millan:
> On Sun, Sep 06, 2009 at 07:22:36PM +0200, Vladimir 'phcoder' Serbinenko wrote:
> > On Sun, Sep 6, 2009 at 3:38 PM, Colin Watson<cjwatson@ubuntu.com> wrote:
> > > On Sun, Sep 06, 2009 at 02:29:03PM +0200, Felix Zielcke wrote:
> > >> Currently grub-mkconfig uses chmod 444 on the newly generated grub.cfg
> > >> Wouldn't it be better to use 400 now that we have plaintext password
> > >> support?
> > >> Or should we add support for a GRUB_CHMOD variable so users can override
> > >> this setting as they please?
> > >
> > > I'd prefer to see this done only if they set a password. A GRUB_CHMOD
> > > variable seems overkill, though.
> > Is there a reason a non-root would like to look at grub.cfg on
> > production system? Developers can always override chmod. If there is
> > no real reason for non-root to look into grub.cfg I would follow the
> > best friend in security considerations called "paranoia" and just use
> > mode 400
> 
> I like the idea of using 0400 right away, for simplicity.
> 
> OTOH, world-readable grub.cfg is useful, at least in Debian, because
> reportbug includes this file in bug reports.
> 
> But if it's only useful for Debian, we shouldn't let this change our
> agenda (ah, the conflict of wearing two hats...).
> 

So in upstream we change it to 400 + warning and for Debian we use my
last patch?

-- 
Felix Zielcke
Proud Debian Maintainer




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: chmod of generated grub.cfg
  2009-09-08 14:51       ` Felix Zielcke
@ 2009-09-10 18:56         ` Robert Millan
  2009-09-10 19:04           ` Felix Zielcke
  0 siblings, 1 reply; 16+ messages in thread
From: Robert Millan @ 2009-09-10 18:56 UTC (permalink / raw)
  To: The development of GRUB 2

On Tue, Sep 08, 2009 at 04:51:41PM +0200, Felix Zielcke wrote:
> Am Dienstag, den 08.09.2009, 16:48 +0200 schrieb Robert Millan:
> > On Sun, Sep 06, 2009 at 07:22:36PM +0200, Vladimir 'phcoder' Serbinenko wrote:
> > > On Sun, Sep 6, 2009 at 3:38 PM, Colin Watson<cjwatson@ubuntu.com> wrote:
> > > > On Sun, Sep 06, 2009 at 02:29:03PM +0200, Felix Zielcke wrote:
> > > >> Currently grub-mkconfig uses chmod 444 on the newly generated grub.cfg
> > > >> Wouldn't it be better to use 400 now that we have plaintext password
> > > >> support?
> > > >> Or should we add support for a GRUB_CHMOD variable so users can override
> > > >> this setting as they please?
> > > >
> > > > I'd prefer to see this done only if they set a password. A GRUB_CHMOD
> > > > variable seems overkill, though.
> > > Is there a reason a non-root would like to look at grub.cfg on
> > > production system? Developers can always override chmod. If there is
> > > no real reason for non-root to look into grub.cfg I would follow the
> > > best friend in security considerations called "paranoia" and just use
> > > mode 400
> > 
> > I like the idea of using 0400 right away, for simplicity.
> > 
> > OTOH, world-readable grub.cfg is useful, at least in Debian, because
> > reportbug includes this file in bug reports.
> > 
> > But if it's only useful for Debian, we shouldn't let this change our
> > agenda (ah, the conflict of wearing two hats...).
> > 
> 
> So in upstream we change it to 400 + warning and for Debian we use my
> last patch?

Ok.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: chmod of generated grub.cfg
  2009-09-10 18:56         ` Robert Millan
@ 2009-09-10 19:04           ` Felix Zielcke
  0 siblings, 0 replies; 16+ messages in thread
From: Felix Zielcke @ 2009-09-10 19:04 UTC (permalink / raw)
  To: The development of GRUB 2

Am Donnerstag, den 10.09.2009, 20:56 +0200 schrieb Robert Millan:
> On Tue, Sep 08, 2009 at 04:51:41PM +0200, Felix Zielcke wrote:
> > Am Dienstag, den 08.09.2009, 16:48 +0200 schrieb Robert Millan:
> > > On Sun, Sep 06, 2009 at 07:22:36PM +0200, Vladimir 'phcoder' Serbinenko wrote:
> > > > On Sun, Sep 6, 2009 at 3:38 PM, Colin Watson<cjwatson@ubuntu.com> wrote:
> > > > > On Sun, Sep 06, 2009 at 02:29:03PM +0200, Felix Zielcke wrote:
> > > > >> Currently grub-mkconfig uses chmod 444 on the newly generated grub.cfg
> > > > >> Wouldn't it be better to use 400 now that we have plaintext password
> > > > >> support?
> > > > >> Or should we add support for a GRUB_CHMOD variable so users can override
> > > > >> this setting as they please?
> > > > >
> > > > > I'd prefer to see this done only if they set a password. A GRUB_CHMOD
> > > > > variable seems overkill, though.
> > > > Is there a reason a non-root would like to look at grub.cfg on
> > > > production system? Developers can always override chmod. If there is
> > > > no real reason for non-root to look into grub.cfg I would follow the
> > > > best friend in security considerations called "paranoia" and just use
> > > > mode 400
> > > 
> > > I like the idea of using 0400 right away, for simplicity.
> > > 
> > > OTOH, world-readable grub.cfg is useful, at least in Debian, because
> > > reportbug includes this file in bug reports.
> > > 
> > > But if it's only useful for Debian, we shouldn't let this change our
> > > agenda (ah, the conflict of wearing two hats...).
> > > 
> > 
> > So in upstream we change it to 400 + warning and for Debian we use my
> > last patch?
> 
> Ok.
> 

Ok commited.

-- 
Felix Zielcke
Proud Debian Maintainer




^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2009-09-10 19:04 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-06 12:29 chmod of generated grub.cfg Felix Zielcke
2009-09-06 13:38 ` Colin Watson
2009-09-06 13:43   ` Felix Zielcke
2009-09-06 13:57     ` Colin Watson
2009-09-06 14:58       ` Felix Zielcke
2009-09-06 15:09         ` Robert Millan
2009-09-06 15:17           ` Felix Zielcke
2009-09-06 19:32             ` Robert Millan
2009-09-06 15:01   ` Robert Millan
2009-09-06 17:22   ` Vladimir 'phcoder' Serbinenko
2009-09-07  1:21     ` richardvoigt
2009-09-07  9:06       ` Felix Zielcke
2009-09-08 14:48     ` Robert Millan
2009-09-08 14:51       ` Felix Zielcke
2009-09-10 18:56         ` Robert Millan
2009-09-10 19:04           ` Felix Zielcke

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.