Hello community, here is the log from the commit of package yast2-users for openSUSE:Factory checked in at 2019-04-25 16:19:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-users (Old) and /work/SRC/openSUSE:Factory/.yast2-users.new.5536 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-users" Thu Apr 25 16:19:56 2019 rev:221 rq:694833 version:4.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-users/yast2-users.changes 2019-03-13 09:09:03.455424963 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-users.new.5536/yast2-users.changes 2019-04-25 16:19:57.734081685 +0200 @@ -1,0 +2,14 @@ +Tue Apr 16 14:27:28 UTC 2019 - Stefan Hundhammer <[email protected]> + +- Offer autologin only if a display manager that supports it is + installed (bsc#1128385) +- 4.2.0 + +------------------------------------------------------------------- +Mon Apr 15 13:57:04 CEST 2019 - [email protected] + +- AY creating user: Improved checking of already existing home + directories (bsc#1130158) +- 4.1.12 + +------------------------------------------------------------------- Old: ---- yast2-users-4.1.11.tar.bz2 New: ---- yast2-users-4.2.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-users.spec ++++++ --- /var/tmp/diff_new_pack.Hyu2cx/_old 2019-04-25 16:19:58.266081591 +0200 +++ /var/tmp/diff_new_pack.Hyu2cx/_new 2019-04-25 16:19:58.270081591 +0200 @@ -17,7 +17,7 @@ Name: yast2-users -Version: 4.1.11 +Version: 4.2.0 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -44,7 +44,10 @@ Requires: perl-X500-DN Requires: perl-gettext Requires: yast2-country -Requires: yast2-pam + +# Autologin.supported? +Requires: yast2-pam >= 4.2.0 + Requires: yast2-security Obsoletes: yast2-users-devel-doc Conflicts: autoyast2 < 3.1.92 ++++++ yast2-users-4.1.11.tar.bz2 -> yast2-users-4.2.0.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-4.1.11/Dockerfile new/yast2-users-4.2.0/Dockerfile --- old/yast2-users-4.1.11/Dockerfile 2019-03-12 09:27:24.000000000 +0100 +++ new/yast2-users-4.2.0/Dockerfile 2019-04-16 17:35:52.000000000 +0200 @@ -1,5 +1,5 @@ -FROM yastdevel/cpp -RUN zypper --gpg-auto-import-keys --non-interactive in --no-recommends \ +FROM registry.opensuse.org/yast/head/containers/yast-cpp:latest +RUN zypper --non-interactive in --force-resolution --no-recommends \ cracklib-devel \ perl-Digest-SHA1 \ perl-X500-DN \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-4.1.11/package/yast2-users.changes new/yast2-users-4.2.0/package/yast2-users.changes --- old/yast2-users-4.1.11/package/yast2-users.changes 2019-03-12 09:27:24.000000000 +0100 +++ new/yast2-users-4.2.0/package/yast2-users.changes 2019-04-16 17:35:52.000000000 +0200 @@ -1,4 +1,18 @@ ------------------------------------------------------------------- +Tue Apr 16 14:27:28 UTC 2019 - Stefan Hundhammer <[email protected]> + +- Offer autologin only if a display manager that supports it is + installed (bsc#1128385) +- 4.2.0 + +------------------------------------------------------------------- +Mon Apr 15 13:57:04 CEST 2019 - [email protected] + +- AY creating user: Improved checking of already existing home + directories (bsc#1130158) +- 4.1.12 + +------------------------------------------------------------------- Mon Mar 11 16:22:01 CET 2019 - [email protected] - Added tag home_btrfs_subvolume to *.rnc file (bsc#1128707) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-4.1.11/package/yast2-users.spec new/yast2-users-4.2.0/package/yast2-users.spec --- old/yast2-users-4.1.11/package/yast2-users.spec 2019-03-12 09:27:24.000000000 +0100 +++ new/yast2-users-4.2.0/package/yast2-users.spec 2019-04-16 17:35:52.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-users -Version: 4.1.11 +Version: 4.2.0 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -44,7 +44,10 @@ Requires: perl-X500-DN Requires: perl-gettext Requires: yast2-country -Requires: yast2-pam + +# Autologin.supported? +Requires: yast2-pam >= 4.2.0 + Requires: yast2-security Obsoletes: yast2-users-devel-doc Conflicts: autoyast2 < 3.1.92 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-4.1.11/src/lib/users/dialogs/inst_user_first.rb new/yast2-users-4.2.0/src/lib/users/dialogs/inst_user_first.rb --- old/yast2-users-4.1.11/src/lib/users/dialogs/inst_user_first.rb 2019-03-12 09:27:24.000000000 +0100 +++ new/yast2-users-4.2.0/src/lib/users/dialogs/inst_user_first.rb 2019-04-16 17:35:52.000000000 +0200 @@ -232,6 +232,7 @@ Yast.import "Report" Yast.import "UsersSimple" Yast.import "ProductFeatures" + Yast.import "Autologin" end # Check if creating local users is enabled (default) or disabled in the @@ -341,7 +342,11 @@ def refresh WIDGETS.values.flatten.each do |w| - UI.ChangeWidget(Id(w), :Enabled, WIDGETS[action].include?(w)) + enable = WIDGETS[action].include?(w) + if w == :autologin && enable && !Autologin.supported? + enable = false + end + UI.ChangeWidget(Id(w), :Enabled, enable) end end @@ -653,11 +658,22 @@ @use_pw_for_root ) ), - # checkbox label - Left(CheckBox(Id(:autologin), _("&Automatic Login"), @autologin)) + Left(autologin_checkbox) ] end + def autologin_checkbox + # checkbox label + label = _("&Automatic Login") + + if Autologin.supported? + CheckBox(Id(:autologin), label, @autologin) + else + @autologin = false + CheckBox(Id(:autologin), Opt(:disabled), label, false) + end + end + def import_qty_widget qty = @usernames_to_import.size msg = if qty == 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-4.1.11/src/modules/Users.pm new/yast2-users-4.2.0/src/modules/Users.pm --- old/yast2-users-4.1.11/src/modules/Users.pm 2019-03-12 09:27:24.000000000 +0100 +++ new/yast2-users-4.2.0/src/modules/Users.pm 2019-04-16 17:35:52.000000000 +0200 @@ -42,6 +42,10 @@ use Digest::SHA1 qw(sha1); use Data::Dumper; +$Data::Dumper::Sortkeys = 1; +$Data::Dumper::Terse = 1; +$Data::Dumper::Indent = 1; + our %TYPEINFO; # If YaST UI (Qt,ncurses) should be used. When this is off, some helper @@ -250,6 +254,29 @@ ##------------------------------------------------------------------------- ##----------------- various routines -------------------------------------- +# Check whether the argument is a directory and is not empty. +# +# Return 1 (non-empty dir) or 0. +# +# Note: do NOT use FileUtils->GetSize() for this! +# +sub dir_not_empty +{ + my $dir = shift; + my $not_empty = 0; + + if(opendir my $d, $dir) { + while(readdir $d) { + next if /^(\.|\.\.)$/; + $not_empty = 1; + last; + } + closedir $d; + } + + return $not_empty; +} + sub contains { my ( $list, $key, $ignorecase ) = @_; if (!defined $list || ref ($list) ne "ARRAY" || @{$list} == 0) { @@ -4469,9 +4496,9 @@ if ($user_mod eq "imported" || $user_mod eq "added") { y2usernote ("User '$username' created"); - if ($user_mod eq "imported" && FileUtils->GetSize ($home) > 0) { - # Directory already exists AND is not empty - y2milestone ("home directory $home of user $username already exists"); + if ($user_mod eq "imported" && dir_not_empty($home)) { + # directory already exists AND is not empty + y2milestone ("home directory $home of user $username already exists and is not empty"); next; } if (bool ($user{"no_skeleton"})) { @@ -4537,10 +4564,15 @@ } } - # Write authorized keys to user's home (FATE#319471) - if (defined($user{"authorized_keys"})) { - SSHAuthorizedKeys->write_keys($home, $user{"authorized_keys"}); - } + # Write authorized keys to user's home (FATE#319471) + if (defined($user{"authorized_keys"})) { + SSHAuthorizedKeys->write_keys($home, $user{"authorized_keys"}); + } + + my $save_passwd = $user{"userPassword"}; + $user{"userPassword"} = "*****"; # Reset before logging + y2milestone ("User = ", Dumper(\%user)); + $user{"userPassword"} = $save_passwd; } } } @@ -5774,7 +5806,7 @@ if (!defined ($username)) { $username = $user->{"uid"} || ""; } - y2debug("Username=$username"); + y2milestone("Username=$username"); my $uid = $user->{"uidNumber"}; if (!defined $uid) { @@ -5948,6 +5980,13 @@ $ret{"authorized_keys"} = \@authorized_keys; } + # AutoYaST-imported users don't go through AddUser(). This means we have + # to replicate some of that logic here: + # + # - don't copy skel files for system users (bsc#1130158) + # + $ret{no_skeleton} ||= 1 if $ret{type} eq "system"; + return \%ret; }
