#TIL Check SO_PEERCRED of a Unix domain socket to find out the client's identity. No need to do hacky challenge-response via the filesystem.
Conversation
Notices
-
Embed this notice
niconiconi (niconiconi@mk.absturztau.be)'s status on Saturday, 07-Sep-2024 14:50:48 JST niconiconi - Haelwenn /элвэн/ :triskell: likes this.
-
Embed this notice
Haelwenn /элвэн/ :triskell: (lanodan@queer.hacktivis.me)'s status on Saturday, 07-Sep-2024 14:54:20 JST Haelwenn /элвэн/ :triskell: @niconiconi Interestingly it's not in POSIX -
Embed this notice
Haelwenn /элвэн/ :triskell: (lanodan@queer.hacktivis.me)'s status on Saturday, 07-Sep-2024 14:59:48 JST Haelwenn /элвэн/ :triskell: @niconiconi Strangely manpage-wise it's only in OpenBSD… -
Embed this notice
niconiconi (niconiconi@mk.absturztau.be)'s status on Saturday, 07-Sep-2024 14:59:49 JST niconiconi @lanodan@queer.hacktivis.me even NetBSD has this extension, so it's pretty safe to use. It's only missing in macOS but only under a different name LOCAL_PEERCRED.
-
Embed this notice
Haelwenn /элвэн/ :triskell: (lanodan@queer.hacktivis.me)'s status on Saturday, 07-Sep-2024 15:04:42 JST Haelwenn /элвэн/ :triskell: @niconiconi And for me the only systems I care about are Linux, BSDs, Haiku and somewhat illumos.
Even ignoring it being proprietary (and so unfixable software), MacOS is horribly outdated POSIX wise, might as well just consider it formerly/historically UNIX. -
Embed this notice
niconiconi (niconiconi@mk.absturztau.be)'s status on Saturday, 07-Sep-2024 15:05:16 JST niconiconi @lanodan@queer.hacktivis.me I misread the manual. In NetBSD it's actually named LOCAL_PEEREID ("You're in a maze of incompatible Unix derivatives, all alike.")
Haelwenn /элвэн/ :triskell: likes this. -
Embed this notice
Haelwenn /элвэн/ :triskell: (lanodan@queer.hacktivis.me)'s status on Saturday, 07-Sep-2024 15:05:53 JST Haelwenn /элвэн/ :triskell: @niconiconi Which is exactly why POSIX still matters, getting more common ground ^^ -
Embed this notice
Haelwenn /элвэн/ :triskell: (lanodan@queer.hacktivis.me)'s status on Saturday, 07-Sep-2024 15:10:41 JST Haelwenn /элвэн/ :triskell: @niconiconi btw relevant ticket: https://www.austingroupbugs.net/view.php?id=1622