diff options
| author | Paul Buetow <paul@buetow.org> | 2021-09-26 16:42:47 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2021-10-02 12:26:36 +0300 |
| commit | fcaa94c7453efa0d74e330128c0f5c2cde8f11b3 (patch) | |
| tree | 1f686e5eeeb1b180cc14a3586f388f1a3492899c /internal/ssh | |
| parent | fe3e68afd99d8ea246be52893730f987e138ec24 (diff) | |
refactor config reader - also looks in additional search paths for config file unless NONE is specified
Diffstat (limited to 'internal/ssh')
| -rw-r--r-- | internal/ssh/server/publickeycallback.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/ssh/server/publickeycallback.go b/internal/ssh/server/publickeycallback.go index 65ecdd1..59d1f31 100644 --- a/internal/ssh/server/publickeycallback.go +++ b/internal/ssh/server/publickeycallback.go @@ -15,7 +15,10 @@ import ( // PublicKeyCallback is for the server to check whether a public SSH key is authorized ot not. func PublicKeyCallback(c gossh.ConnMetadata, offeredPubKey gossh.PublicKey) (*gossh.Permissions, error) { - user := user.New(c.User(), c.RemoteAddr().String()) + user, err := user.New(c.User(), c.RemoteAddr().String()) + if err != nil { + return nil, err + } dlog.Common.Info(user, "Incoming authorization") cwd, err := os.Getwd() |
