[issue9168] setuid in smtp.py sheds privileges before binding port
Petri Lehtinen pe...@digip.org added the comment: The patch looks good to me and fixes the problem. To reproduce, try this: sudo python -m smtpd 127.0.0.1:25 It raises a socket.error: [Errno 13] Permission denied when trying to bind to the privileged port. Attached a refreshed the patch that applies cleanly on top of current 2.7 branch. -- nosy: +petri.lehtinen versions: -Python 3.1 Added file: http://bugs.python.org/file23481/smtpd.py-0.2-setuid-fix_v2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9168 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9168] setuid in smtp.py sheds privileges before binding port
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 7d92b94b0eec by Florent Xicluna in branch '3.2': Issue #9168: now smtpd is able to bind privileged port. http://hg.python.org/cpython/rev/7d92b94b0eec New changeset bbd92b42508e by Florent Xicluna in branch 'default': Issue #9168: now smtpd is able to bind privileged port. http://hg.python.org/cpython/rev/bbd92b42508e -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9168 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9168] setuid in smtp.py sheds privileges before binding port
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset d2f303861c98 by Florent Xicluna in branch '2.7': Issue #9168: now smtpd is able to bind privileged port. http://hg.python.org/cpython/rev/d2f303861c98 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9168 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9168] setuid in smtp.py sheds privileges before binding port
Florent Xicluna florent.xicl...@gmail.com added the comment: Fixed. Thank you for the patch. -- nosy: +flox resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9168 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9168] setuid in smtp.py sheds privileges before binding port
Changes by Éric Araujo mer...@netwok.org: -- keywords: +needs review stage: - patch review type: crash - behavior versions: +Python 2.7, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9168 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9168] setuid in smtp.py sheds privileges before binding port
Alberto Trevino albe...@byu.edu added the comment: I haven't heard anything on this problem or my patch. What's the status? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9168 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9168] setuid in smtp.py sheds privileges before binding port
Changes by Alberto Trevino albe...@byu.edu: -- type: - crash versions: +Python 3.1 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9168 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9168] setuid in smtp.py sheds privileges before binding port
New submission from Alberto Trevino albe...@byu.edu: The SMTP proxy server in Python (smtpd.py) allows you to shed privileges and run as user nobody. However, if you are trying to use port 25, the server will shed privileges before binding the port, causing a bind failure. By moving the setuid code between the creation of the proxy server and the aysncore loop, we can bind a port below 1024 and run as nobody. -- components: Library (Lib) files: smtpd.py-0.2-setuid-fix.diff keywords: patch messages: 109336 nosy: alfmel, barry priority: normal severity: normal status: open title: setuid in smtp.py sheds privileges before binding port versions: Python 3.2 Added file: http://bugs.python.org/file17871/smtpd.py-0.2-setuid-fix.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9168 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9168] setuid in smtp.py sheds privileges before binding port
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9168 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com