J
John D.
I have a Python program which runs as user 'www' (it's a CGI).
It needs root privilege to write a particular file.
What's the best way of doing this while remaining secure?
Right now I do os.system("sudo myutil parms") and pass the parms to it.
I remove : < > & | from the parm string before passing it.
Is there a way to do this without making a system call?
i.e.
gimme_root()
my code...
drop_root()
It needs root privilege to write a particular file.
What's the best way of doing this while remaining secure?
Right now I do os.system("sudo myutil parms") and pass the parms to it.
I remove : < > & | from the parm string before passing it.
Is there a way to do this without making a system call?
i.e.
gimme_root()
my code...
drop_root()