[lokisetup] obtaining root rights - one way or the other

Timothee Besset ttimo at idsoftware.com
Tue Feb 19 03:43:41 EST 2002


I was looking at xsu to do that. It is not suid root, and relies on 'su'
(which we can assume to be present everywhere :-) ). su takes a user and
command argument, which could be used when X is not present either.

TTimo

On 18 Feb 2002 17:30:34 -0800
Stéphane Peter <megastep at megastep.org> wrote:

> le lun 18-02-2002 à 10:29, Ryan C. Gordon a écrit :
> > This is probably best done inside Setup, since there's already a framework
> > for getting input (dialog, gtk, etc), and it would less sensitive
> > information getting tossed between apps.
> > 
> > Perhaps a "requireroot" ("superuser", maybe?) attribute in the <install>
> > element would be a good idea, so that Setup knows to prompt for the
> > password.
> 
> There is already a 'superuser' attribute as of the new version in CVS.
> It doesn't allow to switch users though, it just requires the user to
> run the installer as root (and aborts with a reminder if he doesn't).
> This is a start...
> 
> > BUT ...
> > 
> > I've never actually tried this, so forgive the dumb question: how does a
> > process that is not running as root become root, even with the password?
> > My assumption is that things like "su" and the login process were run
> > initially as root, and changed to regular users with their passwords, but
> > it can't work the other way around.
> 
> As TTimo was saying, we would likely have to rely on an external, setuid
> program like sudo. Actually I believe both Gnome and KDE have such
> utility programs. What we should do then is probably provide an extended
> 'root-only' version of setup.sh that will try to locate and run the best
> super-user switching program to gain root privileges before starting the
> installer. At worse, if it fails, the user will still get the warning to
> manually switch to root.
> 
> There's also the question of what we would run if X is not available...
> Probably nothing?
> 
> -- 
> Stephane Peter
> Software Engineer
> Codehost, Inc.
> 
> 



More information about the Lokisetup mailing list