diff options
author | Christophe Fergeau <cfergeau@mandriva.com> | 2009-10-21 12:59:51 +0000 |
---|---|---|
committer | Christophe Fergeau <cfergeau@mandriva.com> | 2009-10-21 12:59:51 +0000 |
commit | 3e5a7015614db77d016ebcb1b0f04c55b5d95746 (patch) | |
tree | a416c3278f0d03afc73c8ad2a91febce7e296a46 /perl-install | |
parent | 0141b336f27d2524adb0b4cf267efb6526f39b1f (diff) | |
download | drakx-3e5a7015614db77d016ebcb1b0f04c55b5d95746.tar drakx-3e5a7015614db77d016ebcb1b0f04c55b5d95746.tar.gz drakx-3e5a7015614db77d016ebcb1b0f04c55b5d95746.tar.bz2 drakx-3e5a7015614db77d016ebcb1b0f04c55b5d95746.tar.xz drakx-3e5a7015614db77d016ebcb1b0f04c55b5d95746.zip |
(is_xguest_installed,ask_user_and_root) enable to install/deinstall xguest (tv)
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/any.pm | 14 | ||||
-rw-r--r-- | perl-install/install/NEWS | 3 |
2 files changed, 17 insertions, 0 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm index 4b3efb20e..33dcef642 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -806,9 +806,15 @@ sub ask_user { ask_user_and_root($in, undef, $users, $security, %options); } +sub is_xguest_installed() { + -e "$::prefix/etc/security/namespace.d/guest.conf"; +} + sub ask_user_and_root { my ($in, $superuser, $users, $security, %options) = @_; + my $xguest = is_xguest_installed(); + $options{needauser} ||= $security >= 3; my @icons = facesnames(); @@ -856,6 +862,7 @@ sub ask_user_and_root { focus_first => 1, }, [ $superuser ? ( + { text => N("Enable guest account"), val => \$xguest, type => 'bool', advanced => 1 }, { label => N("Set administrator (root) password"), title => 1 }, { label => N("Password"), val => \$superuser->{password}, hidden => 1, alignment => 'right', weakness_check => 1, validate => sub { authentication::check_given_password($in, $superuser, 2 * $security) } }, @@ -886,6 +893,13 @@ sub ask_user_and_root { ), ], ); + + if ($xguest && !is_xguest_installed()) { + $in->do_pkgs->ensure_is_installed('xguest', '/etc/security/namespace.d/guest.conf'); + } elsif (!$xguest && is_xguest_installed()) { + $in->do_pkgs->remove('xguest') or return; + } + $u->{groups} = [ grep { $groups{$_} } keys %groups ]; push @$users, $u if $u->{name}; diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 2676d562b..29afc02c2 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,3 +1,6 @@ +- user management: + o enable to install/deinstall xguest + Version 12.68 - 19 October 2009 - fix raid initialisation during install (#54706) |