From dac467c1e6b7b634e3dba24c51b28dae669c1051 Mon Sep 17 00:00:00 2001 From: Russ Magee Date: Wed, 27 Jun 2018 19:13:14 -0700 Subject: [PATCH] Corrected Println -> Printf logs for login/cmd tracking --- hkexshd/hkexshd.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hkexshd/hkexshd.go b/hkexshd/hkexshd.go index 729d12a..bae163e 100644 --- a/hkexshd/hkexshd.go +++ b/hkexshd/hkexshd.go @@ -295,7 +295,7 @@ func main() { addr := c.RemoteAddr() hname := goutmp.GetHost(addr.String()) - log.Println("[Running command for [%s@%s]]\n", rec.who, hname) + log.Printf("[Running command for [%s@%s]]\n", rec.who, hname) runShellAs(string(rec.who), string(rec.cmd), false, conn, chaffEnabled) // Returned hopefully via an EOF or exit/logout; // Clear current op so user can enter next, or EOF @@ -305,7 +305,7 @@ func main() { // Interactive session addr := c.RemoteAddr() hname := goutmp.GetHost(addr.String()) - log.Println("[Running shell for [%s@%s]]\n", rec.who, hname) + log.Printf("[Running shell for [%s@%s]]\n", rec.who, hname) utmpx := goutmp.Put_utmp(string(rec.who), hname) defer func() { goutmp.Unput_utmp(utmpx) }()