diff options
| author | Paul Buetow <paul@buetow.org> | 2021-10-29 08:31:26 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2021-10-29 08:31:26 +0300 |
| commit | ffa39a17f48ee9847cc85819d8134b5eb9482b77 (patch) | |
| tree | 22ac90a46160ccc2927ba0a5b4406906072a56bb /internal/ssh/server/publickeycallback.go | |
| parent | f9c51eb8bc3295c52dfde821aaed324f9447a993 (diff) | |
explicitly use dlog.Server for server packages and dlog.Clent for client packages for logging
Diffstat (limited to 'internal/ssh/server/publickeycallback.go')
| -rw-r--r-- | internal/ssh/server/publickeycallback.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/ssh/server/publickeycallback.go b/internal/ssh/server/publickeycallback.go index 585469f..c661419 100644 --- a/internal/ssh/server/publickeycallback.go +++ b/internal/ssh/server/publickeycallback.go @@ -23,9 +23,9 @@ func PublicKeyCallback(c gossh.ConnMetadata, return nil, err } - dlog.Common.Info(user, "Incoming authorization") + dlog.Server.Info(user, "Incoming authorization") if config.ServerRelaxedAuthEnable { - dlog.Common.Fatal(user, "Granting permissions via relaxed-auth") + dlog.Server.Fatal(user, "Granting permissions via relaxed-auth") return nil, nil } @@ -34,7 +34,7 @@ func PublicKeyCallback(c gossh.ConnMetadata, return nil, err } - dlog.Common.Info(user, "Reading", authorizedKeysFile) + dlog.Server.Info(user, "Reading", authorizedKeysFile) authorizedKeysBytes, err := ioutil.ReadFile(authorizedKeysFile) if err != nil { return nil, fmt.Errorf("Unable to read authorized keys file|%s|%s|%s", @@ -56,11 +56,11 @@ func verifyAuthorizedKeys(user *user.User, authorizedKeysBytes []byte, } authorizedKeysMap[string(authorizedPubKey.Marshal())] = true authorizedKeysBytes = restBytes - dlog.Common.Debug(user, "Authorized public key fingerprint", + dlog.Server.Debug(user, "Authorized public key fingerprint", gossh.FingerprintSHA256(authorizedPubKey)) } - dlog.Common.Debug(user, "Offered public key fingerprint", gossh.FingerprintSHA256(offeredPubKey)) + dlog.Server.Debug(user, "Offered public key fingerprint", gossh.FingerprintSHA256(offeredPubKey)) if authorizedKeysMap[string(offeredPubKey.Marshal())] { return &gossh.Permissions{ Extensions: map[string]string{"pubkey-fp": gossh.FingerprintSHA256(offeredPubKey)}, |
