diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-10 18:03:29 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-10 18:03:29 +0300 |
| commit | 28f6319b77d35c6da6b99ad7e35d0d5602dc2ee6 (patch) | |
| tree | 687b2c38755a087694cacacb73cd73b8ef244ce7 /internal/ssh/server/publickeycallback.go | |
| parent | 13b21feb07c86f65760f7338f284f3b492364cd9 (diff) | |
Fix known-hosts trust deadlock, host key stat, and optional nozstd build
- stdout logger: release mutex while waiting on pause resume so prompt
callbacks can log (fixes hang after trusting new hosts; known_hosts
was written but Resume never ran).
- known hosts callback: stop borrowing the SSH dial throttle channel
(could block or interact badly with parallel handshakes).
- host key path: use errors.Is(..., fs.ErrNotExist) for RootedPath.Stat
wrapped errors; stat errors now fail fast instead of mis-read.
- public key path: same ErrNotExist check for authorized_keys miss.
- Build: optional DTAIL_NO_ZSTD=yes / nozstd tag for CGO-free builds;
split zstd readers into tagged files.
- Docs/examples: firewalld note for port 2222, log prune timer+script,
SSHBindAddress note, dserver unit disabled-by-default comment;
firewalld helper script example.
- Regression test for stdout pause/mutex behavior.
Made-with: Cursor
Diffstat (limited to 'internal/ssh/server/publickeycallback.go')
| -rw-r--r-- | internal/ssh/server/publickeycallback.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/ssh/server/publickeycallback.go b/internal/ssh/server/publickeycallback.go index 3afbfba..df83bf6 100644 --- a/internal/ssh/server/publickeycallback.go +++ b/internal/ssh/server/publickeycallback.go @@ -1,7 +1,9 @@ package server import ( + "errors" "fmt" + iofs "io/fs" "os" goUser "os/user" "path/filepath" @@ -142,7 +144,7 @@ func findAuthorizedKeysPath(user *user.User, cacheDir, cwd string, if _, err = rootedAuthorizedKeysPath.Stat(); err == nil { return rootedAuthorizedKeysPath, nil } - if !os.IsNotExist(err) { + if !errors.Is(err, iofs.ErrNotExist) { return fs.RootedPath{}, err } |
