On Tue, Jun 7, 2011 at 7:54 PM, TheSaint <nob...@nowhere.net.no> wrote:
> Hello,
> I was trying to find out whose the program launcher, but os.environ['USER']
> returns the user whom owns the desktop environment, regardless the program
> is called by root.
> I'd like to know it, so the program will run with the right privileges.
>
> Is there any standard function on python, that will do it?

os.geteuid

You should consider using the access control mechanisms provided by
your OS to do this, though.  If your program is readable by
unauthorized users, they can simply make a copy, and change as
desired.

-- 
regards,
kushal
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to