Re: sudo open() ? (python newbee question)

2005-06-14 Thread Dan Sommers
On Tue, 14 Jun 2005 16:18:19 +0300, Christos "TZOTZIOY" Georgiou <[EMAIL PROTECTED]> wrote: > I believe that the suid bit on scripts (either *sh or python) is > completely ignored on most *nix systems. Most *modern* systems, yes. ;-) I must be getting old. :-( Regards, Dan -- Dan Sommers

Re: sudo open() ? (python newbee question)

2005-06-14 Thread TZOTZIOY
On 14 Jun 2005 08:12:17 -0400, rumours say that Dan Sommers <[EMAIL PROTECTED]> might have written: >On Tue, 14 Jun 2005 11:52:13 +0200, >Denis WERNERT <[EMAIL PROTECTED]> wrote: > >> The script could be SUID Root, and you could use os.setuid immediately >> after having performed the task to switc

Re: sudo open() ? (python newbee question)

2005-06-14 Thread Dan Sommers
On Tue, 14 Jun 2005 11:52:13 +0200, Denis WERNERT <[EMAIL PROTECTED]> wrote: > The script could be SUID Root, and you could use os.setuid immediately > after having performed the task to switch to a non-priviledged > user. May be a big security risk, if someone can alter the script, he > gains roo

Re: sudo open() ? (python newbee question)

2005-06-14 Thread Denis WERNERT
The script could be SUID Root, and you could use os.setuid immediately after having performed the task to switch to a non-priviledged user. May be a big security risk, if someone can alter the script, he gains root access to the system... [EMAIL PROTECTED] wrote: > hello, > > i am writing a pyth

sudo open() ? (python newbee question)

2005-06-14 Thread slava
hello, i am writing a python script that will be run by a non root user the script needs to open a file in write mode that is owned by root file = open('/etc/apt/sources.list', 'r+') returns permission error how can i call sudo on open()? thanks alot slava -- http://mail.python.org/mailman/li