freebsd-ports/security/go-cve-dictionary/files/patch-commands_server.go
Richard Gallamore fda3db8dd1 This is tool to build a local copy of the National Vulnerabilities Database(NVD)
and the Japan Vulnerability Notes (JVN). NVD and JVN contain security
vulnerabilities according to their CVE identifiers, including exhaustive
information and a risk score. The local copy is generated in sqlite format, and
the tool has a server mode for easy querying.

WWW: https://github.com/kotakanbe/go-cve-dictionary/

PR:		220561
Submitted by:	Alexandru Ciobanu <iscandr@gmail.com> (maintainer)
Reviewed by:	matthew (mentor), koobs, mat
Approved by:	matthew (mentor)
Differential Revision:	https://reviews.freebsd.org/D11745
2017-07-28 18:22:22 +00:00

29 lines
924 B
Go

--- commands/server.go.orig 2017-06-26 10:39:59 UTC
+++ commands/server.go
@@ -3,7 +3,6 @@ package commands
import (
"context"
"flag"
- "os"
"github.com/google/subcommands"
c "github.com/kotakanbe/go-cve-dictionary/config"
@@ -37,7 +36,7 @@ func (*ServerCmd) Usage() string {
server
[-bind=127.0.0.1]
[-port=8000]
- [-dbpath=$PWD/cve.sqlite3 or connection string]
+ [-dbpath=/var/db/vuls/cve.sqlite3 or connection string]
[-dbtype=mysql|postgres|sqlite3|redis]
[-debug]
[-debug-sql]
@@ -56,8 +55,7 @@ func (p *ServerCmd) SetFlags(f *flag.Fla
defaultLogDir := util.GetDefaultLogDir()
f.StringVar(&p.logDir, "log-dir", defaultLogDir, "/path/to/log")
- pwd := os.Getenv("PWD")
- f.StringVar(&p.dbpath, "dbpath", pwd+"/cve.sqlite3",
+ f.StringVar(&p.dbpath, "dbpath", "/var/db/vuls/cve.sqlite3",
"/path/to/sqlite3 or SQL connection string")
f.StringVar(&p.dbtype, "dbtype", "sqlite3",