shirleyian / pentoo

Automatically exported from code.google.com/p/pentoo
1 stars 1 forks source link

Metasploit overwrites the database config #257

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Everytime someone updates msf, it overwrites the database config for the user. 
This is very annoying.
We should either config_protect it of remove the file and put an example 
instead.

File is /usr/lib/metasploit/config/database.yml

TIA

Original issue reported on code.google.com by grimm...@pentoo.ch on 23 Apr 2014 at 8:22

GoogleCodeExporter commented 9 years ago
yeah there is a problem, the database file isn't 
/usr/lib/metasploit/config/database.yml, it's 
/usr/lib{64,}/metasploit${SLOT}/config/database.yml

I don't see an easy way to handle this, we can config_protect it for 9999 
easily enough but the other versions it's just going to install a new one for 
every slot.

Would it maybe make more sense to have a database.yml in ~/.msf4 and call it 
from there? that way the ebuild never overwrites it and we only use the one in 
/usr/lib/metasploit/config/ if there isn't one in ~

If this is okay i think I can pull it off.

Original comment by sidhayn on 2 May 2014 at 1:30

GoogleCodeExporter commented 9 years ago
As you want. An other solution is to put an example file there and ask ppl to 
create their own config file if they want to use the DB.

Original comment by grimm...@pentoo.ch on 2 May 2014 at 9:48