Skip to content
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

ext/ucred: Support PID in peer creds on macOS #79387

Merged
merged 2 commits into from
Dec 9, 2020

Conversation

woodruffw
Copy link
Contributor

This is a follow-up to #75148 (RFC: #42839).

The original PR used getpeereid on macOS and the BSDs, since they don't (generally) support the SO_PEERCRED mechanism that Linux supplies.

This PR splits the macOS/iOS implementation of peer_cred() from that of the BSDs, since macOS supplies the LOCAL_PEERPID sockopt as a source of the missing PID. It also adds a cfg-gated tests that ensures that platforms with support for PIDs in UCred have the expected data.

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @cramertj (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 24, 2020
@woodruffw
Copy link
Contributor Author

Gentle ping on this: any chance for a review?

@cramertj
Copy link
Member

cramertj commented Dec 8, 2020

Sorry for the delay, but unfortunately I'm entirely the wrong person to review this.

@cramertj
Copy link
Member

cramertj commented Dec 8, 2020

r? @Amanieu

@rust-highfive rust-highfive assigned Amanieu and unassigned cramertj Dec 8, 2020
@Amanieu
Copy link
Member

Amanieu commented Dec 9, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Dec 9, 2020

📌 Commit 3d8329f has been approved by Amanieu

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 9, 2020
@bors
Copy link
Contributor

bors commented Dec 9, 2020

⌛ Testing commit 3d8329f with merge c16d52d...

@bors
Copy link
Contributor

bors commented Dec 9, 2020

☀️ Test successful - checks-actions
Approved by: Amanieu
Pushing c16d52d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 9, 2020
@bors bors merged commit c16d52d into rust-lang:master Dec 9, 2020
@rustbot rustbot added this to the 1.50.0 milestone Dec 9, 2020
@woodruffw woodruffw deleted the ww/peer-cred-pid-macos branch December 9, 2020 20:54
@woodruffw
Copy link
Contributor Author

Woohoo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants