Add FreeBSD support

For FreeBSD 12.2 and before I think we could use SCM_CREDS to get
the pid of the peer. For FreeBSD 13.x and later, the Xucred is
extended with a pid. For now we'll leave it unimplemented and
expect to add FreeBSD 13+ support whern it is released.

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
This commit is contained in:
Denton Gentry
2021-03-02 06:23:55 -08:00
committed by Denton Gentry
parent 88448a8ba5
commit 6ba7dd52e8
4 changed files with 71 additions and 8 deletions
+1 -1
View File
@@ -2,4 +2,4 @@ module inet.af/peercred
go 1.14
require golang.org/x/sys v0.0.0-20210216224549-f992740a1bac
require golang.org/x/sys v0.0.0-20210301091718-77cc2087c03b