Skip to content

Commit bd02d00

Browse files
committed
ssh/tailssh: fix gokrazy SSH crash
Stupid mistake in earlier refactor. Updates gokrazy/gokrazy#209 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
1 parent 25a8daf commit bd02d00

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

ssh/tailssh/user.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,14 @@ func userLookup(username string) (*userMeta, error) {
5959
if distro.Get() == distro.Gokrazy {
6060
um, err := userLookupStd(username)
6161
if err != nil {
62-
um.User = user.User{
63-
Uid: "0",
64-
Gid: "0",
65-
Username: "root",
66-
Name: "Gokrazy",
67-
HomeDir: "/",
62+
um = &userMeta{
63+
User: user.User{
64+
Uid: "0",
65+
Gid: "0",
66+
Username: "root",
67+
Name: "Gokrazy",
68+
HomeDir: "/",
69+
},
6870
}
6971
}
7072
um.loginShellCached = "/tmp/serial-busybox/ash"

0 commit comments

Comments
 (0)