Ticket #352 (new enhancement )

Opened 5 years ago

Last modified 3 years ago

Refactor every set.?uid to share code

Reported by: Tv Assigned to: Tv
Type: enhancement Priority: low
Milestone: Component: core
Keywords: Cc: exarkun, Tv
Branch: Author:
Launchpad Bug:

Attachments

Change History

  2003-10-19 18:43:34+00:00 changed by Tv

twisted.internet.process.switch_uid() is pretty good, it should be refactored
out of there, renamed switchUid(), and all setuid etc. callers should use it.
There have been too many bugs in this area, and they aren't detected by unit
tests; maybe a common implementation would even allow unit testing with suitable
drivers?

  2005-06-05 02:45:54+00:00 changed by exarkun

twisted.python.util.switchUID exists now.  There are only two other places in
Twisted which call setuid(): twisted/internet/app.py, which no one should be
using anymore, and twisted/internet/process.py, which switches up to root and
then uses setreuid() and setregid().  Should switchUID be extended to cover this
use-case as well?
Note: See TracTickets for help on using tickets.