Skip to content

Add SO_PASSRIGHTS constant to socket module #135357

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ltworf opened this issue Jun 10, 2025 · 1 comment
Open

Add SO_PASSRIGHTS constant to socket module #135357

ltworf opened this issue Jun 10, 2025 · 1 comment
Labels
type-feature A feature request or enhancement

Comments

@ltworf
Copy link

ltworf commented Jun 10, 2025

Feature or enhancement

Proposal:

Linux recently added support to SO_PASSRIGHTS, to prevent unix sockets from receiving file descriptors.

Python should have this constant to be able to use it with setsockopt.

import socket
socket.SO_PASSRIGHTS

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs

@ltworf ltworf added the type-feature A feature request or enhancement label Jun 10, 2025
@ZeroIntensity ZeroIntensity changed the title Add SO_PASSRIGHTS constant to sockets module Add SO_PASSRIGHTS constant to socket module Jun 11, 2025
@vstinner
Copy link
Member

Did you test your change? If yes, how?

Linux recently added support to SO_PASSRIGHTS

Recently means a few days ago: https://lwn.net/Articles/1023085/

The SO_PASSRIGHTS option found its way into the mainline kernel (as part of the large networking pull) on May 28 and will be available as of the 6.16 kernel release.

https://lwn.net/Articles/1023075/ says:

The 6.16 kernel now goes into the stabilization period, with the final release expected July 27 or August 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants