commit yast2-users for openSUSE:Factory
Hello community,
here is the log from the commit of package yast2-users for openSUSE:Factory checked in at 2019-02-28 21:48:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-users (Old)
and /work/SRC/openSUSE:Factory/.yast2-users.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-users"
Thu Feb 28 21:48:37 2019 rev:218 rq:680051 version:4.1.9
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-users/yast2-users.changes 2019-02-24 18:02:32.159792265 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-users.new.28833/yast2-users.changes 2019-02-28 21:48:38.961390684 +0100
@@ -1,0 +2,7 @@
+Wed Feb 27 14:32:46 UTC 2019 - mvidner@suse.com
+
+- Delete remaining dead code for encrypted homes
+ (bsc#1127138, fate#323541).
+- 4.1.9
+
+-------------------------------------------------------------------
Old:
----
yast2-users-4.1.8.tar.bz2
New:
----
yast2-users-4.1.9.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-users.spec ++++++
--- /var/tmp/diff_new_pack.nKicRs/_old 2019-02-28 21:48:39.493390457 +0100
+++ /var/tmp/diff_new_pack.nKicRs/_new 2019-02-28 21:48:39.497390455 +0100
@@ -17,7 +17,7 @@
Name: yast2-users
-Version: 4.1.8
+Version: 4.1.9
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-users-4.1.8.tar.bz2 -> yast2-users-4.1.9.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-4.1.8/package/yast2-users.changes new/yast2-users-4.1.9/package/yast2-users.changes
--- old/yast2-users-4.1.8/package/yast2-users.changes 2019-02-18 11:55:24.000000000 +0100
+++ new/yast2-users-4.1.9/package/yast2-users.changes 2019-02-28 09:56:24.000000000 +0100
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Wed Feb 27 14:32:46 UTC 2019 - mvidner@suse.com
+
+- Delete remaining dead code for encrypted homes
+ (bsc#1127138, fate#323541).
+- 4.1.9
+
+-------------------------------------------------------------------
Mon Feb 18 11:22:24 CET 2019 - schubi@suse.de
- Fixed console warning produced by Users.pm module.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-4.1.8/package/yast2-users.spec new/yast2-users-4.1.9/package/yast2-users.spec
--- old/yast2-users-4.1.8/package/yast2-users.spec 2019-02-18 11:55:24.000000000 +0100
+++ new/yast2-users-4.1.9/package/yast2-users.spec 2019-02-28 09:56:24.000000000 +0100
@@ -17,7 +17,7 @@
Name: yast2-users
-Version: 4.1.8
+Version: 4.1.9
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-4.1.8/src/include/users/widgets.rb new/yast2-users-4.1.9/src/include/users/widgets.rb
--- old/yast2-users-4.1.8/src/include/users/widgets.rb 2019-02-18 11:55:24.000000000 +0100
+++ new/yast2-users-4.1.9/src/include/users/widgets.rb 2019-02-28 09:56:24.000000000 +0100
@@ -1143,10 +1143,6 @@
no_home = false
# check if dir exists with this owner
stat = Convert.to_map(SCR.Read(path(".target.stat"), home))
- crypted_img = UsersRoutines.CryptedImagePath(username)
- if crypted_img != "" # check crypted dir image
- stat = Convert.to_map(SCR.Read(path(".target.stat"), crypted_img))
- end
if type == "ldap" && !Ldap.file_server ||
Ops.get_integer(stat, "uid", -1) != uid
no_home = true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-4.1.8/src/modules/Users.pm new/yast2-users-4.1.9/src/modules/Users.pm
--- old/yast2-users-4.1.8/src/modules/Users.pm 2019-02-18 11:55:24.000000000 +0100
+++ new/yast2-users-4.1.9/src/modules/Users.pm 2019-02-28 09:56:24.000000000 +0100
@@ -4093,17 +4093,6 @@
return $ret;
}
-# Remove crypted direcotries - because of 'cryptconfig pm-disable' call, this
-# must be done when user is still known to PAM...
-sub DeleteCryptedHomes {
-
- my $ret = 1;
- foreach my $home (keys %removed_homes) {
- $ret = $ret && UsersRoutines->DeleteCryptedHome ($home, $removed_homes{$home});
- };
- return $ret;
-}
-
##------------------------------------
# 1. remove home directories,
# 2. execute USERDEL_POSTCMD scripts for deleted local/system users
@@ -4448,13 +4437,6 @@
$plugin_error = GetPluginError ($args, $result);
}
}
- # remove the crypted directories now, so cryptconfig still knows them
- if (!DeleteCryptedHomes ()) {
- # error popup
- $ret = __("An error occurred while removing users.");
- Report->Error ($ret);
- return $ret;
- }
# -------------------------------------- write /etc/passwd
if ($plugin_error eq "" && !WritePasswd ()) {
$ret = Message->ErrorWritingFile ("$base_directory/passwd");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-4.1.8/src/modules/UsersLDAP.pm new/yast2-users-4.1.9/src/modules/UsersLDAP.pm
--- old/yast2-users-4.1.8/src/modules/UsersLDAP.pm 2019-02-18 11:55:24.000000000 +0100
+++ new/yast2-users-4.1.9/src/modules/UsersLDAP.pm 2019-02-28 09:56:24.000000000 +0100
@@ -1422,7 +1422,6 @@
else {
if ($server && $delete_home) {
UsersRoutines->DeleteHome ($home);
- UsersRoutines->DeleteCryptedHome ($home, $org_username);
}
y2usernote ("LDAP user '$username' was deleted.");
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-4.1.8/src/modules/UsersRoutines.pm new/yast2-users-4.1.9/src/modules/UsersRoutines.pm
--- old/yast2-users-4.1.8/src/modules/UsersRoutines.pm 2019-02-18 11:55:24.000000000 +0100
+++ new/yast2-users-4.1.9/src/modules/UsersRoutines.pm 2019-02-28 09:56:24.000000000 +0100
@@ -37,7 +37,6 @@
##------------------- global imports
YaST::YCP::Import ("FileUtils");
-YaST::YCP::Import ("Pam");
YaST::YCP::Import ("Report");
YaST::YCP::Import ("SCR");
YaST::YCP::Import ("String");
@@ -45,24 +44,6 @@
##------------------------------------
##------------------- global variables
-# path to cryptconfig
-my $cryptconfig = "/usr/sbin/cryptconfig";
-
-# path to pam_mount configuration file
-my $pam_mount_path = "/etc/security/pam_mount.conf.xml";
-
-# 'volume' information from pam_mount (info about crypted homes)
-my $pam_mount = undef;
-
-# owners of img files
-my $img2user = undef;
-
-# owners of key files
-my $key2user = undef;
-
-# could we use pam_mount? currntly not if fingerprint dev is in use (bnc#390810)
-my $crypted_homes_enabled = undef;
-
# path to btrfs
my $btrfs = "/usr/sbin/btrfs";
@@ -313,170 +294,5 @@
return 1;
}
-##------------------------------------
-# Delete the crypted directory
-# @param home path to home directory
-# @param user name (to know the key and img name)
-# @return success
-BEGIN { $TYPEINFO{DeleteCryptedHome} = ["function", "boolean", "string", "string"];}
-sub DeleteCryptedHome {
-
- my $self = shift;
- my $home = shift;
- my $username = shift;
- my $ret = 1;
-
- return 0 if ((not defined $home) || (not defined $username));
-
- my $img_path = $self->CryptedImagePath ($username);
- my $key_path = $self->CryptedKeyPath ($username);
-
- if (%{SCR->Read (".target.stat", $key_path)}) {
- my $cmd = "/usr/bin/rm -rf '".String->Quote($key_path)."'";
- my $out = SCR->Execute (".target.bash_output", $cmd);
- if (($out->{"exit"} || 0) ne 0) {
- y2error ("error while removing $key_path file: ", $out->{"stderr"} || "");
- $ret = 0;
- }
- y2usernote ("Encrypted directory key removed: '$cmd'");
- }
- if (%{SCR->Read (".target.stat", $img_path)}) {
- my $cmd = "/usr/bin/rm -rf '".String->Quote($img_path)."'";
- my $out = SCR->Execute (".target.bash_output", $cmd);
- if (($out->{"exit"} || 0) ne 0) {
- y2error ("error while removing $img_path file: ", $out->{"stderr"} || "");
- $ret = 0;
- }
- y2usernote ("Encrypted directory image removed: '$cmd'");
- $cmd = "$cryptconfig pm-disable '".String->Quote($username)."'";
- $out = SCR->Execute (".target.bash_output", $cmd);
- if ($out->{"exit"} ne 0 && $out->{"stderr"}) {
- y2error ("error calling $cmd: ", $out->{"stderr"});
- Report->Error ($out->{"stderr"});
- $ret = 0;
- }
- y2usernote ("Disabled pam_mount for $username: '$cmd'");
- }
- return $ret;
-}
-
-##------------------------------------
-# Return size of given file in MB (rounded down)
-# @param path to file
-# @return size
-BEGIN { $TYPEINFO{FileSizeInMB} = ["function", "string", "string"];}
-sub FileSizeInMB {
- my $self = shift;
- my $file = shift;
-
- return "0" if not defined $file;
-
- my $stat = SCR->Read (".target.stat", $file);
-
- my $size = $stat->{"size"};
- return "0" if not $size;
-
- my $mb = 1024 * 1024;
- return ($size < $mb) ? "1" : sprintf ("%i", $size / $mb);
-}
-
-# Read the 'volume' data from pam_mount config file and fill in the global map
-BEGIN { $TYPEINFO{ReadCryptedHomesInfo} = ["function", "boolean"];}
-sub ReadCryptedHomesInfo {
-
- return 1 if (defined $pam_mount);
- y2milestone ("pam_mount not read yet, doing it now");
- if (FileUtils->Exists ($pam_mount_path)) {
- my $pam_mount_cont = SCR->Read (".anyxml", $pam_mount_path);
- if (defined $pam_mount_cont &&
- defined $pam_mount_cont->{"pam_mount"}[0]{"volume"})
- {
- my $volumes = $pam_mount_cont->{"pam_mount"}[0]{"volume"};
- if (ref ($volumes) eq "ARRAY") {
- foreach my $usermap (@{$volumes}) {
- my $username = $usermap->{"user"};
- next if !defined $username;
- $pam_mount->{$username} = $usermap;
- my $img = $usermap->{"path"} || "";
- $img2user->{$img} = $username if $img;
- my $key = $usermap->{"fskeypath"} || "";
- $key2user->{$key} = $username if $key;
- }
- }
- }
- return 1 if defined $pam_mount;
- }
- else {
- y2milestone ("file $pam_mount_path not found");
- $pam_mount = {};
- }
- return 0;
-}
-
-##------------------------------------
-# Return the owner of given crypted directory image
-# @param image name
-# @return string
-BEGIN { $TYPEINFO{CryptedImageOwner} = ["function", "string", "string"];}
-sub CryptedImageOwner {
-
- my $self = shift;
- my $img_file= shift;
-
- if ($self->ReadCryptedHomesInfo ()) {
- return $img2user->{$img_file} || "";
- }
- return "";
-}
-
-##------------------------------------
-# Return the owner of given crypted directory key
-# @param key name
-# @return string
-BEGIN { $TYPEINFO{CryptedKeyOwner} = ["function", "string", "string"];}
-sub CryptedKeyOwner {
-
- my $self = shift;
- my $key_file= shift;
-
- if ($self->ReadCryptedHomesInfo ()) {
- return $key2user->{$key_file} || "";
- }
- return "";
-}
-
-##------------------------------------
-# Return the path to user's crypted directory image; returns empty string if there is none defined
-# @param user name
-# @return string
-BEGIN { $TYPEINFO{CryptedImagePath} = ["function", "string", "string"];}
-sub CryptedImagePath {
-
- my $self = shift;
- my $user = shift;
-
- if ($self->ReadCryptedHomesInfo ()) {
- return $pam_mount->{$user}{"path"} || "";
- }
- return "";
-}
-
-##------------------------------------
-# Return the path to user's crypted directory key; returns empty string if there is none defined
-# @param user name
-# @return string
-BEGIN { $TYPEINFO{CryptedKeyPath} = ["function", "string", "string"];}
-sub CryptedKeyPath {
-
- my $self = shift;
- my $user = shift;
-
- if ($self->ReadCryptedHomesInfo ()) {
- return $pam_mount->{$user}{"fskeypath"} || "";
- }
- return "";
-}
-
-
1
# EOF
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-4.1.8/testsuite/tests/CryptedDirTests.out new/yast2-users-4.1.9/testsuite/tests/CryptedDirTests.out
--- old/yast2-users-4.1.8/testsuite/tests/CryptedDirTests.out 2019-02-18 11:55:24.000000000 +0100
+++ new/yast2-users-4.1.9/testsuite/tests/CryptedDirTests.out 1970-01-01 01:00:00.000000000 +0100
@@ -1,17 +0,0 @@
-Read .target.stat "/etc/security/pam_mount.conf.xml" $["size":1]
-Read .anyxml "/etc/security/pam_mount.conf.xml" $["pam_mount":[$["volume":[$["fskeypath":"/home/hh.key", "path":"/home/hh.img", "user":"hh"]]]]]
-Return true
-Return /home/hh.key
-Return /home/hh.img
-Return
-Return hh
-Return hh
-Return
-Read .target.stat "/home/hh.img" $[]
-Return 0
-Read .target.stat "/home/hh.img" $["size":1024]
-Return 1
-Read .target.stat "/home/hh.img" $["size":1048576]
-Return 1
-Read .target.stat "/home/hh.img" $["size":44040192]
-Return 42
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-4.1.8/testsuite/tests/CryptedDirTests.rb new/yast2-users-4.1.9/testsuite/tests/CryptedDirTests.rb
--- old/yast2-users-4.1.8/testsuite/tests/CryptedDirTests.rb 2019-02-18 11:55:24.000000000 +0100
+++ new/yast2-users-4.1.9/testsuite/tests/CryptedDirTests.rb 1970-01-01 01:00:00.000000000 +0100
@@ -1,89 +0,0 @@
-# encoding: utf-8
-
-# File : CryptedDirTests.ycp
-# Module : Users configurator
-# Summary : Testing functions from UsersRoutines related to crypted dirs
-# Author : Jiri Suchomel
participants (1)
-
root