Socket access to low numbered ports?

Paul Rubin http
Sun Mar 21 15:15:44 EST 2004


John Burton <john.burton at jbmail.com> writes:
> Ok, I'm now using sudo to launch the application which just opens the
> listening sockets and then calls os.setuid to set the uid back to an
> unprivilaged account.

That's how Apache does it too, more or less.  Another method under
Linux is have a separate process that opens the low ports, and use an
AF_UNIX socket to pass the low ports back to your application through
ancillary messages.  That requires a patch to the socket module, which
I'll see about coding up.  I currently have a Sourceforge bug
(#815869) open for it.



More information about the Python-list mailing list