Just because you can't read database.yml shouldn't mean you crash.
git-svn-id: file:///home/svn/framework3/trunk@13981 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
a5cc833d74
commit
3972fb1788
|
@ -175,7 +175,7 @@ class Driver < Msf::Ui::Driver
|
|||
dbfile = opts['DatabaseYAML']
|
||||
dbfile ||= ENV["MSF_DATABASE_CONFIG"]
|
||||
dbfile ||= File.join(Msf::Config.get_config_root, "database.yml")
|
||||
if (dbfile and File.exists? dbfile)
|
||||
if (dbfile and File.readable? dbfile)
|
||||
dbinfo = YAML.load(File.read(dbfile))
|
||||
dbenv = opts['DatabaseEnv'] || "production"
|
||||
db = dbinfo[dbenv]
|
||||
|
|
Loading…
Reference in New Issue