diff --git a/AUTHORS b/AUTHORS index 5498a87..268355e 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1 +1,2 @@ -Tailscale Inc +Original: Tailscale Inc +Minimized version w/FreeBSD PID support: Randall Winkhart diff --git a/peercred.go b/peercred.go index 52209f8..1f19f56 100644 --- a/peercred.go +++ b/peercred.go @@ -1,4 +1,4 @@ -// Copyright (c) 2021 AUTHORS All rights reserved. +// Copyright (c) 2021-2024 AUTHORS All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -16,14 +16,14 @@ type Creds struct { uid string } +// PID returns the process ID associated with the other side of the connection. func (c *Creds) PID() (pid int) { return c.pid } -// UserID returns the userid (or Windows SID) that owns the other side -// of the connection. +// UID returns the userid (or Windows SID) that owns the other side of the connection. // The returned string is suitable to passing to os/user.LookupId. -func (c *Creds) UserID() (uid string) { +func (c *Creds) UID() (uid string) { return c.uid } diff --git a/peercred_unix_test.go b/peercred_unix_test.go index deba815..15c9362 100644 --- a/peercred_unix_test.go +++ b/peercred_unix_test.go @@ -50,7 +50,7 @@ func TestUnixSock(t *testing.T) { t.Fatalf("Get: %v", err) } - uid := creds.UserID() + uid := creds.UID() if uid == "" { t.Errorf("no UID") }