Hello community, here is the log from the commit of package yast2-users for openSUSE:Factory checked in at 2017-04-12 17:08:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-users (Old) and /work/SRC/openSUSE:Factory/.yast2-users.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-users" Wed Apr 12 17:08:53 2017 rev:203 rq:483820 version:3.2.11 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-users/yast2-users.changes 2017-02-04 16:52:37.200480262 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-users.new/yast2-users.changes 2017-04-12 17:08:55.165237734 +0200 @@ -1,0 +2,19 @@ +Thu Mar 16 15:35:45 UTC 2017 - [email protected] + +- Fixed a string comparison in Users perl module. (bsc#1029528) +- 3.2.11 + +------------------------------------------------------------------- +Tue Mar 7 13:49:49 UTC 2017 - [email protected] + +- do not ask again for already approved weak password second + attempt, so it will work also if widget is recreated(bsc#1025835) +- 3.2.10 + +------------------------------------------------------------------- +Mon Feb 20 09:06:14 UTC 2017 - [email protected] + +- do not ask again for already approved weak password (bsc#1025835) +- 3.2.9 + +------------------------------------------------------------------- Old: ---- yast2-users-3.2.8.tar.bz2 New: ---- yast2-users-3.2.11.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-users.spec ++++++ --- /var/tmp/diff_new_pack.NTFK1P/_old 2017-04-12 17:08:55.817145448 +0200 +++ /var/tmp/diff_new_pack.NTFK1P/_new 2017-04-12 17:08:55.821144883 +0200 @@ -17,7 +17,7 @@ Name: yast2-users -Version: 3.2.8 +Version: 3.2.11 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-users-3.2.8.tar.bz2 -> yast2-users-3.2.11.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-3.2.8/package/yast2-users.changes new/yast2-users-3.2.11/package/yast2-users.changes --- old/yast2-users-3.2.8/package/yast2-users.changes 2017-01-30 15:41:43.938183420 +0100 +++ new/yast2-users-3.2.11/package/yast2-users.changes 2017-03-30 14:56:06.008998414 +0200 @@ -1,4 +1,23 @@ ------------------------------------------------------------------- +Thu Mar 16 15:35:45 UTC 2017 - [email protected] + +- Fixed a string comparison in Users perl module. (bsc#1029528) +- 3.2.11 + +------------------------------------------------------------------- +Tue Mar 7 13:49:49 UTC 2017 - [email protected] + +- do not ask again for already approved weak password second + attempt, so it will work also if widget is recreated(bsc#1025835) +- 3.2.10 + +------------------------------------------------------------------- +Mon Feb 20 09:06:14 UTC 2017 - [email protected] + +- do not ask again for already approved weak password (bsc#1025835) +- 3.2.9 + +------------------------------------------------------------------- Fri Jan 20 15:28:22 UTC 2017 - [email protected] - Password widget: a compact layout, do not steal focus (FATE#322328) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-3.2.8/package/yast2-users.spec new/yast2-users-3.2.11/package/yast2-users.spec --- old/yast2-users-3.2.8/package/yast2-users.spec 2017-01-30 15:41:43.938183420 +0100 +++ new/yast2-users-3.2.11/package/yast2-users.spec 2017-03-30 14:56:06.008998414 +0200 @@ -17,7 +17,7 @@ Name: yast2-users -Version: 3.2.8 +Version: 3.2.11 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-3.2.8/src/lib/users/widgets.rb new/yast2-users-3.2.11/src/lib/users/widgets.rb --- old/yast2-users-3.2.8/src/lib/users/widgets.rb 2017-01-30 15:41:44.242183420 +0100 +++ new/yast2-users-3.2.11/src/lib/users/widgets.rb 2017-03-30 14:56:06.264998414 +0200 @@ -33,6 +33,12 @@ # The widget contains 2 password input fields # to type and retype the password class PasswordWidget < CWM::CustomWidget + + class << self + attr_accessor :approved_pwd + end + + # If `little_space` is `false` (the default), the widget will # use a vertical layout, and include a "don't forget this" label. # @@ -112,12 +118,16 @@ return false end + # do not ask again if already approved (bsc#1025835) + return true if self.class.approved_pwd == password1 + passwd = ::Users::LocalPassword.new(username: "root", plain: password1) # User can confirm using "invalid" password confirming all the errors if !passwd.valid? errors = passwd.errors + [_("Really use this password?")] Yast::UI.SetFocus(Id(:pw1)) return false unless Yast::Popup.YesNo(errors.join("\n\n")) + self.class.approved_pwd = password1 end return true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-3.2.8/src/modules/Users.pm new/yast2-users-3.2.11/src/modules/Users.pm --- old/yast2-users-3.2.8/src/modules/Users.pm 2017-01-30 15:41:44.298183420 +0100 +++ new/yast2-users-3.2.11/src/modules/Users.pm 2017-03-30 14:56:06.268998414 +0200 @@ -4064,7 +4064,7 @@ sub WriteAuthorizedKeys { foreach my $username (keys %{$modified_users{"local"}}) { my %user = %{$modified_users{"local"}{$username}}; - if ($user{"modified"} == "imported") { + if ($user{"modified"} eq "imported") { # Write authorized keys to user's home (FATE#319471) SSHAuthorizedKeys->write_keys($user{"homeDirectory"}); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-3.2.8/test/widgets_test.rb new/yast2-users-3.2.11/test/widgets_test.rb --- old/yast2-users-3.2.8/test/widgets_test.rb 2017-01-30 15:41:44.486183420 +0100 +++ new/yast2-users-3.2.11/test/widgets_test.rb 2017-03-30 14:56:06.452998414 +0200 @@ -84,6 +84,20 @@ expect(subject.validate).to eq false end + it "asks for confirmation only once for same password" do + stub_widget_value(:pw1, "a") + stub_widget_value(:pw2, "a") + + allow(Yast::UsersSimple).to receive(:CheckPassword).and_return("") + allow(Users::LocalPassword).to receive(:new).and_return(double(valid?: false, errors: ["E"])) + + expect(Yast::UI).to receive(:SetFocus).with(Id(:pw1)) + expect(Yast::Popup).to receive(:YesNo).and_return(true).once + + expect(subject.validate).to eq true + expect(subject.validate).to eq true + end + it "is valid otherwise" do stub_widget_value(:pw1, "a") stub_widget_value(:pw2, "a")
