[MERGE]: merge a contributer code from

https://code.launchpad.net/~syleam/openobject-server/trunk-disallow-postgres-user-connection/+merge/15743

bzr revid: mga@mga-20100311092228-us3atolctskyvjwc
This commit is contained in:
Mantavya Gajjar 2010-03-11 14:52:28 +05:30
commit a0d38adc74
1 changed files with 5 additions and 0 deletions

View File

@ -66,6 +66,11 @@ for name, value in [('addons_path', tools.config['addons_path']),
('database user', tools.config['db_user'])]:
logger.notifyChannel("server", netsvc.LOG_INFO, "%s - %s" % ( name, value ))
# Don't allow if the connection to PostgreSQL done by postgres user
if tools.config['db_user'] == 'postgres':
logger.notifyChannel("server", netsvc.LOG_ERROR, "%s" % ("Attempted to connect database with postgres user. This is a security flaws, aborting."))
sys.exit(1)
import time
#----------------------------------------------------------