Skip to content

Commit

Permalink
Make locked root be completed only for kickstart
Browse files Browse the repository at this point in the history
With the rebase and later changes, root will always have a password filled,
or stay locked with empty password.

Changes both GUI and TUI.

Resolves: rhbz#1876727
  • Loading branch information
VladimirSlavik committed Sep 14, 2020
1 parent e3d32cd commit e1dd6aa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions pyanaconda/ui/gui/spokes/root_password.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ def apply(self):
# value from the kickstart changed
# NOTE: yet again, this stops to be valid once multiple
# commands are supported by a single DBUS module
#self._users_module.SetRootpwKickstarted(False) # !!!!
self.password_kickstarted = False

self._users_module.SetRootAccountLocked(False)
Expand All @@ -190,7 +189,10 @@ def apply(self):

@property
def completed(self):
return bool(self._users_module.IsRootPasswordSet or self._users_module.IsRootAccountLocked)
return bool(
self._users_module.IsRootPasswordSet or
(self._users_module.IsRootAccountLocked and flags.automatedInstall)
)

@property
def sensitive(self):
Expand Down
5 changes: 4 additions & 1 deletion pyanaconda/ui/tui/spokes/root_password.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ def __init__(self, data, storage, payload):

@property
def completed(self):
return bool(self._users_module.IsRootPasswordSet or self._users_module.IsRootAccountLocked)
return bool(
self._users_module.IsRootPasswordSet or
(self._users_module.IsRootAccountLocked and flags.automatedInstall)
)

@property
def showable(self):
Expand Down

0 comments on commit e1dd6aa

Please sign in to comment.