diff --git a/oval/debian.go b/oval/debian.go index 5e077689..9bccf21d 100644 --- a/oval/debian.go +++ b/oval/debian.go @@ -18,6 +18,7 @@ type DebianBase struct{ Base } // fillFromOvalDB returns scan result after updating CVE info by OVAL func (o DebianBase) fillFromOvalDB(r *models.ScanResult) error { + ovalconf.Conf.DebugSQL = config.Conf.DebugSQL ovalconf.Conf.DBType = config.Conf.OvalDBType ovalconf.Conf.DBPath = config.Conf.OvalDBPath if ovalconf.Conf.DBType == "sqlite3" { @@ -33,7 +34,7 @@ func (o DebianBase) fillFromOvalDB(r *models.ScanResult) error { var err error var ovaldb db.DB if ovaldb, err = db.NewDB( - ovalconf.Debian, + r.Family, ovalconf.Conf.DBType, ovalconf.Conf.DBPath, ovalconf.Conf.DebugSQL, diff --git a/oval/redhat.go b/oval/redhat.go index cfc174dd..d0ff57e8 100644 --- a/oval/redhat.go +++ b/oval/redhat.go @@ -57,6 +57,7 @@ func (o RedHatBase) fillFromOvalDB(r *models.ScanResult) error { func (o RedHatBase) getDefsByPackNameFromOvalDB(osRelease string, packs models.Packages) (relatedDefs []ovalmodels.Definition, err error) { + ovalconf.Conf.DebugSQL = config.Conf.DebugSQL ovalconf.Conf.DBType = config.Conf.OvalDBType if ovalconf.Conf.DBType == "sqlite3" { ovalconf.Conf.DBPath = config.Conf.OvalDBPath