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

Re: [E-devel] Priviledged Execution

Michael Jennings wrote:
On Monday, 06 November 2006, at 16:30:16 (+0100),
Essien Ita Essien wrote:

I'm just putting out feelers for ideas (a.k.a. best practices if
such exist), for how to implement Priviledged Execution for

Best practice:  Don't do it.

The problem is that, the config file is /etc/entrance_config.cfg,
which is protected file, but all users *can* run entrance_edit_gui
for now.

There is no point letting any user run entrance_edit_gui.  Only root
should be able to run it.
this brings up the problem of what happens when we try to launch it from the entrance login screen (ala GDM).
At that point, no one is logged in (i.e. no one is root yet).

I'm thinking any method I use to handle this scenario should also work for the other scenario when _a_ user is logged on.
Whats the best practice for implementing stuff like this in a GUI

Don't.  It's too hard to audit the code.

I've spent a bit of time thinking about it, and I agree, its quite hard to get right properly, but the scenario above (launch from login screen, before user is logged in) is a requirement that's staring me in teh face, why its not staring someone else in the face I'll never know :), is there a neat way around this?