From b64115f283f486410c3ae39020c555e8e312a5ca Mon Sep 17 00:00:00 2001 From: kota kanbe Date: Sun, 10 Apr 2016 18:37:55 +0900 Subject: [PATCH] fix error while yum updateinfo --security update on rhel@aws --- scan/redhat.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scan/redhat.go b/scan/redhat.go index ad342e4f26..60b146a807 100644 --- a/scan/redhat.go +++ b/scan/redhat.go @@ -516,7 +516,7 @@ func (o *redhat) scanUnsecurePackagesUsingYumPluginSecurity() (CvePacksList, err if err != nil { return nil, fmt.Errorf("Failed to parse %s. err: %s", cmd, err) } - o.log.Debugf("%s", pp.Sprintf("%s", vulnerablePackInfoList)) + o.log.Debugf("%s", pp.Sprintf("%v", vulnerablePackInfoList)) for i, packInfo := range vulnerablePackInfoList { installedPack, found := o.Packages.FindByName(packInfo.Name) if !found { @@ -544,7 +544,7 @@ func (o *redhat) scanUnsecurePackagesUsingYumPluginSecurity() (CvePacksList, err // get advisoryID(RHSA, ALAS) - CVE IDs cmd = "yum updateinfo --security update" - r = o.ssh(util.PrependProxyEnv(cmd), noSudo) + r = o.ssh(util.PrependProxyEnv(cmd), sudo) if !r.isSuccess() { return nil, fmt.Errorf( "Failed to %s. status: %d, stdout: %s, stderr: %s",