Skip to content

Commit d6e9a5d

Browse files
committed
peercred now supports solaris and illumos
1 parent 3192e7c commit d6e9a5d

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ require (
8282
github.com/tailscale/hujson v0.0.0-20221223112325-20486734a56a
8383
github.com/tailscale/mkctr v0.0.0-20241111153353-1a38f6676f10
8484
github.com/tailscale/netlink v1.1.1-0.20240822203006-4d49adab4de7
85-
github.com/tailscale/peercred v0.0.0-20240214030740-b535050b2aa4
85+
github.com/tailscale/peercred v0.0.0-20250107143737-35a0c7bd7edc
8686
github.com/tailscale/web-client-prebuilt v0.0.0-20240226180453-5db17b287bf1
8787
github.com/tailscale/wf v0.0.0-20240214030419-6fbb0a674ee6
8888
github.com/tailscale/wireguard-go v0.0.0-20241113014420-4e883d38c8d3
@@ -101,7 +101,7 @@ require (
101101
golang.org/x/net v0.27.0
102102
golang.org/x/oauth2 v0.16.0
103103
golang.org/x/sync v0.9.0
104-
golang.org/x/sys v0.27.0
104+
golang.org/x/sys v0.29.1-0.20250107080300-1c14dcadc3ab
105105
golang.org/x/term v0.22.0
106106
golang.org/x/time v0.5.0
107107
golang.org/x/tools v0.23.0

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -937,8 +937,8 @@ github.com/tailscale/mkctr v0.0.0-20241111153353-1a38f6676f10 h1:ZB47BgnHcEHQJOD
937937
github.com/tailscale/mkctr v0.0.0-20241111153353-1a38f6676f10/go.mod h1:iDx/0Rr9VV/KanSUDpJ6I/ROf0sQ7OqljXc/esl0UIA=
938938
github.com/tailscale/netlink v1.1.1-0.20240822203006-4d49adab4de7 h1:uFsXVBE9Qr4ZoF094vE6iYTLDl0qCiKzYXlL6UeWObU=
939939
github.com/tailscale/netlink v1.1.1-0.20240822203006-4d49adab4de7/go.mod h1:NzVQi3Mleb+qzq8VmcWpSkcSYxXIg0DkI6XDzpVkhJ0=
940-
github.com/tailscale/peercred v0.0.0-20240214030740-b535050b2aa4 h1:Gz0rz40FvFVLTBk/K8UNAenb36EbDSnh+q7Z9ldcC8w=
941-
github.com/tailscale/peercred v0.0.0-20240214030740-b535050b2aa4/go.mod h1:phI29ccmHQBc+wvroosENp1IF9195449VDnFDhJ4rJU=
940+
github.com/tailscale/peercred v0.0.0-20250107143737-35a0c7bd7edc h1:24heQPtnFR+yfntqhI3oAu9i27nEojcQ4NuBQOo5ZFA=
941+
github.com/tailscale/peercred v0.0.0-20250107143737-35a0c7bd7edc/go.mod h1:f93CXfllFsO9ZQVq+Zocb1Gp4G5Fz0b0rXHLOzt/Djc=
942942
github.com/tailscale/web-client-prebuilt v0.0.0-20240226180453-5db17b287bf1 h1:tdUdyPqJ0C97SJfjB9tW6EylTtreyee9C44de+UBG0g=
943943
github.com/tailscale/web-client-prebuilt v0.0.0-20240226180453-5db17b287bf1/go.mod h1:agQPE6y6ldqCOui2gkIh7ZMztTkIQKH049tv8siLuNQ=
944944
github.com/tailscale/wf v0.0.0-20240214030419-6fbb0a674ee6 h1:l10Gi6w9jxvinoiq15g8OToDdASBni4CyJOdHY1Hr8M=
@@ -1239,8 +1239,8 @@ golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
12391239
golang.org/x/sys v0.4.1-0.20230131160137-e7d7f63158de/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
12401240
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
12411241
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
1242-
golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s=
1243-
golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
1242+
golang.org/x/sys v0.29.1-0.20250107080300-1c14dcadc3ab h1:BMkEEWYOjkvOX7+YKOGbp6jCyQ5pR2j0Ah47p1Vdsx4=
1243+
golang.org/x/sys v0.29.1-0.20250107080300-1c14dcadc3ab/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
12441244
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
12451245
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
12461246
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=

ipn/ipnserver/actor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func (a *actor) Username() (string, error) {
9696
}
9797
defer tok.Close()
9898
return tok.Username()
99-
case "darwin", "linux":
99+
case "darwin", "linux", "illumos", "solaris":
100100
uid, ok := a.ci.Creds().UserID()
101101
if !ok {
102102
return "", errors.New("missing user ID")

ipn/localapi/localapi.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,7 @@ func (h *Handler) serveServeConfig(w http.ResponseWriter, r *http.Request) {
10691069

10701070
func authorizeServeConfigForGOOSAndUserContext(goos string, configIn *ipn.ServeConfig, h *Handler) error {
10711071
switch goos {
1072-
case "windows", "linux", "darwin":
1072+
case "windows", "linux", "darwin", "illumos", "solaris":
10731073
default:
10741074
return nil
10751075
}
@@ -1089,7 +1089,7 @@ func authorizeServeConfigForGOOSAndUserContext(goos string, configIn *ipn.ServeC
10891089
switch goos {
10901090
case "windows":
10911091
return errors.New("must be a Windows local admin to serve a path")
1092-
case "linux", "darwin":
1092+
case "linux", "darwin", "illumos", "solaris":
10931093
return errors.New("must be root, or be an operator and able to run 'sudo tailscale' to serve a path")
10941094
default:
10951095
// We filter goos at the start of the func, this default case

ipn/localapi/localapi_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ func TestShouldDenyServeConfigForGOOSAndUserContext(t *testing.T) {
237237
}
238238

239239
for _, tt := range tests {
240-
for _, goos := range []string{"linux", "windows", "darwin"} {
240+
for _, goos := range []string{"linux", "windows", "darwin", "illumos", "solaris"} {
241241
t.Run(goos+"-"+tt.name, func(t *testing.T) {
242242
err := authorizeServeConfigForGOOSAndUserContext(goos, tt.configIn, tt.h)
243243
gotErr := err != nil

0 commit comments

Comments
 (0)