DragonFly BSD
DragonFly submit List (threaded) for 2004-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: small enhancement idea for 'make installworld' et al.


From: Chris Pressey <cpressey@xxxxxxxxxxxxxxx>
Date: Wed, 12 May 2004 13:51:29 -0700

On Wed, 12 May 2004 16:33:01 -0400
David Rhodus <drhodus@xxxxxxxxxxx> wrote:

> On May 12, 2004, at 4:06 PM, Chris Pressey wrote:
> 
> > On Wed, 12 May 2004 12:37:51 -0700 (PDT)
> > Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx> wrote:
> >
> >>     Hmm.  I didn't know the ports system could do that.
> >>
> >>     But, the more I think about it, the less I like the idea of any
> >>     makefile automaticallying su to root for me!
> >
> > OK.  Care to explain why you feel that way?  It's certainly no less 
> > safe
> > than running buildworld and buildkernel as root (which is what the
> > current setup encourages) and it's not like su doesn't still ask for
> > the root password.
> 
> I don't see that it does that..

Not sure what you mean here.  'su root' definately asks for the root
password (unless you're already root.)

> Actually its very rare that I run either
> of these as root unless I'm doing regression testing on a test
> machine.

Ditto.  It's traditionally what the FreeBSD Handbook has recommended,
though.

> I also don't like the idea. Its too unsafe to allow a Makefile to run
> around changing this. In most cases su'ing to root in general can
> be considered unsafe.

Of course, root is always unsafe - but on the other hand, you must be
root to installworld.  So after a buildworld, you'll have to either su
to root, or re-login as root, to install it - there's just no getting
around that.  I don't personally see how having 'su root' in the
Makefile is less safe than making the user manually type 'su root' or
making them re-login as root - in fact, one could make the argument that
it's safer: while the human could forget to exit the su back to a normal
user when the installworld is done, the Makefile does that part
automatically too.

At the very least (sort of going from Mezz's suggestion) it would be
nice for the installworld target to exit with a clear "You must be root"
or similar message early, instead of trying to install the world as a
regular user and failing cryptically.

-Chris



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]