aio-libs / aiosmtpd

A reimplementation of the Python stdlib smtpd.py based on asyncio.
https://aiosmtpd.aio-libs.org
Apache License 2.0
313 stars 95 forks source link

Delay UID change after loop start #369

Open nim-odoo opened 1 year ago

nim-odoo commented 1 year ago

What do these changes do?

Listening to a port < 1024 without --nosetuid leads to a permission error.

The UID change is done too early: we should first open the port, then change the UID.

Are there changes in behavior for the user?

Users can now drop privileges while listening to port < 1024.

Related issue number

Fixes https://github.com/aio-libs/aiosmtpd/issues/304

Checklist

waynew commented 1 year ago

Note that there is a QA issue with comment line being a little too long.

nim-odoo commented 10 months ago

Hello @pepoluan , is there a chance this can be looked at? Thanks

pepoluan commented 8 months ago

Hello @pepoluan , is there a chance this can be looked at? Thanks

I'll see what I can do this weekend.