[PATCH 3/3] Allow password spoke to be exited without password (#1004931)

Vratislav Podzimek vpodzime at redhat.com
Mon Oct 7 08:16:31 UTC 2013


On Fri, 2013-10-04 at 13:18 -0400, David Shea wrote:
> On 10/03/2013 04:05 AM, Vratislav Podzimek wrote:
> > On Wed, 2013-10-02 at 17:22 -0400, David Shea wrote:
> >> This makes the behavior of the root password spoke similar to that of
> >> the user spoke, in that you can enter it, do nothing, and hit "Done" to
> >> return to the progress hub.
> >> ---
> >>   pyanaconda/ui/gui/spokes/password.py | 13 +++++++++++--
> >>   1 file changed, 11 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/pyanaconda/ui/gui/spokes/password.py b/pyanaconda/ui/gui/spokes/password.py
> >> index c64df56..9dd9576 100644
> >> --- a/pyanaconda/ui/gui/spokes/password.py
> >> +++ b/pyanaconda/ui/gui/spokes/password.py
> >> @@ -97,6 +97,10 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke):
> >>           self.pw_bar.add_offset_value("high", 4)
> >>   
> >>       def refresh(self):
> >> +        # Enable the input checks in case they were disabled on the last exit
> >> +        for check in self.checks:
> >> +            check.enable()
> >> +
> >>           self.pw.grab_focus()
> >>           self.pw.emit("changed")
> >>   
> >> @@ -116,10 +120,10 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke):
> >>   
> >>       def apply(self):
> >>           pw = self.pw.get_text()
> >> -        if (not pw) and (self._kickstarted):
> >> +        if not pw:
> >>               return
> > What if I want to remove the password set in the kickstart?
> >
> Is this a case we want to handle? You can reset the user spoke by 
> removing the username, but we don't have any way to unset the root password.
> 
> The current behavior is that if the password is set by kickstart, the 
> unfocues password entry will indicate this, and the focused password 
> empty will be blank. Maybe if we put some fake characters in the field 
> when focused so that there's something to delete?
I'm not sure how to implement this, but I see it as a valid use case --
if there is root password set in the kickstart, but the user wants to
have root account locked (i.e. make the password empty). Maybe that
would need some bigger change to the spoke?

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list