On Saturday 11 September 2010, Stéphane Guedon wrote:
> Le Saturday 11 September 2010 11:46:59, Albert Hopkins a écrit :
> > On Sat, 2010-09-11 at 10:24 +0200, Stéphane Guedon wrote:
> > > few months ago, I read linux kernel in a nutschell(sic), and the author
> > > wrote we shouldn't do kernel operations (config and build) as root.
> > 
> > I call bullsh*t.  I've been compiling kernels for 17 years and for the
> > most part have done it as root without any problems.
> > 
> > What the author is saying is that, to an extent, in theory no one should
> > compile anything as root, or really do anything non-system-adminly as
> > root.  You should only do as root what is critically necessary (e.g.
> > make install) as root.
> > 
> > In a perfect, tidy world we'd all do that.  This world, however does not
> > exist.  Even portage, by default does configure and make as root (albeit
> > in a sandbox so it is safe(r).
> > 
> > What the author means is theoretically the config/compile phase could
> > unintentionally cause some kind of harm to your system.  In practice I
> > have never seen this or heard of it.  The kernel devs are bright enough
> > to ensure that the compilation does nothing outside the source tree
> > itself.
> > 
> > It's a good guideline but, like the government's dietary guidelines, not
> > ones I intend to follow religiously.
> > 
> > > Is sudo (or kdesudo ?) a good replacement to that ?
> > 
> > sudo runs things as root, so effectively you've done nothing but add a
> > password prompt to the mix.
> > 
> > Gentoo actually makes this a bit more difficult, because usually one
> > uses portage to install the kernel sources, and they get installed as
> > root-owned, and only root has write access to the kernel tree.
> > 
> > Some people, such as myself, use kernel sources outside of portage (I
> > follow a git repo) and do so as a non-root user.  In this case the
> > kernel tree is not owned by root and the config/compile is easily done
> > as a non-root user.
> > 
> > If you are super-paranoid.  You can make a non-root copy
> > of /usr/src/linux and compile it as a non-root user.
> > 
> > But there really isn't any point in using sudo.  It's effectively doing
> > the same thing that you are trying to avoid.
> 
> I am not paranoid anymore, just asking to knowing persons...
> Ok ! thanks for your answer !

well, some years ago someone made a mistake causing some people doing make as 
root loosing /dev/null or something like that. But not even everybody was hit.

/me prefers loosing /dev/null over having /home/$USER overwritten.

Reply via email to