golang/go

x/sys/unix: want more platform support for UNIX domain socket peer credentials

Open

#41,659 建立於 2020年9月27日

在 GitHub 查看
 (6 留言) (0 反應) (0 負責人)Go (19,008 fork)batch import
NeedsInvestigationcompiler/runtimehelp wanted

倉庫指標

Star
 (133,883 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

What version of Go are you using (go version)?

(Although I use many different versions of Go on illumos, Linux, darwin, etc.)

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

Feature request

As this is a feature request, I'm not including typical bug report details.

What I'd like is a way for us to obtain peer credentials more broadly. I am most interested in illumos/solaris (which uses getpeerucred() in libc, but I see this being useful for Darwin, FreeBSD, and possibly others.

With Linux we can do GetsockoptUcred with SO_PEERCRED. Which is great. I would like to have a similar way to do this for other platforms (platform specific probably) without having to resort to cgo if possible.

貢獻者指南