Hello community,

here is the log from the commit of package yast2-users for openSUSE:Factory 
checked in at 2015-07-16 17:18:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-users (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-users.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-users"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-users/yast2-users.changes  2015-02-22 
17:24:55.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-users.new/yast2-users.changes     
2015-07-16 17:18:39.000000000 +0200
@@ -1,0 +2,13 @@
+Thu Jul  2 20:49:05 UTC 2015 - igonzalezs...@suse.com
+
+- Allow editing password-less users (bsc#928607)
+- 3.1.39
+
+-------------------------------------------------------------------
+Thu Jul  2 11:37:00 UTC 2015 - jreidin...@suse.com
+
+- Allow setting the root password to "0" (the digit zero)
+  (bnc#930909)
+- 3.1.38
+
+-------------------------------------------------------------------

Old:
----
  yast2-users-3.1.37.tar.bz2

New:
----
  yast2-users-3.1.39.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-users.spec ++++++
--- /var/tmp/diff_new_pack.U6WXrS/_old  2015-07-16 17:18:39.000000000 +0200
+++ /var/tmp/diff_new_pack.U6WXrS/_new  2015-07-16 17:18:39.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package yast2-users
 #
-# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-users
-Version:        3.1.37
+Version:        3.1.39
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-users-3.1.37.tar.bz2 -> yast2-users-3.1.39.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-3.1.37/CONTRIBUTING.md 
new/yast2-users-3.1.39/CONTRIBUTING.md
--- old/yast2-users-3.1.37/CONTRIBUTING.md      2015-02-19 10:12:16.000000000 
+0100
+++ new/yast2-users-3.1.39/CONTRIBUTING.md      2015-07-08 11:52:37.000000000 
+0200
@@ -12,13 +12,13 @@
 -----------
 
 If you find a problem, please report it either using
-[Bugzilla](https://bugzilla.novell.com/enter_bug.cgi?format=guided&product=openSUSE+Factory&component=YaST2)
+[Bugzilla](https://bugzilla.suse.com/enter_bug.cgi?format=guided&product=openSUSE+Factory&component=YaST2)
 or [GitHub issues](../../issues). (For Bugzilla, use the [simplified
 
registration](https://secure-www.novell.com/selfreg/jsp/createSimpleAccount.jsp)
 if you don't have an account yet.)
 
 If you find a problem, please report it either using
-[Bugzilla](https://bugzilla.novell.com/) or GitHub issues. We can't guarantee
+[Bugzilla](https://bugzilla.suse.com/) or GitHub issues. We can't guarantee
 that every bug will be fixed, but we'll try.
 
 When creating a bug report, please follow our [bug reporting
@@ -71,7 +71,7 @@
 [widely used
 
conventions](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
 
-If your commit is related to a bug in Buzgilla or an issue on GitHub, make sure
+If your commit is related to a bug in Bugzilla or an issue on GitHub, make sure
 you mention it in the commit message for cross-reference. Use format like
 bnc#775814 or gh#yast/yast-foo#42. See also [GitHub
 
autolinking](https://help.github.com/articles/github-flavored-markdown#references)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-3.1.37/package/yast2-users.changes 
new/yast2-users-3.1.39/package/yast2-users.changes
--- old/yast2-users-3.1.37/package/yast2-users.changes  2015-02-19 
10:12:16.000000000 +0100
+++ new/yast2-users-3.1.39/package/yast2-users.changes  2015-07-08 
11:52:37.000000000 +0200
@@ -1,4 +1,17 @@
 -------------------------------------------------------------------
+Thu Jul  2 20:49:05 UTC 2015 - igonzalezs...@suse.com
+
+- Allow editing password-less users (bsc#928607)
+- 3.1.39
+
+-------------------------------------------------------------------
+Thu Jul  2 11:37:00 UTC 2015 - jreidin...@suse.com
+
+- Allow setting the root password to "0" (the digit zero)
+  (bnc#930909)
+- 3.1.38
+
+-------------------------------------------------------------------
 Thu Feb  5 13:21:44 CET 2015 - g...@suse.de
 
 - Text mode: set F9 function key binding correctly (bnc #881396)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-3.1.37/package/yast2-users.spec 
new/yast2-users-3.1.39/package/yast2-users.spec
--- old/yast2-users-3.1.37/package/yast2-users.spec     2015-02-19 
10:12:16.000000000 +0100
+++ new/yast2-users-3.1.39/package/yast2-users.spec     2015-07-08 
11:52:37.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-users
-Version:        3.1.37
+Version:        3.1.39
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-3.1.37/src/modules/Users.pm 
new/yast2-users-3.1.39/src/modules/Users.pm
--- old/yast2-users-3.1.37/src/modules/Users.pm 2015-02-19 10:12:16.000000000 
+0100
+++ new/yast2-users-3.1.39/src/modules/Users.pm 2015-07-08 11:52:37.000000000 
+0200
@@ -5443,9 +5443,11 @@
     }
 
     if ($error eq "") {
-       # do not check pw when it wasn't changed - must be tested directly
-       if (defined ($user{"userPassword"}) ||
-           ($user{"what"} || "") eq "add_user") {
+        # Check password only if:
+        # * It's defined or we're adding a user
+        # * AND password is not encrypted (it means that password was changed)
+       if ((defined ($user{"userPassword"}) ||
+           ($user{"what"} || "") eq "add_user") && (!$user{"encrypted"})) {
            $error = UsersSimple->CheckPassword ($user{"userPassword"}, $type);
        }
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-3.1.37/src/modules/UsersSimple.pm 
new/yast2-users-3.1.39/src/modules/UsersSimple.pm
--- old/yast2-users-3.1.37/src/modules/UsersSimple.pm   2015-02-19 
10:12:17.000000000 +0100
+++ new/yast2-users-3.1.39/src/modules/UsersSimple.pm   2015-07-08 
11:52:37.000000000 +0200
@@ -906,7 +906,7 @@
 sub Write {
     my $self           = shift;
 
-    if ($root_password) {
+    if ($root_password ne "") {
        # write root password now
        return $self->WriteRootPassword ();
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-3.1.37/testsuite/tests/CheckUser.out 
new/yast2-users-3.1.39/testsuite/tests/CheckUser.out
--- old/yast2-users-3.1.37/testsuite/tests/CheckUser.out        1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-users-3.1.39/testsuite/tests/CheckUser.out        2015-07-08 
11:52:37.000000000 +0200
@@ -0,0 +1,21 @@
+Dump   ------- Correct user
+Return 
+Dump   ------- Without uid
+Return No username entered.
+Dump   ------- error: No username entered.
+Dump   Try again.
+Dump   ------- With not valid uidNumber
+Return The selected user ID is not allowed.
+Dump   ------- error: The selected user ID is not allowed.
+Dump   Select a valid integer between 1000 and 60000.
+Dump   ------- Without password
+Return No password entered.
+Dump   ------- error: No password entered.
+Dump   Try again.
+Dump   ------- Without password (but with an encrypted one)
+Return 
+Dump   ------- With duplicated uid
+Return There is a conflict between the entered
+Dump   ------- error: There is a conflict between the entered
+Dump   username and an existing username. 
+Dump   Try another one.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-3.1.37/testsuite/tests/CheckUser.rb 
new/yast2-users-3.1.39/testsuite/tests/CheckUser.rb
--- old/yast2-users-3.1.37/testsuite/tests/CheckUser.rb 1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-users-3.1.39/testsuite/tests/CheckUser.rb 2015-07-08 
11:52:37.000000000 +0200
@@ -0,0 +1,61 @@
+module Yast
+  class CheckUserClient < Client
+    def main
+      # testedfiles: Users.pm
+      Yast.import "Testsuite"
+      Yast.import "Users"
+      Yast.import "UsersSimple"
+      Yast.import "Mode"
+
+      # When Mode.test, some code does not get executed.
+      # In this case, we need UsersCache.UsernameExists to
+      # behave in a normal way.
+      old_test_mode = Mode.testMode
+      Mode.SetTest("none")
+
+      @READ = { "uid" => { "username" => 1 } }
+      @WRITE = {}
+      @EXEC = { "target" => { "bash_output" => { "stdout" => "checkuser" } } }
+
+      user = { "uid" => "checkuser", "uidNumber" => 2000,
+               "what" => "add_user", "userPassword" => "n0ts3cr3t",
+               "type" => "local"}
+
+      # Test correct user
+      test_user("Correct user", user)
+
+      # Test user without uid
+      test_user("Without uid", user.merge("uid" => ""))
+
+      # Test user without uidNumber
+      test_user("With not valid uidNumber", user.merge("uidNumber" => 70000))
+
+      # Test user without password
+      test_user("Without password", user.merge("userPassword" => ""))
+
+      # Test user without password (but with an encrypted password)
+      test_user("Without password (but with an encrypted one)",
+                user.merge("userPassword" => "", "encrypted" => "$$$"))
+
+      # Test user with duplicated uid
+      test_user("With duplicated uid", user,
+                read: @READ.merge("uid" => { "username" => 0 }))
+
+      # Restore test mode
+      Mode.SetTest(old_test_mode)
+    end
+
+    def test_user(title, user, read: nil, write: nil, execute: nil)
+      read ||= @READ
+      write ||= @WRITE
+      execute ||= @EXEC
+      Testsuite.Dump(Builtins.sformat("------- %1", title))
+      err = Convert.to_string(
+        Testsuite.Test(-> { Users.CheckUser(user) }, [read, write, execute], 0)
+      )
+      Testsuite.Dump(Builtins.sformat("------- error: %1", err)) unless 
err.empty?
+    end
+  end
+end
+
+Yast::CheckUserClient.new.main


Reply via email to