Dropping privileges in python daemon
david at hardeman.nu
Mon Aug 18 14:33:27 CEST 2008
I'm currently working on a python daemon which needs to be able to
correctly drop privileges after opening ports and files that it needs to
open as root.
I'm used from C programming to use setresuid() to change the real,
effective and saved uid in one go, and although the os module has some of
the set*uid() functions it doesn't seem to have setresuid().
Nor could I find any another functions in os.* or posix.* which manipulate
the saved uid...so how do I get/set the saved uid in python?
(please CC me any replies)
More information about the Python-list