From 2b4235eb0a3abfac6981acf259a841152673d346 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Sat, 5 Mar 2016 00:46:31 +0000 Subject: [PATCH 1/5] Don't read inst-sys users during autoinstallation --- src/modules/Users.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/Users.pm b/src/modules/Users.pm index 3de25bd54..060984d70 100644 --- a/src/modules/Users.pm +++ b/src/modules/Users.pm @@ -6154,7 +6154,7 @@ sub Import { # remove cache entries (#50265) UsersCache->ResetCache (); - my $error_msg = Mode->test () ? "" : $self->ReadLocal (); + my $error_msg = (Mode->test() || Stage->initial()) ? "" : $self->ReadLocal (); if ($error_msg) { return 0; } From f54942e8e696609735ad8ea554956717fc02de07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Sat, 5 Mar 2016 11:05:16 +0000 Subject: [PATCH 2/5] Bump version and update changes file --- package/yast2-users.changes | 7 +++++++ package/yast2-users.spec | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package/yast2-users.changes b/package/yast2-users.changes index 239b41823..e6462539f 100644 --- a/package/yast2-users.changes +++ b/package/yast2-users.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat Mar 5 11:04:17 UTC 2016 - igonzalezsosa@suse.com + +- Do not include inst-sys users when cloning the configuration + after the installation (bnc#965852) +- 3.1.41.2 + ------------------------------------------------------------------- Thu Feb 18 14:00:19 CET 2016 - schubi@suse.de diff --git a/package/yast2-users.spec b/package/yast2-users.spec index 15c9b498d..d2aac4711 100644 --- a/package/yast2-users.spec +++ b/package/yast2-users.spec @@ -17,7 +17,7 @@ Name: yast2-users -Version: 3.1.41.1 +Version: 3.1.41.2 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build From 89c713f3fdc5a1a757cabef7afe069f09a3ee95d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Mon, 7 Mar 2016 10:38:09 +0000 Subject: [PATCH 3/5] Comment fix to bnc#965852 --- src/modules/Users.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/Users.pm b/src/modules/Users.pm index 060984d70..ad229751e 100644 --- a/src/modules/Users.pm +++ b/src/modules/Users.pm @@ -6154,6 +6154,7 @@ sub Import { # remove cache entries (#50265) UsersCache->ResetCache (); + # Avoid to read local users during 1st stage (bnc#965852) my $error_msg = (Mode->test() || Stage->initial()) ? "" : $self->ReadLocal (); if ($error_msg) { return 0; From 7abf5d80299f75e8ba019313f725bbcbcc2ec8c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Mon, 7 Mar 2016 12:47:56 +0000 Subject: [PATCH 4/5] While importing during 1st stage we match by username --- src/modules/Users.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/Users.pm b/src/modules/Users.pm index ad229751e..c99c0e8f4 100644 --- a/src/modules/Users.pm +++ b/src/modules/Users.pm @@ -5885,8 +5885,9 @@ sub ImportUser { } } - if ($uid == -1) { - # check for existence of this user (and change it with given values) + if ($uid == -1 || Stage->initial()) { + # Check for existence of this user (and change it with given values). + # During 1st stage we simply match by username (bnc#965852). my %existing = %{$self->GetUserByName ($username, "")}; if (%existing) { From c9d98b14ad1f71d8157ee2addc1d83e527fffbef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Mon, 7 Mar 2016 16:29:10 +0000 Subject: [PATCH 5/5] Fix groups import during 1st stage * Groups are handled in the same way than users. --- src/modules/Users.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/modules/Users.pm b/src/modules/Users.pm index c99c0e8f4..9497cec6b 100644 --- a/src/modules/Users.pm +++ b/src/modules/Users.pm @@ -5887,7 +5887,7 @@ sub ImportUser { if ($uid == -1 || Stage->initial()) { # Check for existence of this user (and change it with given values). - # During 1st stage we simply match by username (bnc#965852). + # During 1st stage we simply match by username (bnc#965852). my %existing = %{$self->GetUserByName ($username, "")}; if (%existing) { @@ -5911,7 +5911,7 @@ sub ImportUser { $cn eq "") { $cn = $existing{"cn"} || ""; } - if ($gid == -1) { + if ($gid == -1 || Stage->initial()) { $gid = $existing{"gidNumber"}; } %ret = ( @@ -6001,8 +6001,9 @@ sub ImportGroup { $gid = $group{"gid"} if (!defined $gid); $gid = -1 if (!defined $gid); } - if ($gid == -1) { - # check for existence of this group (and change it with given values) + if ($gid == -1 || Stage->initial()) { + # Check for existence of this group (and change it with given values). + # During 1st stage we simply match by groupname (bnc#965852). my $existing = $self->GetGroupByName ($groupname, ""); if (ref ($existing) eq "HASH" && %{$existing}) { $gid = $existing->{"gidNumber"};