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 <jsuchome@suse.cz> -# -# $Id$ -module Yast - class CryptedDirTestsClient < Client - def main - Yast.import "Directory" - Yast.import "Mode" - Yast.import "UsersRoutines" - - @READ = { - "target" => { - "stat" => { "size" => 1 }, - "size" => -1, - "tmpdir" => "/tmp/YaST" - }, - "anyxml" => { - "pam_mount" => [ - { - "volume" => [ - { - "user" => "hh", - "path" => "/home/hh.img", - "fskeypath" => "/home/hh.key" - } - ] - } - ] - } - } - @WRITE = {} - @EXEC = {} - - Yast.import "Testsuite" - - Mode.SetTest("test") - - Testsuite.Test(lambda { UsersRoutines.ReadCryptedHomesInfo }, [ - @READ, - @WRITE, - @EXEC - ], 0) - - Testsuite.Test(lambda { UsersRoutines.CryptedKeyPath("hh") }, [], 0) - Testsuite.Test(lambda { UsersRoutines.CryptedImagePath("hh") }, [], 0) - # no such user -> empty string - Testsuite.Test(lambda { UsersRoutines.CryptedKeyPath("hhh") }, [], 0) - - Testsuite.Test(lambda { UsersRoutines.CryptedImageOwner("/home/hh.img") }, [], 0) - Testsuite.Test(lambda { UsersRoutines.CryptedKeyOwner("/home/hh.key") }, [], 0) - # no such key file -> empty string - Testsuite.Test(lambda { UsersRoutines.CryptedKeyOwner("/home/hh.img") }, [], 0) - - @RSIZE = { "target" => { "stat" => {} } } - Testsuite.Test(lambda { UsersRoutines.FileSizeInMB("/home/hh.img") }, [ - @RSIZE, - {}, - {} - ], 0) - Ops.set(@RSIZE, ["target", "stat", "size"], 1024) - Testsuite.Test(lambda { UsersRoutines.FileSizeInMB("/home/hh.img") }, [ - @RSIZE, - {}, - {} - ], 0) - Ops.set(@RSIZE, ["target", "stat", "size"], 1024 * 1024) - Testsuite.Test(lambda { UsersRoutines.FileSizeInMB("/home/hh.img") }, [ - @RSIZE, - {}, - {} - ], 0) - Ops.set(@RSIZE, ["target", "stat", "size"], 1024 * 1024 * 42) - Testsuite.Test(lambda { UsersRoutines.FileSizeInMB("/home/hh.img") }, [ - @RSIZE, - {}, - {} - ], 0) - - nil - end - end -end - -Yast::CryptedDirTestsClient.new.main diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-4.1.8/testsuite/tests/DeleteUserCryptedDir.out new/yast2-users-4.1.9/testsuite/tests/DeleteUserCryptedDir.out --- old/yast2-users-4.1.8/testsuite/tests/DeleteUserCryptedDir.out 2019-02-18 11:55:24.000000000 +0100 +++ new/yast2-users-4.1.9/testsuite/tests/DeleteUserCryptedDir.out 1970-01-01 01:00:00.000000000 +0100 @@ -1,40 +0,0 @@ -Read .etc.default.useradd."btrfs_subvolume" 0 -Read .etc.default.useradd."expire" 0 -Read .etc.default.useradd."group" 100 -Read .etc.default.useradd."groups" "audio,video" -Read .etc.default.useradd."home" "/home" -Read .etc.default.useradd."inactive" 0 -Read .etc.default.useradd."shell" 0 -Read .etc.default.useradd."skel" 0 -Read .etc.default.useradd."umask" 0 -Read .target.string "/etc/shells" 0 -Read .etc.nsswitch_conf.passwd 0 -Read .ldap_conf.v.binddn 0 -Write .target.ycp "/var/lib/YaST2/users.ycp" $[] true -Return -Return nil -Dump ---- user 'hh': -Dump $["addit_data":"", "authorized_keys":[], "cn":"HaHa", "gidNumber":"100", "grouplist":$[], "groupname":"users", "homeDirectory":"/home/hh", "loginShell":"/bin/bash", "shadowExpire":"", "shadowFlag":"", "shadowInactive":"", "shadowLastChange":"13727", "shadowMax":"99999", "shadowMin":"0", "shadowWarning":"7", "type":"local", "uid":"hh", "uidNumber":"500", "userPassword":"heslo"] -Dump ==================== running delete ====================== -Return true -Return true -Return nil -Return nil -Return nil -Read .anyxml "/etc/security/pam_mount.conf.xml" $["pam_mount":[$["volume":[$["fskeypath":"/home/hh.key", "path":"/home/hh.img", "user":"hh"]]]]] -Read .target.stat "/home/hh.key" $["isdir":true] -Execute .target.bash_output "/usr/bin/rm -rf '/home/hh.key'" $["exit":0] -Read .target.stat "/home/hh.img" $["isdir":true] -Execute .target.bash_output "/usr/bin/rm -rf '/home/hh.img'" $["exit":0] -Execute .target.bash_output "/usr/sbin/cryptconfig pm-disable 'hh'" $["exit":0] -Execute .target.bash "/usr/bin/cp '/etc/passwd' '/etc/passwd.YaST2save'" 0 -Write .target.string "/etc/passwd" "at:x:25:25:Batch jobs daemon:/var/spool/atjobs:/bin/bash\nbin:x:1:1:bin:/bin:/bin/bash\ndaemon:x:2:2:Daemon:/sbin:/bin/bash\nmail:x:8:12:Mailer daemon:/var/spool/clientmqueue:/bin/false\nnobody:x:65534:65533:nobody:/var/lib/nobody:/bin/bash\nroot:x:0:0:root:/root:/bin/bash\nuucp:x:10:14:Unix-to-Unix CoPy system:/etc/uucp:/bin/bash\nii:x:555:100:Test user:/home/ii:/bin/bash\n+::::::\n" true -Execute .target.bash_output "/usr/bin/diff -U 1 '/etc/passwd.YaST2save' '/etc/passwd'" $["exit":0] -Execute .target.bash "/usr/bin/cp '/etc/shadow' '/etc/shadow.YaST2save'" 0 -Write .target.string "/etc/shadow" "at:!:13636:0:99999:7:::\nbin:*:13636::::::\ndaemon:*:13636::::::\nmail:*:13636::::::\nnobody:*:13636::::::\nroot:password:13636::::::\nuucp:*:13636::::::\n+::0:0:0::::\n" true -Execute .target.bash "/usr/sbin/nscd -i passwd" 0 -Read .target.stat "/home/hh" $["isdir":true] -Execute .target.bash "/usr/sbin/btrfs subvolume show /home/hh" 0 -Execute .target.bash_output "/usr/sbin/btrfs subvolume delete -C '/home/hh'" $["exit":0] -Write .target.ycp "/var/lib/YaST2/users.ycp" $["custom_groups":["local"], "custom_users":["local"], "dont_warn_when_nisserver_notdes":false, "dont_warn_when_uppercase":false] true -Return diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-4.1.8/testsuite/tests/DeleteUserCryptedDir.rb new/yast2-users-4.1.9/testsuite/tests/DeleteUserCryptedDir.rb --- old/yast2-users-4.1.8/testsuite/tests/DeleteUserCryptedDir.rb 2019-02-18 11:55:24.000000000 +0100 +++ new/yast2-users-4.1.9/testsuite/tests/DeleteUserCryptedDir.rb 1970-01-01 01:00:00.000000000 +0100 @@ -1,116 +0,0 @@ -# encoding: utf-8 - -# File: -# DeleteUserCryptedDir.ycp -# -# Module: -# Users configurator -# -# Summary: -# Deleting user with encrypted directory -# -# Authors: -# Jiri Suchomel <jsuchome@suse.cz> -# -module Yast - class DeleteUserCryptedDirClient < Client - def main - # testedfiles: Users.pm UsersPasswd.pm UsersLDAP.pm UsersRoutines.pm - - Yast.import "Users" - Yast.import "UsersPasswd" - Yast.import "Mode" - Yast.import "Directory" - Yast.import "Progress" - Yast.import "Report" - - @tmpdir = Directory.tmpdir - Builtins.foreach(["passwd", "group", "shadow"]) do |file| - cmd = Builtins.sformat("/bin/cp ./%1 %2/", file, @tmpdir) - SCR.Execute(path(".target.bash_output"), cmd) - end - Users.SetBaseDirectory(@tmpdir) - Users.ReadLocal - - @READ = { - "etc" => { - "fstab" => [], - "cryptotab" => [], - "default" => { - "useradd" => { - "home" => "/home", - "groups" => "audio,video", - "group" => 100 - } - } - }, - "product" => { - "features" => { - "USE_DESKTOP_SCHEDULER" => "no", - "IO_SCHEDULER" => "", - "ENABLE_AUTOLOGIN" => "false", - "UI_MODE" => "simple", - "EVMS_CONFIG" => "no", - "INCOMPLETE_TRANSLATION_TRESHOLD" => "99" - } - }, - "target" => { "size" => -1, "stat" => {} } - } - - @WRITE = {} - @EXEC = { - "passwd" => { "init" => true }, - "target" => { "bash" => 0, "bash_output" => { "exit" => 0 } } - } - @RW = { - "target" => { - "stat" => { "isdir" => true }, - "size" => -1, - "tmpdir" => "/tmp/YaST" - }, - "anyxml" => { - "pam_mount" => [ - { - "volume" => [ - { - "user" => "hh", - "path" => "/home/hh.img", - "fskeypath" => "/home/hh.key" - } - ] - } - ] - } - } - - Yast.import "Testsuite" - - Mode.SetTest("test") - - Testsuite.Test(lambda { Users.Read }, [@READ, @WRITE, @EXEC], 0) - - Testsuite.Test(lambda { Users.SelectUserByName("hh") }, [], 0) - - Testsuite.Dump( - Builtins.sformat("---- user 'hh':\n %1", Users.GetCurrentUser) - ) - - Testsuite.Dump( - "==================== running delete ======================" - ) - - Testsuite.Test(lambda { Users.DeleteUser(true) }, [@READ], 0) - Testsuite.Test(lambda { Users.CommitUser }, [@READ], 0) - - Testsuite.Test(lambda { Users.SetBaseDirectory("/etc") }, [], 0) - Testsuite.Test(lambda { UsersPasswd.SetBaseDirectory("/etc") }, [], 0) - Testsuite.Test(lambda { Directory.ResetTmpDir }, [@RW, @WRITE, @EXEC], 0) - - Testsuite.Test(lambda { Users.Write }, [@RW, @WRITE, @EXEC], 0) - - nil - end - end -end - -Yast::DeleteUserCryptedDirClient.new.main
participants (1)
-
root