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-b9f4589650da
unstable
Tod Beardsley 2011-10-17 21:23:59 +00:00
parent a5cc833d74
commit 3972fb1788
1 changed files with 1 additions and 1 deletions

View File

@ -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]