Corrected Println -> Printf logs for login/cmd tracking

This commit is contained in:
Russ Magee 2018-06-27 19:13:14 -07:00
parent 889203c9de
commit dac467c1e6
1 changed files with 2 additions and 2 deletions

View File

@ -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) }()