This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author christian.heimes
Recipients christian.heimes, martin.panter, r.david.murray
Date 2016-09-18.11:05:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1474196700.58.0.330328434166.issue28134@psf.upfronthosting.co.za>
In-reply-to
Content
I'm well aware that it does not work in all cases. However it works good enough in most cases. Right now the fileno argument must be considered broken because it leads to wrong results. It is a problem and possible security issue for a couple of use cases, e.g. passing of sockets through AF_UNIX AUX data or systemd socket activation.

On Windows it is less problematic because socket(filno) works correctly with WSAPROTOCOL_INFO. It's only broken for integer fd.

I have considered to set type, family and proto to 0 (unspec) when the getsockopt and getsockname fail.

I have a differnt ticket for the protocol issue, #27816.
History
Date User Action Args
2016-09-18 11:05:00christian.heimessetrecipients: + christian.heimes, r.david.murray, martin.panter
2016-09-18 11:05:00christian.heimessetmessageid: <1474196700.58.0.330328434166.issue28134@psf.upfronthosting.co.za>
2016-09-18 11:05:00christian.heimeslinkissue28134 messages
2016-09-18 11:05:00christian.heimescreate