Open
Description
tokio-rs/tokio-uds#13 was recently merged, so I'd like to open an issue of adding same thing to stdlib. TL;DR It allows one to get effective UID and GID of the process which created the remote socket.
I suggest to test it with Tokio now and when there is consensus, we can merge similar change. I need this function, so I'm going to test it anyway.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
Kixunil commentedon Jul 11, 2017
Considering that newtypes for
pid_t
,uid_t
andgid_t
landed innix
, we shoul consider using same newtypes instd
and then simply reexport them innix
.sfackler commentedon Jul 11, 2017
This seems like a reasonable addition. It looks like there are some extra platforms that require special handling though - Solaris and FreeBSD: https://doxygen.postgresql.org/getpeereid_8c_source.html
Kixunil commentedon Jul 11, 2017
The implementation in
tokio
handles Linux and FreeBSD (incl. macOS). I doesn't handle Solaris because I don't have Solaris machine.dtolnay commentedon Nov 19, 2017
This isn't my area of expertise but I would be interested to see an API proposed for this in a PR.
joechrisellis commentedon Jul 28, 2020
Hi guys. We're quite keen for something like this in the stdlib. The implementation in the Tokio repository looks good to me, and from a cursory glance it looks like the stdlib can be very similar. I'm happy to give this a crack -- should I submit an RFC first or is a normal code pull request OK? 😄
Cheers! 🙂
hug-dev commentedon Aug 28, 2020
The PR which implements this issue is ready for review 🚀
#75148
Kixunil commentedon Sep 16, 2020
Since the PR was merged should the labels (and perhaps also the title) be updated to tracking issue?
hug-dev commentedon Sep 16, 2020
I would agree with that!
I guess the steps to follow for stabilization are here?
26 remaining items