[Twisted-Python] Re: Switch to a different uid/gid after binding reserved ports

Andrew Bennetts andrew-twisted at puzzling.org
Thu Jun 19 19:09:39 MDT 2003


On Tue, Jun 17, 2003 at 08:59:07PM +0100, Martin Armstrong wrote:
> In article <20030609123300.GC29930 at mercury.local.net>, W.J. 
> <miathan at goliath.darktech.org> writes
> 
> >IMO the best way is to just try to setuid/setgid if requested, if it is 
> >not allowed you'll get an EPERM soon enough anyway.
> 
> Wladimir is correct.
> 
> Here's a patch (already tested by Richard) that provides the correct 
> behaviour:

[snip replace "if not" tests with try/except]

This looks sensible to me.  Would anyone object if I checked it in?

-Andrew.





More information about the Twisted-Python mailing list