Hello community,
here is the log from the commit of package yast2-users
checked in at Wed Mar 5 21:59:14 CET 2008.
--------
--- yast2-users/yast2-users.changes 2008-02-29 14:00:11.000000000 +0100
+++ yast2-users/yast2-users.changes 2008-03-05 15:52:20.251129000 +0100
@@ -1,0 +2,19 @@
+Wed Mar 5 15:42:07 CET 2008 - jsuchome@suse.cz
+
+- check home directory of first user right before writing
+- do not allow decrypting home when user is logged in (bnc#365547),
+ remove old home directory after all critical actions are done
+- added installation proposal for user settings (fate#302980)
+- 2.16.16
+
+-------------------------------------------------------------------
+Wed Mar 5 09:36:14 CET 2008 - jsuchome@suse.cz
+
+- during installation, check if future /home doesn't contain home
+ directory for the first user and adapt UID of the user according
+ to directory owner (fate#302980)
+- use internal defaults if /etc/default/useradd cannot be read
+ (bnc#365116)
+- 2.16.15
+
+-------------------------------------------------------------------
Old:
----
yast2-users-2.16.14.tar.bz2
New:
----
yast2-users-2.16.16.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-users.spec ++++++
--- /var/tmp/diff_new_pack.U19414/_old 2008-03-05 21:57:10.000000000 +0100
+++ /var/tmp/diff_new_pack.U19414/_new 2008-03-05 21:57:10.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-users (Version 2.16.14)
+# spec file for package yast2-users (Version 2.16.16)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -12,12 +12,12 @@
Name: yast2-users
-Version: 2.16.14
+Version: 2.16.16
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-users-2.16.14.tar.bz2
+Source0: yast2-users-2.16.16.tar.bz2
Prefix: /usr
BuildRequires: cracklib-devel doxygen gcc-c++ perl-Digest-SHA1 perl-XML-Writer update-desktop-files yast2 yast2-core-devel yast2-devtools yast2-ldap-client yast2-perl-bindings yast2-security yast2-testsuite
Requires: yast2-perl-bindings yast2-country yast2-pam yast2-security cracklib perl-Digest-SHA1 perl-X500-DN perl-gettext
@@ -46,7 +46,7 @@
Jiri Suchomel
%prep
-%setup -n yast2-users-2.16.14
+%setup -n yast2-users-2.16.16
%build
%{prefix}/bin/y2tool y2autoconf
@@ -89,6 +89,19 @@
%{_libdir}/YaST2/plugin/libpy2ag_crack.la
%doc %{prefix}/share/doc/packages/yast2-users
%changelog
+* Wed Mar 05 2008 jsuchome@suse.cz
+- check home directory of first user right before writing
+- do not allow decrypting home when user is logged in (bnc#365547),
+ remove old home directory after all critical actions are done
+- added installation proposal for user settings (fate#302980)
+- 2.16.16
+* Wed Mar 05 2008 jsuchome@suse.cz
+- during installation, check if future /home doesn't contain home
+ directory for the first user and adapt UID of the user according
+ to directory owner (fate#302980)
+- use internal defaults if /etc/default/useradd cannot be read
+ (bnc#365116)
+- 2.16.15
* Fri Feb 29 2008 jsuchome@suse.cz
- fixed removing LDAP Shadow Account plugin (bnc#364833)
- 2.16.14
++++++ yast2-users-2.16.14.tar.bz2 -> yast2-users-2.16.16.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.16.14/src/dialogs.ycp new/yast2-users-2.16.16/src/dialogs.ycp
--- old/yast2-users-2.16.14/src/dialogs.ycp 2008-02-25 16:31:10.000000000 +0100
+++ new/yast2-users-2.16.16/src/dialogs.ycp 2008-03-05 12:56:08.000000000 +0100
@@ -5,7 +5,7 @@
* Authors: Johannes Buchhold ,
* Jiri Suchomel
*
- * $Id: dialogs.ycp 44994 2008-02-25 15:31:10Z jsuchome $
+ * $Id: dialogs.ycp 45196 2008-03-05 08:45:33Z jsuchome $
*/
{
@@ -97,10 +97,10 @@
`VBox (
`VSpacing (0.5),
// password entry label
- `Password (`id (`pw1), _("To access the data required to modify
+ `Password (`id (`pw1), `opt (`hstretch), _("To access the data required to modify
the encryption settings for this user,
enter the user's current password.")),
- `Password (`id(`pw2), Label::ConfirmPassword(), ""),
+ `Password (`id(`pw2),`opt (`hstretch), Label::ConfirmPassword(),""),
`HBox(
`PushButton (`id(`ok),`opt(`key_F10), Label::OKButton()),
`PushButton (`id(`cancel),`opt(`key_F9), Label::CancelButton())
@@ -980,7 +980,7 @@
}
if ((pw1 != "" || !tab) && pw1 != default_pw)
{
- error = Users::CheckPassword (pw1);
+ error = UsersSimple::CheckPassword (pw1, user_type);
if (error != "")
{
Report::Error (error);
@@ -1149,6 +1149,15 @@
if (current == `details && ret == `crypted_home)
{
boolean checked = (boolean) UI::QueryWidget (`id (`crypted_home), `Value);
+ if (!checked && UserLogged (org_username))
+ {
+ // error popup
+ Report::Error(_("The home directory for this user cannot be decrypted,
+because the user is currently logged in.
+Log the user out first."));
+ UI::ChangeWidget (`id (`crypted_home), `Value, true);
+ continue;
+ }
if (checked && (integer) UI::QueryWidget (`id (`dirsize), `Value) == 10)
UI::ChangeWidget (`id (`dirsize), `Value, default_crypted_size);
UI::ChangeWidget (`id (`dirsize), `Enabled, checked);
@@ -1964,7 +1973,7 @@
}
if ( pw1 != "" && pw1 != default_pw )
{
- error = Users::CheckPassword (pw1);
+ error = UsersSimple::CheckPassword (pw1, group_type);
if (error != "")
{
Report::Error (error);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.16.14/src/inst_root_first.ycp new/yast2-users-2.16.16/src/inst_root_first.ycp
--- old/yast2-users-2.16.14/src/inst_root_first.ycp 2008-02-21 16:19:56.000000000 +0100
+++ new/yast2-users-2.16.16/src/inst_root_first.ycp 2008-03-05 15:34:11.000000000 +0100
@@ -5,7 +5,7 @@
* Dialog for setting root's password during 1st stage of the installation
* Authors: Jiri Suchomel
*
- * $Id: inst_root_first.ycp 44765 2008-02-21 15:19:56Z jsuchome $
+ * $Id: inst_root_first.ycp 45196 2008-03-05 08:45:33Z jsuchome $
*/
{
textdomain "users";
@@ -33,17 +33,23 @@
// Title for root-password dialogue
string title = _("Password for the System Administrator \"root\"");
+ string password = UsersSimple::GetRootPassword ();
+
term contents = `VBox (
`VStretch (),
`HSquash (`VBox (
// advise user to remember his new password
`Label(_("Do not forget what you enter here.")),
`VSpacing(0.8),
- // Label: get password for user root
- `Password (`id(`pw1), _("&Password for root User"), ""),
+ `Password (`id(`pw1), `opt (`hstretch),
+ // Label: get password for user root
+ _("&Password for root User"),
+ password == nil ? "" : "*****"),
`VSpacing(0.8),
- // Label: get same password again for verification
- `Password (`id(`pw2), _("Con&firm Password"), "")
+ `Password (`id(`pw2), `opt (`hstretch),
+ // Label: get same password again for verification
+ _("Con&firm Password"),
+ password == nil ? "" : "*****")
)),
`VStretch ()
);
@@ -93,7 +99,6 @@
if (Mode::normal ()) Wizard::CreateDialog (); // for testing only
-// Wizard::SetDesktopIcon("yast-users");
Wizard::SetDesktopIcon("yast-users");
Wizard::SetContents (title, contents, helptext,
GetInstArgs::enable_back(),
@@ -119,6 +124,8 @@
continue;
}
}
+ if (ret == `accept) // from proposal
+ ret = `next;
if (ret == `next)
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.16.14/src/inst_root.ycp new/yast2-users-2.16.16/src/inst_root.ycp
--- old/yast2-users-2.16.14/src/inst_root.ycp 2008-02-21 16:35:18.000000000 +0100
+++ new/yast2-users-2.16.16/src/inst_root.ycp 2008-03-05 10:25:43.000000000 +0100
@@ -66,14 +66,16 @@
// advise user to remember his new password
`Label(_("Do not forget what you enter here.")),
`VSpacing(0.8),
- // Label: get password for user root
- `Password (`id(`pw1), _("&Password for root User"), ""),
+ `Password (`id(`pw1), `opt (`hstretch),
+ // Label: get password for user root
+ _("&Password for root User"), ""),
`VSpacing(0.8),
- // Label: get same password again for verification
- `Password (`id(`pw2), _("Con&firm Password"), ""),
+ `Password (`id(`pw2), `opt (`hstretch),
+ // Label: get same password again for verification
+ _("Con&firm Password"), ""),
`VSpacing (2.4),
// text entry label
- `TextEntry (_("&Test Keyboard Layout"))
+ `InputField (`opt(`hstretch),_("&Test Keyboard Layout"))
)),
`VSpacing(2),
// push button
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.16.14/src/inst_user_first.ycp new/yast2-users-2.16.16/src/inst_user_first.ycp
--- old/yast2-users-2.16.14/src/inst_user_first.ycp 2008-02-29 13:45:58.000000000 +0100
+++ new/yast2-users-2.16.16/src/inst_user_first.ycp 2008-03-05 15:33:21.000000000 +0100
@@ -4,10 +4,11 @@
* Summary: Dialog for creating the first user during installation
* Authors: Jiri Suchomel
*
- * $Id: inst_user_first.ycp 44994 2008-02-25 15:31:10Z jsuchome $
+ * $Id: inst_user_first.ycp 45196 2008-03-05 08:45:33Z jsuchome $
*/
{
import "Arch";
+ import "Directory";
import "GetInstArgs";
import "Label";
import "Mode";
@@ -22,7 +23,7 @@
textdomain "users";
- map display_info = UI::GetDisplayInfo ();
+ map display_info = UI::GetDisplayInfo ();
boolean text_mode = display_info["TextMode"]:false;
string arch = Arch::architecture ();
@@ -334,6 +335,7 @@
string username = user["uid"]:"";
string cn = user["cn"]:"";
string password = (string)user["userpassword"]:nil;
+ integer uidnumber = user["uidnumber"]:-1;
// this user gets root's mail
boolean root_mail =
@@ -346,14 +348,6 @@
`InputField (`id (`username), `opt (`notify, `hstretch),
// input field for login name
_("&Username"),username),
- /*
- `TextEntry (`id (`cn), `opt (`notify, `hstretch),
- // text entry
- _("User's &Full Name"), cn),
- `TextEntry (`id (`username), `opt (`notify, `hstretch),
- // input field for login name
- _("&Username"),username),
- */
`Password (`id (`pw1), `opt (`hstretch), Label::Password(),
password == nil ? "" : "*****"),
`Password (`id (`pw2), `opt (`hstretch), Label::ConfirmPassword(),
@@ -431,6 +425,8 @@
{
login_modified = true;
}
+ if (ret == `accept) // from proposal
+ ret = `next;
if (ret == `next)
{
string error = "";
@@ -519,9 +515,7 @@
UI::SetFocus (`id (`pw1));
continue;
}
-
- // FIXME home dir checks -> change UID if home is found
- // all the checks are done, we can save the data
+ // set UID if home directory is found on future home partition
password = pw1;
}
if (contains ([`back, `abort, `cancel, `next], ret))
@@ -534,11 +528,12 @@
if (auth_method == "users" && username != "")
{
// save the first user data
- UsersSimple::SetUser ($[
+ map user_map = $[
"uid" : username,
"userpassword" : password,
"cn" : cn
- ]);
+ ];
+ UsersSimple::SetUser (user_map);
boolean root_pw = (boolean) UI::QueryWidget (`id (`root_pw),`Value);
UsersSimple::SkipRootPasswordDialog (root_pw);
UsersSimple::SetRootPassword (root_pw ? password : "");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.16.14/src/inst_user.ycp new/yast2-users-2.16.16/src/inst_user.ycp
--- old/yast2-users-2.16.14/src/inst_user.ycp 2008-02-21 16:35:18.000000000 +0100
+++ new/yast2-users-2.16.16/src/inst_user.ycp 2008-03-05 13:36:54.000000000 +0100
@@ -6,13 +6,14 @@
*
* Purpose: Start user management module from within installation workflow
*
- * $Id: inst_user.ycp 44768 2008-02-21 15:35:17Z jsuchome $
+ * $Id: inst_user.ycp 45196 2008-03-05 08:45:33Z jsuchome $
*/
{
textdomain "users";
import "Autologin";
+ import "FileUtils";
import "GetInstArgs";
import "Package";
import "Label";
@@ -30,6 +31,7 @@
if (!GetInstArgs::going_back())
UsersSimple::Read ();
+ // check if the user was configured in the 1st stage
if (!GetInstArgs::going_back() &&
UsersSimple::AfterAuth () == "users" &&
UsersSimple::GetUser () != $[])
@@ -38,9 +40,22 @@
y2milestone ("user defined in 1st stage, let's save now...");
boolean progress_orig = Progress::set (false);
Users::Read ();
- string error = Users::AddUser (user); //TODO check ret values
- error = Users::CheckUser ($[]);
- if (Users::CommitUser ())
+
+ // now, check if home directory exists and adapt uidnumber to its owner
+ string home = user["home"]:"";
+ if (home == "" && user["uid"]:"" != "")
+ home = Users::GetDefaultHome ("local") + user["uid"]:"";
+ if (home != "" && FileUtils::IsDirectory (home))
+ {
+ map stat = (map) SCR::Read (.target.stat, home);
+ integer uid = stat["uid"]:-1;
+ if (uid != -1)
+ user["uidnumber"] = uid;
+ }
+ string error = Users::AddUser (user);
+ if (error == "")
+ error = Users::CheckUser ($[]);
+ if (error == "" && Users::CommitUser ())
{
if (UsersSimple::AutologinUsed ())
{
@@ -56,6 +71,8 @@
error = Users::Write ();
UsersSimple::SetUser ($[]);
}
+ if (error != "")
+ y2error ("error while creating user: %1", error);
Progress::set (progress_orig);
return `next;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.16.14/src/Makefile.am new/yast2-users-2.16.16/src/Makefile.am
--- old/yast2-users-2.16.14/src/Makefile.am 2008-02-21 16:19:56.000000000 +0100
+++ new/yast2-users-2.16.16/src/Makefile.am 2008-03-05 13:37:57.000000000 +0100
@@ -43,6 +43,7 @@
users_finish.ycp \
inst_auth.ycp \
users_auto.ycp \
+ users_proposal.ycp \
users_plugin_ldap_all.ycp \
users_plugin_ldap_passwordpolicy.ycp \
users_plugin_ldap_shadowaccount.ycp \
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.16.14/src/Makefile.in new/yast2-users-2.16.16/src/Makefile.in
--- old/yast2-users-2.16.14/src/Makefile.in 2008-02-21 16:20:14.000000000 +0100
+++ new/yast2-users-2.16.16/src/Makefile.in 2008-03-05 14:03:15.000000000 +0100
@@ -256,6 +256,7 @@
users_finish.ycp \
inst_auth.ycp \
users_auto.ycp \
+ users_proposal.ycp \
users_plugin_ldap_all.ycp \
users_plugin_ldap_passwordpolicy.ycp \
users_plugin_ldap_shadowaccount.ycp \
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.16.14/src/routines.ycp new/yast2-users-2.16.16/src/routines.ycp
--- old/yast2-users-2.16.14/src/routines.ycp 2008-01-25 12:20:19.000000000 +0100
+++ new/yast2-users-2.16.16/src/routines.ycp 2008-03-05 15:44:41.000000000 +0100
@@ -8,6 +8,8 @@
*
*/
{
+import "Mode";
+
textdomain "users";
/**
@@ -77,5 +79,14 @@
if ( what == `givenName ) return givenName;
}
+// if the user has log on system
+define boolean UserLogged (string name) {
+
+ map out = (map) SCR::Execute (.target.bash_output,
+ sformat ("ps --no-headers -u %1", name));
+ string proc = out["stdout"]:"";
+ return (size (proc) != 0 && !Mode::config ());
+}
+
} // EOF
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.16.14/src/Users.pm new/yast2-users-2.16.16/src/Users.pm
--- old/yast2-users-2.16.14/src/Users.pm 2008-02-25 14:43:19.000000000 +0100
+++ new/yast2-users-2.16.16/src/Users.pm 2008-03-05 12:54:59.000000000 +0100
@@ -4,7 +4,7 @@
# Package: Configuration of users and groups
# Summary: I/O routines + main data structures
#
-# $Id: Users.pm 44768 2008-02-21 15:35:17Z jsuchome $
+# $Id: Users.pm 45196 2008-03-05 08:45:33Z jsuchome $
#
package Users;
@@ -1339,9 +1339,7 @@
my $self = shift;
foreach my $key (sort keys %useradd_defaults) {
my $entry = SCR->Read (".etc.default.useradd.\"\Q$key\E\"");
- if (!$entry) {
- $entry = "";
- }
+ next if (!$entry); # use the defatuls set in this file
$entry =~ s/\"//g;
$useradd_defaults{$key} = $entry;
}
@@ -5391,7 +5389,7 @@
# do not check pw when it wasn't changed - must be tested directly
if (defined ($user{"userpassword"}) ||
($user{"what"} || "") eq "add_user") {
- $error = $self->CheckPassword ($user{"userpassword"});
+ $error = UsersSimple->CheckPassword ($user{"userpassword"}, $type);
}
}
@@ -5450,12 +5448,13 @@
%group = %{$_[0]};
}
+ my $type = $group{"type"} || "";
my $error = $self->CheckGID ($group{"gidnumber"});
if ($error eq "") {
if ((defined $group{"userpassword"}) && ! bool ($group{"encrypted"})) {
- $error = $self->CheckPassword ($group{"userpassword"});
+ $error = UsersSimple->CheckPassword ($group{"userpassword"}, $type);
}
}
@@ -5466,7 +5465,7 @@
my $error_map =
UsersPlugins->Apply ("Check", {
"what" => "group",
- "type" => $group{"type"} || "",
+ "type" => $type,
"modified" => $group{"modified"} || "",
"plugins" => $group{"plugins"}
}, \%group);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.16.14/src/users_proposal.ycp new/yast2-users-2.16.16/src/users_proposal.ycp
--- old/yast2-users-2.16.14/src/users_proposal.ycp 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-users-2.16.16/src/users_proposal.ycp 2008-03-05 15:40:37.000000000 +0100
@@ -0,0 +1,81 @@
+/**
+ * File: users_proposal.ycp
+ * Author: Jiri Suchomel
+ * Purpose: Proposal for user and root setting
+ *
+ * $Id:$
+ */
+{
+ textdomain "users";
+
+ import "HTML";
+ import "UsersSimple";
+ import "Wizard";
+
+ string func = (string) WFM::Args(0);
+ map param = (map) WFM::Args(1);
+ map ret = $[];
+
+ if ( func == "MakeProposal" )
+ {
+ boolean force_reset = param["force_reset" ]:false;
+
+ string root_proposal = UsersSimple::GetRootPassword () != "" ?
+ // summary label <%1>-<%2> are HTML tags, leave untouched
+ sformat (_("<%1>Root Password<%2> is set"),
+ "a href=\"users--root\"", "/a") :
+ sformat (_("<%1>Root Password<%2> is not set"),
+ "a href=\"users--root\"", "/a");
+
+ // FIXME
+ list<string> proposal = [
+ // summary label <%1>-<%2> are HTML tags, leave untouched
+ sformat (_("<%1>Authentication<%2>: %3"),
+ "a href=\"users--user\"", "/a", UsersSimple::AfterAuth ()
+ )
+ ];
+
+ ret = $[
+ "preformatted_proposal" : HTML::List (add (proposal,root_proposal)),
+ "language_changed" : false,
+ "links" : [ "users--user", "users--root" ],
+ ];
+ }
+ else if ( func == "Description" )
+ {
+ ret = $[
+ // rich text label
+ "rich_text_title" : _("User Settings"),
+ "menu_titles" : [
+ // menu button label
+ $[ "id" : "users--user", "title" : _("&User") ],
+ // menu button label
+ $[ "id" : "users--root", "title" : _("&Root Password") ]
+ ],
+ "id" : "users",
+ ];
+ }
+ else if (func == "AskUser")
+ {
+
+ Wizard::OpenAcceptDialog();
+ map args = $[
+ "enable_back" : true,
+ "enable_next" : param["has_next"]:false,
+ ];
+ symbol result = `back;
+ if (param["chosen_id"]:"" == "users--root")
+ {
+ UsersSimple::SkipRootPasswordDialog (false); // do not skip now...
+ result = (symbol)WFM::CallFunction ("inst_root_first", [args]);
+ }
+ else
+ result = (symbol)WFM::CallFunction ("inst_user_first", [args]);
+
+ Wizard::CloseDialog();
+
+ ret = $[ "workflow_sequence" : result ];
+ y2debug( "Returning from users_proposal AskUser() with: %1", ret );
+ }
+ return ret;
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.16.14/src/UsersRoutines.pm new/yast2-users-2.16.16/src/UsersRoutines.pm
--- old/yast2-users-2.16.14/src/UsersRoutines.pm 2008-02-28 14:36:46.000000000 +0100
+++ new/yast2-users-2.16.16/src/UsersRoutines.pm 2008-03-05 12:59:10.000000000 +0100
@@ -16,6 +16,7 @@
##------------------------------------
##------------------- global imports
+YaST::YCP::Import ("Report");
YaST::YCP::Import ("SCR");
##------------------------------------
@@ -320,6 +321,7 @@
{
SCR->Write (".target.string", $pw_path, $pw);
my $command = "$cryptconfig open --key-file=$org_key $org_img < $pw_path";
+ y2debug ("cmd: $command");
my $out = SCR->Execute (".target.bash_output", $command);
SCR->Execute (".target.remove", $pw_path);
if ($out->{"exit"} ne 0) {
@@ -345,9 +347,8 @@
# TODO translated message for mount error
return 0;
}
- SCR->Execute (".target.bash", "/bin/rm -rf $home");
- # copy the directory content
- $command = "/bin/cp -ar $mnt_dir $home";
+ # copy the directory content to tmp home
+ $command = "/bin/cp -ar $mnt_dir $tmpdir/$username";
y2debug ("cmd: $command");
$out = SCR->Execute (".target.bash_output", $command);
if ($out->{"exit"} ne 0 && $out->{"stderr"}) {
@@ -377,6 +378,11 @@
Report->Error ($out->{"stderr"});
return 0;
}
+ # Now, after everything succeeded, remove old home and replace it
+ # with the data from crypted image:
+ SCR->Execute (".target.bash", "/bin/rm -rf $home");
+ $out = SCR->Execute (".target.bash_output", "/bin/mv $tmpdir/$username $home");
+ y2error ("error while mv: ", $out->{"stderr"}) if ($out->{"stderr"});
# remove image and key files
SCR->Execute (".target.bash", "/bin/rm -rf $org_img");
SCR->Execute (".target.bash", "/bin/rm -rf $org_key");
@@ -497,10 +503,17 @@
if (defined $pam_mount_cont &&
defined $pam_mount_cont->{"pam_mount"}{"volume"})
{
- foreach my $usermap (@{$pam_mount_cont->{"pam_mount"}{"volume"}}) {
- my $username = $usermap->{"user"}{"value"};
- next if !defined $username;
- $pam_mount->{$username} = $usermap;
+ my $volumes = $pam_mount_cont->{"pam_mount"}{"volume"};
+ if (ref ($volumes) eq "HASH") {
+ my $username = $volumes->{"user"}{"value"};
+ $pam_mount->{$username} = $volumes if defined $username;
+ }
+ elsif (ref ($volumes) eq "ARRAY") {
+ foreach my $usermap (@{$volumes}) {
+ my $username = $usermap->{"user"}{"value"};
+ next if !defined $username;
+ $pam_mount->{$username} = $usermap;
+ }
}
}
return 1 if defined $pam_mount;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.16.14/src/widgets.ycp new/yast2-users-2.16.16/src/widgets.ycp
--- old/yast2-users-2.16.14/src/widgets.ycp 2008-02-25 16:31:10.000000000 +0100
+++ new/yast2-users-2.16.16/src/widgets.ycp 2008-03-05 10:34:14.000000000 +0100
@@ -671,11 +671,7 @@
return nil;
}
- // if the user has log on system
- map out = (map) SCR::Execute (.target.bash_output,
- sformat ("ps --no-headers -u %1", uid));
- string proc = out["stdout"]:"";
- if (size (proc) != 0 && !Mode::config ())
+ if (UserLogged (username))
{
// error popup
Report::Error(_("You cannot delete this user, because the user is
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.16.14/VERSION new/yast2-users-2.16.16/VERSION
--- old/yast2-users-2.16.14/VERSION 2008-02-29 13:45:46.000000000 +0100
+++ new/yast2-users-2.16.16/VERSION 2008-03-05 15:44:19.000000000 +0100
@@ -1 +1 @@
-2.16.14
+2.16.16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org