From 1337be2b841e8c0b9725815728d37c0a3ff745e6 Mon Sep 17 00:00:00 2001 From: pabroff Date: Wed, 11 May 2016 20:31:44 +0900 Subject: [PATCH 1/2] Fix scan on Japanese environment. --- scan/redhat.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scan/redhat.go b/scan/redhat.go index 11a69547..478fca71 100644 --- a/scan/redhat.go +++ b/scan/redhat.go @@ -287,7 +287,7 @@ func (o *redhat) scanUnsecurePackages() ([]CvePacksInfo, error) { //TODO return whether already expired. func (o *redhat) scanUnsecurePackagesUsingYumCheckUpdate() (CvePacksList, error) { - cmd := "yum --color=never check-update" + cmd := "LANG=EN yum --color=never check-update" r := o.ssh(util.PrependProxyEnv(cmd), sudo) if !r.isSuccess(0, 100) { //returns an exit code of 100 if there are available updates. @@ -515,7 +515,7 @@ func (o *redhat) scanUnsecurePackagesUsingYumPluginSecurity() (CvePacksList, err // get package name, version, rel to be upgrade. // cmd = "yum check-update --security" - cmd = "yum --color=never check-update" + cmd = "LANG=EN yum --color=never check-update" r = o.ssh(util.PrependProxyEnv(cmd), sudo) if !r.isSuccess(0, 100) { //returns an exit code of 100 if there are available updates. From f81f7858134994adf0528b94cae21112a525ac5d Mon Sep 17 00:00:00 2001 From: pabroff Date: Mon, 16 May 2016 14:20:57 +0900 Subject: [PATCH 2/2] Fix again on Japanese environment. --- scan/redhat.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scan/redhat.go b/scan/redhat.go index 478fca71..1c024f67 100644 --- a/scan/redhat.go +++ b/scan/redhat.go @@ -287,7 +287,7 @@ func (o *redhat) scanUnsecurePackages() ([]CvePacksInfo, error) { //TODO return whether already expired. func (o *redhat) scanUnsecurePackagesUsingYumCheckUpdate() (CvePacksList, error) { - cmd := "LANG=EN yum --color=never check-update" + cmd := "LANG=en_US.UTF-8 yum --color=never check-update" r := o.ssh(util.PrependProxyEnv(cmd), sudo) if !r.isSuccess(0, 100) { //returns an exit code of 100 if there are available updates. @@ -515,7 +515,7 @@ func (o *redhat) scanUnsecurePackagesUsingYumPluginSecurity() (CvePacksList, err // get package name, version, rel to be upgrade. // cmd = "yum check-update --security" - cmd = "LANG=EN yum --color=never check-update" + cmd = "LANG=en_US.UTF-8 yum --color=never check-update" r = o.ssh(util.PrependProxyEnv(cmd), sudo) if !r.isSuccess(0, 100) { //returns an exit code of 100 if there are available updates.