[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:
commit
a0d38adc74
|
@ -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
|
||||
|
||||
#----------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue