You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/ipn/ipnauth
Brad Fitzpatrick 8ec07b5f7f ipn/ipnauth: don't crash on OpenBSD trying to log username of unknown peer
We never implemented the peercred package on OpenBSD (and I just tried
again and failed), but we've always documented that the creds pointer
can be nil for operating systems where we can't map the unix socket
back to its UID. On those platforms, we set the default unix socket
permissions such that only the admin can open it anyway and we don't
have a read-only vs read-write distinction. OpenBSD was always in that
camp, where any access to Tailscale's unix socket meant full access.

But during some refactoring, we broke OpenBSD in that we started
assuming during one logging path (during login) that Creds was non-nil
when looking up an ipnauth.Actor's username, which wasn't relevant (it
was called from a function "maybeUsernameOf" anyway, which threw away
errors).

Verified on an OpenBSD VM. We don't have any OpenBSD integration tests yet.

Fixes #17209
Updates #17221

Change-Id: I473c5903dfaa645694bcc75e7f5d484f3dd6044d
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2 months ago
..
access.go ipn/ipnauth,util/syspolicy: improve comments 10 months ago
actor.go control/controlclient, ipn: add client audit logging (#14950) 9 months ago
actor_windows.go ipn/ipnauth: implement WindowsActor 10 months ago
ipnauth.go ipn/ipnauth: don't crash on OpenBSD trying to log username of unknown peer 2 months ago
ipnauth_notwindows.go ipn/ipnauth: don't crash on OpenBSD trying to log username of unknown peer 2 months ago
ipnauth_windows.go ipn/ipnauth: implement WindowsActor 10 months ago
policy.go util/syspolicy: finish plumbing policyclient, add feature/syspolicy, move global impl 3 months ago
self.go ipn/{ipnauth,ipnlocal,localapi}: make EditPrefs return an error if changing exit node is restricted by policy 5 months ago
test_actor.go ipn/ipn{auth,server}: update ipnauth.Actor to carry a context 10 months ago