[lokisetup] obtaining root rights - one way or the other
megastep at megastep.org
Mon Feb 18 20:30:34 EST 2002
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
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...
More information about the Lokisetup