diff --git a/flake.nix b/flake.nix index 2a06f0f85..ed84cba30 100644 --- a/flake.nix +++ b/flake.nix @@ -172,4 +172,4 @@ }); }; } -# nix-direnv cache busting line: sha256-QsllX5yUsJznAf3niq8aKwbDO6Rut8Yyjl6FyCO7Kiw= +# nix-direnv cache busting line: sha256-UhlYeMCFqSuP6aLG3D9PFyjXf8ff68HO6MBvu/DDAOQ= diff --git a/flakehashes.json b/flakehashes.json index 741788301..f04be4b80 100644 --- a/flakehashes.json +++ b/flakehashes.json @@ -4,7 +4,7 @@ "sri": "sha256-Qmy06FkeFkjqCo1FLSD9dO7hTvdo/gC2VACJniuiQBU=" }, "vendor": { - "goModSum": "sha256-CQqT0MmBtyeIL6IdNcZWFaUDFU9z2IR7LKhTCmhrNl0=", - "sri": "sha256-QsllX5yUsJznAf3niq8aKwbDO6Rut8Yyjl6FyCO7Kiw=" + "goModSum": "sha256-8YZZZ5wSyCtYJiG3zRtOSYPBqDGW/Vbo2pIRFJROU+I=", + "sri": "sha256-UhlYeMCFqSuP6aLG3D9PFyjXf8ff68HO6MBvu/DDAOQ=" } } diff --git a/go.mod b/go.mod index 9da73454d..891810c46 100644 --- a/go.mod +++ b/go.mod @@ -54,7 +54,7 @@ require ( github.com/go-logr/zapr v1.3.0 github.com/go-ole/go-ole v1.3.0 github.com/go4org/hashtriemap v0.0.0-20260925222741-44e5305f85d9 - github.com/go4org/plan9netshell v0.0.0-20250324183649-788daa080737 + github.com/go4org/plan9netshell v0.0.0-20261130214832-f7dfc18b3ab6 github.com/godbus/dbus/v5 v5.2.2 github.com/gokrazy/breakglass v0.0.0-20261129143625-dde5ec3a2b06 github.com/gokrazy/firmware v0.0.0-20261126122533-fe094a467208 diff --git a/go.sum b/go.sum index 0d0b072e6..044042376 100644 --- a/go.sum +++ b/go.sum @@ -493,8 +493,8 @@ github.com/go-xmlfmt/xmlfmt v1.1.3 h1:t8Ey3Uy7jDSEisW2K3somuMKIpzktkWptA0iFCnRUW github.com/go-xmlfmt/xmlfmt v1.1.3/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/go4org/hashtriemap v0.0.0-20260925222741-44e5305f85d9 h1:J8S+Ms89nvHX1F9Ma2m3KhdTl41ZhbFKMyAJqvDA+iE= github.com/go4org/hashtriemap v0.0.0-20260925222741-44e5305f85d9/go.mod h1:OGmRfY/9QEK2P5zCRtmqfbCF283xPkU2dvVA4MvbvpI= -github.com/go4org/plan9netshell v0.0.0-20250324183649-788daa080737 h1:cf60tHxREO3g1nroKr2osU3JWZsJzkfi7rEg+oAB0Lo= -github.com/go4org/plan9netshell v0.0.0-20250324183649-788daa080737/go.mod h1:MIS0jDzbU/vuM9MC4YnBITCv+RYuTRq8dJzmCrFsK9g= +github.com/go4org/plan9netshell v0.0.0-20261130214832-f7dfc18b3ab6 h1:CMyTWglRVWGWh9q2kNEm84/DewiLMsMQtcMmOjxbS0Q= +github.com/go4org/plan9netshell v0.0.0-20261130214832-f7dfc18b3ab6/go.mod h1:MIS0jDzbU/vuM9MC4YnBITCv+RYuTRq8dJzmCrFsK9g= github.com/gobuffalo/flect v1.0.3 h1:xeWBM2nui+qnVvNM4S3foBhCAL2XgPU+a7FdpelbTq4= github.com/gobuffalo/flect v1.0.3/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= diff --git a/shell.nix b/shell.nix index 508d26f99..12a8a3711 100644 --- a/shell.nix +++ b/shell.nix @@ -16,4 +16,4 @@ ) { src = ./.; }).shellNix -# nix-direnv cache busting line: sha256-QsllX5yUsJznAf3niq8aKwbDO6Rut8Yyjl6FyCO7Kiw= +# nix-direnv cache busting line: sha256-UhlYeMCFqSuP6aLG3D9PFyjXf8ff68HO6MBvu/DDAOQ= diff --git a/ssh/tailssh/incubator_plan9.go b/ssh/tailssh/incubator_plan9.go index 63b4a5745..b1bab372b 100644 --- a/ssh/tailssh/incubator_plan9.go +++ b/ssh/tailssh/incubator_plan9.go @@ -43,7 +43,13 @@ func registerIncubator() { // `tailscaled be-child ssh` as the entrypoint. // // If ss.srv.tailscaledPath is empty, this method is equivalent to -// exec.CommandContext. +// exec.Command. +// +// The command is not tied to ss.ctx: canceling the session must not kill +// the child. A disconnect closes the child's stdio, which makes netshell +// hang up the shell's note group the way closing a PTY master signals +// the foreground process group on Unix. Mandated terminations signal the +// child explicitly in [sshSession.hangupProcess]. // // It also returns forwardedEnv, the client-forwarded environment variables // accepted by the acceptEnv policy. These may contain secrets, so the caller @@ -77,7 +83,7 @@ func (ss *sshSession) newIncubatorCommand(logf logger.Logf) (cmd *exec.Cmd, forw loginShell := ss.conn.localUser.LoginShell() logf("directly running /bin/rc -c %q", ss.RawCommand()) - return exec.CommandContext(ss.ctx, loginShell, "-c", ss.RawCommand()), nil, nil + return exec.Command(loginShell, "-c", ss.RawCommand()), nil, nil } lu := ss.conn.localUser @@ -140,7 +146,7 @@ func (ss *sshSession) newIncubatorCommand(logf logger.Logf) (cmd *exec.Cmd, forw } } - return exec.CommandContext(ss.ctx, ss.conn.srv.tailscaledPath, incubatorArgs...), forwardedEnv, nil + return exec.Command(ss.conn.srv.tailscaledPath, incubatorArgs...), forwardedEnv, nil } var debugTest atomic.Bool