Add Socket::passcred/set_passcred for working with SO_PASSCRED.#506
Conversation
Thomasdezeeuw
left a comment
There was a problem hiding this comment.
Any chance you can add a smoke test to this?
|
When you say smoke test, what are you thinking? Like an integration test that only runs on Linux and actually sets the option on a Unix domain socket? |
|
Just went ahead and added a test which hopefully fits your definition of "smoke test." |
|
Woops, thought I added a test but I had committed to the wrong branch. Should be all set now. |
|
@Thomasdezeeuw Small bump. Not in a rush, but I have the feeling this might have fallen off your radar after the approval. 😄 |
Hadn't fallen off my radar, but $dayjob got busy, then my open source work is the first on the chopping block I'm afraid. Test looks good, for future reference we have a little Line 1326 in 21ba660 Thanks @tobz! |
|
Doh! Sorry about the pushiness. Totally understand $dayjob cutting into open source time. 😓 Thanks again for approving/merging! Is there a general cadence you follow for cutting releases? I'm already using a Git ref at the moment, so I'm fine continuing to do so for a little while... but mostly curious. :) |
👍
Not really, I mostly make releases on request. We don't see too many changes |
This PR adds the ability to get and set the value of
SO_PASSCREDon sockets.Theoretically, FreeBSD does support the equivalent behavior, but does so via differently named constants/values, so I've opted to constrain this implementation to Linux only for now.