Dropping privileges in python daemon
Matthias Bläsing
matthias.blaesing at rwth-aachen.de
Mon Aug 18 10:07:44 EDT 2008
Am Mon, 18 Aug 2008 14:33:27 +0200 schrieb David Härdeman:
>
> 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().
no - python offers the posix function setuid. Have a look here:
http://www.opengroup.org/onlinepubs/000095399/functions/setuid.html
Without any further knowledge this should do everything you want from it
and it is available from the posix and/or the os module.
HTH
Matthias
More information about the Python-list
mailing list