From 2da01db438c760939ddd29e4af19e01cda31a314 Mon Sep 17 00:00:00 2001 From: Sadayuki Matsuno Date: Sun, 5 Jun 2016 13:40:16 +0900 Subject: [PATCH] change ssh terminal width to fix rhel check-update format error and add *config.toml into .gitignore --- .gitignore | 1 + scan/redhat_test.go | 2 +- scan/sshutil.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c6553f5a..5c2591bc 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ issues/ vendor/ log/ results/ +*config.toml diff --git a/scan/redhat_test.go b/scan/redhat_test.go index 8ef53e8c..61fc1a64 100644 --- a/scan/redhat_test.go +++ b/scan/redhat_test.go @@ -648,7 +648,7 @@ python-libs.i686 2.6.6-64.el6 rhui-REGION-rhel-server-releases func TestParseYumCheckUpdateLinesAmazon(t *testing.T) { r := newRedhat(config.ServerInfo{}) - r.Family = "amzon" + r.Family = "amazon" stdout := `Loaded plugins: priorities, update-motd, upgrade-helper 34 package(s) needed for security, out of 71 available diff --git a/scan/sshutil.go b/scan/sshutil.go index 6f4a6280..d454bb1d 100644 --- a/scan/sshutil.go +++ b/scan/sshutil.go @@ -167,7 +167,7 @@ func sshExec(c conf.ServerInfo, cmd string, sudo bool, log ...*logrus.Entry) (re ssh.TTY_OP_ISPEED: 14400, // input speed = 14.4kbaud ssh.TTY_OP_OSPEED: 14400, // output speed = 14.4kbaud } - if err = session.RequestPty("xterm", 400, 120, modes); err != nil { + if err = session.RequestPty("xterm", 400, 256, modes); err != nil { logger.Errorf("Failed to request for pseudo terminal. err: %s, c: %s", err, pp.Sprintf("%v", c))