[node-patches] Change in ovirt-node[master]: instaler: Hardcode username in upgrade page

fabiand at fedoraproject.org fabiand at fedoraproject.org
Wed Mar 6 13:25:35 UTC 2013


Fabian Deutsch has uploaded a new change for review.

Change subject: instaler: Hardcode username in upgrade page
......................................................................

instaler: Hardcode username in upgrade page

Previously os.getlogin() was used to determin the username during
upgrade, but this doesn't work because the username is not yet available
(because we are still botting).

Change-Id: Ib9f57a64bc395b1af072a9a60db111a6b7b749e7
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M scripts/tui/src/ovirt/node/installer/upgrade_page.py
1 file changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/65/12765/1

diff --git a/scripts/tui/src/ovirt/node/installer/upgrade_page.py b/scripts/tui/src/ovirt/node/installer/upgrade_page.py
index 2632d12..dc518cc 100644
--- a/scripts/tui/src/ovirt/node/installer/upgrade_page.py
+++ b/scripts/tui/src/ovirt/node/installer/upgrade_page.py
@@ -20,7 +20,6 @@
 # also available at http://www.gnu.org/copyleft/gpl.html.
 from ovirt.node import plugins, ui, installer, exceptions
 from ovirt.node.utils import security
-import os
 
 """
 Password confirmation page for the upgarde part of the installer
@@ -94,8 +93,10 @@
         if changes.contains_any(["upgrade.current_password",
                                  "button.next"]):
             pam = security.PAM()
-            if pam.authenticate(os.getlogin(),
-                                changes["upgrade.current_password"]):
+            # We can't use os.getlogin() here, b/c upgrade happens during boot
+            # w/o login
+            username = "admin"
+            if pam.authenticate(username, changes["upgrade.current_password"]):
                 nav = self.application.ui.navigate
                 nav.to_plugin(installer.progress_page.Plugin)
             else:


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib9f57a64bc395b1af072a9a60db111a6b7b749e7
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list