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 Thu Sep 17 00:29:45 CEST 2009. -------- --- yast2-users/yast2-users.changes 2009-09-03 14:14:07.000000000 +0200 +++ yast2-users/yast2-users.changes 2009-09-15 12:17:16.000000000 +0200 @@ -1,0 +2,6 @@ +Mon Sep 14 14:08:31 CEST 2009 - jsuchome@suse.cz + +- new file YaPI/ADMINISTRATOR.pm for root's password and aliases +- 2.18.12 + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- yast2-users-2.18.11.tar.bz2 New: ---- yast2-users-2.18.12.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-users.spec ++++++ --- /var/tmp/diff_new_pack.D6rVV0/_old 2009-09-17 00:28:22.000000000 +0200 +++ /var/tmp/diff_new_pack.D6rVV0/_new 2009-09-17 00:28:22.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package yast2-users (Version 2.18.11) +# spec file for package yast2-users (Version 2.18.12) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -19,10 +19,10 @@ Name: yast2-users -Version: 2.18.11 +Version: 2.18.12 Release: 1 BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-users-2.18.11.tar.bz2 +Source0: yast2-users-2.18.12.tar.bz2 Prefix: /usr Group: System/YaST License: GPL v2 or later @@ -42,7 +42,7 @@ This package provides GUI for maintenance of linux users and groups. %prep -%setup -n yast2-users-2.18.11 +%setup -n yast2-users-2.18.12 %build %{prefix}/bin/y2tool y2autoconf @@ -75,7 +75,7 @@ %{prefix}/share/applications/YaST2/*.desktop /usr/share/YaST2/modules/*.pm /usr/share/YaST2/modules/UsersUI.y* -/usr/share/YaST2/modules/YaPI/USERS.pm +/usr/share/YaST2/modules/YaPI/*.pm /usr/share/YaST2/include/users/* /usr/share/YaST2/schema/autoyast/rnc/users.rnc #agents: ++++++ yast2-users-2.18.11.tar.bz2 -> yast2-users-2.18.12.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-2.18.11/VERSION new/yast2-users-2.18.12/VERSION --- old/yast2-users-2.18.11/VERSION 2009-09-03 14:13:23.000000000 +0200 +++ new/yast2-users-2.18.12/VERSION 2009-09-15 12:15:43.000000000 +0200 @@ -1 +1 @@ -2.18.11 +2.18.12 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-2.18.11/src/Makefile.am new/yast2-users-2.18.12/src/Makefile.am --- old/yast2-users-2.18.11/src/Makefile.am 2008-12-18 14:47:14.000000000 +0100 +++ new/yast2-users-2.18.12/src/Makefile.am 2009-09-10 15:22:41.000000000 +0200 @@ -1,7 +1,7 @@ # # Makefile.am for users/src # -# $Id: Makefile.am 45217 2008-03-05 14:52:46Z jsuchome $ +# $Id: Makefile.am 58612 2009-09-10 13:22:21Z jsuchome $ # YCPCFLAGS = -I . @@ -58,6 +58,7 @@ YaPI_perldir = @moduledir@/YaPI YaPI_perl_DATA = \ + YaPI/ADMINISTRATOR.pm \ YaPI/USERS.pm diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-2.18.11/src/Makefile.in new/yast2-users-2.18.12/src/Makefile.in --- old/yast2-users-2.18.11/src/Makefile.in 2009-07-16 15:59:08.000000000 +0200 +++ new/yast2-users-2.18.12/src/Makefile.in 2009-09-11 15:30:23.000000000 +0200 @@ -17,7 +17,7 @@ # # Makefile.am for users/src # -# $Id: Makefile.am 45217 2008-03-05 14:52:46Z jsuchome $ +# $Id: Makefile.am 58612 2009-09-10 13:22:21Z jsuchome $ # # Makefile.am.common -*- Makefile -*- @@ -276,6 +276,7 @@ YaPI_perldir = @moduledir@/YaPI YaPI_perl_DATA = \ + YaPI/ADMINISTRATOR.pm \ YaPI/USERS.pm EXTRA_DIST = $(client_DATA) $(ynclude_DATA) $(module_DATA) $(desktop_DATA) $(YaPI_perl_DATA) $(rnc_DATA) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-2.18.11/src/YaPI/ADMINISTRATOR.pm new/yast2-users-2.18.12/src/YaPI/ADMINISTRATOR.pm --- old/yast2-users-2.18.11/src/YaPI/ADMINISTRATOR.pm 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-users-2.18.12/src/YaPI/ADMINISTRATOR.pm 2009-09-11 15:36:56.000000000 +0200 @@ -0,0 +1,90 @@ +package YaPI::ADMINISTRATOR; + +use strict; +use YaST::YCP qw(:LOGGING); +use YaPI; + +textdomain ("users"); + +# ------------------- imported modules +YaST::YCP::Import ("MailAliases"); +YaST::YCP::Import ("Mode"); +YaST::YCP::Import ("Users"); +# ------------------------------------- + +our $VERSION = '1.0.0'; +our @CAPABILITIES = ('SLES11'); +our %TYPEINFO; + +=item * +C<$hash Read ();> + +Returns the information about system administrator (root). +Currently return hash contains the list of mail aliases. + +=cut + +BEGIN{$TYPEINFO{Read} = ["function", + [ "map", "string", "any" ]]; +} +sub Read { + + my $self = shift; + + # FIXME HACK to prevent setting mode to testsuite (bnc#243624) + Mode->SetUI ("commandline"); + + my $root_mail = MailAliases->GetRootAlias (); + return {} if !defined $root_mail; + + my @root_aliases = (); + foreach my $alias (split (/,/, $root_mail)) { + $alias =~ s/[ \t]//g; + push @root_aliases, $alias; + } + + return { + "aliases" => \@root_aliases + } +} + +=item * +C<$string Write ($argument_hash);> + +write the system adminstrator data. Supported keys of the argument hash are: + + "aliases" => list of mail aliases + "password" => new password + +Returns error message on error. + +=cut + +BEGIN{$TYPEINFO{Write} = ["function", + "string", + [ "map", "string", "any" ]]; +} +sub Write { + + my $self = shift; + my $args = shift; + my $ret = ""; + + Mode->SetUI ("commandline"); + + if ($args->{"aliases"} && ref ($args->{"aliases"}) eq "ARRAY") { + + my $root_mail = join (", ", @{$args->{"aliases"}}); + if (!MailAliases->SetRootAlias ($root_mail)) { + # error popup + $ret = __("An error occurred while setting forwarding for root's mail."); + return $ret; + } + } + if ($args->{"password"}) { + Users->SetRootPassword ($args->{"password"}); + Users->WriteRootPassword (); + } + return $ret; +} + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de