classification
Title: Add missing getsockopt constants
Type: enhancement Stage: resolved
Components: Versions: Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, martin.panter, nascheme, python-dev
Priority: normal Keywords: patch

Created on 2016-05-02 14:29 by christian.heimes, last changed 2016-08-24 01:13 by r.david.murray. This issue is now closed.

Files
File name Uploaded Description Edit
Add-SO_-socket-constants.patch christian.heimes, 2016-08-20 19:06 review
Messages (6)
msg264649 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2016-05-02 14:29
The socket doesn't expose some constants for getsockopt() and setsockopt():

Get domain and protocol from socket fd
SO_DOMAIN
SO_PROTOCOL

enable/disable passing of credentials
SO_PASSCRED

get security context (SELinux context)
SO_PEERSEC

enable/disable passing of security context
SO_PASSSEC
msg269200 - (view) Author: Neil Schemenauer (nascheme) * (Python committer) Date: 2016-06-24 17:23
Issue #27377 adds these constants.
msg269217 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-06-25 02:14
SO_PASSCRED was added to Python 3.3 as part of Issue 6560; it is just missing documentation.
msg273241 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2016-08-20 19:06
The attached patch adds SO_DOMAIN, SO_PROTOCOL, SO_PEERSEC and SO_PASSSEC. I'd like to get the constants into the stdlib in case Neil's patch won't make it into 3.6.
msg273251 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-08-20 22:54
Patch looks fine to me.
msg273529 - (view) Author: Roundup Robot (python-dev) Date: 2016-08-24 01:12
New changeset ed5f5d490490 by R David Murray in branch 'default':
#26907: add some missing getsockopt constants.
https://hg.python.org/cpython/rev/ed5f5d490490
History
Date User Action Args
2016-08-24 01:13:23r.david.murraysetstatus: open -> closed
resolution: fixed
stage: commit review -> resolved
2016-08-24 01:12:54python-devsetnosy: + python-dev
messages: + msg273529
2016-08-20 22:54:26martin.pantersetmessages: + msg273251
stage: commit review
2016-08-20 19:06:28christian.heimessetfiles: + Add-SO_-socket-constants.patch
keywords: + patch
messages: + msg273241
2016-06-25 02:14:02martin.pantersetnosy: + martin.panter
messages: + msg269217
2016-06-24 17:23:20naschemesetnosy: + nascheme
messages: + msg269200
2016-06-12 11:22:07christian.heimessetassignee: christian.heimes ->
2016-05-02 14:29:23christian.heimescreate