add check to see if alfs is called by user root

Neven Has haski at sezampro.yu
Fri Jan 19 04:09:17 PST 2001


> > I'm going to add that note to install LFS as root for best results to the
> > book. Perhaps it's an idea as well to have the back-end check if it's being
> > called as user root and if not print a warning that some packages will not
> > install properly and give the user a choice to contiue or to abort (or
> > perhaps the back-end can su to root itself by asking root's password and
> > then doing some magic so it continues with root privs?)

Warning wouldn't be a problem, "magic" is a good description. ;)

On Thu, Jan 18, 2001 at 09:43:48PM +0000, Bryan Dumm wrote:
> Should we establish some sort of difference in users
> ie root vs others or root vs. others each with their own space?
> Since I am a real lamer and install everything as root, I have never
> really had to investigate the possibility, and I am even unsure on what
> would be a non-root program. Something like your favorite mp3 
> player? If it is a user app, where is it installed?

In most of the cases, backend should be run as root. That depends of the 
profile of course. So maybe we could add some attribute, maybe even something 
like <alfs needs_root="1"> (ugly example) so if we don't have those privileges
we exit with an error ?

But it would be nice if configuring and compiling (<config> and <make>) could 
be done as non-root, even if we are running as a root.
Just don't ask me how to drop those privileges in perl, I have no idea, yet. 8)

Neven







More information about the alfs-discuss mailing list