Sandro Bonazzola has uploaded a new change for review.

Change subject: packaging: setup: hardening postgresql password
......................................................................

packaging: setup: hardening postgresql password

Use random.SystemRandom instead of random and
extend password lenght to 22 chars.

Change-Id: I76769e7eb65df35f982b1ef9e36bc81d1f42b79a
Signed-off-by: Sandro Bonazzola <[email protected]>
---
M packaging/setup/ovirt_engine_setup/postgres.py
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/15/27615/1

diff --git a/packaging/setup/ovirt_engine_setup/postgres.py 
b/packaging/setup/ovirt_engine_setup/postgres.py
index 7add279..0a4560b 100644
--- a/packaging/setup/ovirt_engine_setup/postgres.py
+++ b/packaging/setup/ovirt_engine_setup/postgres.py
@@ -1,6 +1,6 @@
 #
 # ovirt-engine-setup -- ovirt engine setup
-# Copyright (C) 2013 Red Hat, Inc.
+# Copyright (C) 2013-2014 Red Hat, Inc.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -466,7 +466,8 @@
             )
 
     def generatePassword(self):
-        return ''.join([random.choice(self._PASSWORD_CHARS) for i in range(8)])
+        rand = random.SystemRandom()
+        return ''.join([rand.choice(self._PASSWORD_CHARS) for i in range(22)])
 
     def applyEnvironment(self):
         for k in ('user', 'database', 'port', 'secured', 'hostValidation'):


-- 
To view, visit http://gerrit.ovirt.org/27615
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I76769e7eb65df35f982b1ef9e36bc81d1f42b79a
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sandro Bonazzola <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to