Hello community, here is the log from the commit of package yast2-users for openSUSE:Factory checked in at Fri Mar 12 01:48:14 CET 2010. -------- --- yast2-users/yast2-users.changes 2010-03-10 15:20:35.000000000 +0100 +++ /mounts/work_src_done/STABLE/yast2-users/yast2-users.changes 2010-03-11 11:01:12.000000000 +0100 @@ -1,0 +2,6 @@ +Thu Mar 11 10:56:49 CET 2010 - jsuchome@suse.cz + +- YaPI enhanced to return default values +- 2.19.7 + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- yast2-users-2.19.6.tar.bz2 New: ---- yast2-users-2.19.7.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-users.spec ++++++ --- /var/tmp/diff_new_pack.ShAvft/_old 2010-03-12 01:48:09.000000000 +0100 +++ /var/tmp/diff_new_pack.ShAvft/_new 2010-03-12 01:48:09.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package yast2-users (Version 2.19.6) +# spec file for package yast2-users (Version 2.19.7) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -19,11 +19,11 @@ Name: yast2-users -Version: 2.19.6 +Version: 2.19.7 Release: 1 BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-users-2.19.6.tar.bz2 +Source0: yast2-users-2.19.7.tar.bz2 Prefix: /usr @@ -50,7 +50,7 @@ This package provides GUI for maintenance of linux users and groups. %prep -%setup -n yast2-users-2.19.6 +%setup -n yast2-users-2.19.7 %build %{prefix}/bin/y2tool y2autoconf @@ -96,5 +96,4 @@ %{_libdir}/YaST2/plugin/libpy2ag_crack.so %{_libdir}/YaST2/plugin/libpy2ag_crack.la %doc %{prefix}/share/doc/packages/yast2-users - %changelog ++++++ yast2-users-2.19.6.tar.bz2 -> yast2-users-2.19.7.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-2.19.6/VERSION new/yast2-users-2.19.7/VERSION --- old/yast2-users-2.19.6/VERSION 2010-03-10 15:11:54.000000000 +0100 +++ new/yast2-users-2.19.7/VERSION 2010-03-11 10:58:02.000000000 +0100 @@ -1 +1 @@ -2.19.6 +2.19.7 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-2.19.6/src/YaPI/USERS.pm new/yast2-users-2.19.7/src/YaPI/USERS.pm --- old/yast2-users-2.19.6/src/YaPI/USERS.pm 2010-03-10 15:10:25.000000000 +0100 +++ new/yast2-users-2.19.7/src/YaPI/USERS.pm 2010-03-11 10:56:40.000000000 +0100 @@ -111,6 +111,8 @@ # ------------------- imported modules YaST::YCP::Import ("Ldap"); YaST::YCP::Import ("Users"); +YaST::YCP::Import ("UsersCache"); +YaST::YCP::Import ("UsersPasswd"); YaST::YCP::Import ("UsersLDAP"); # ------------------------------------- @@ -2485,5 +2487,52 @@ } return $ret; } + +# Read various default values. The argument map defines what should be returned +# in the return map +BEGIN{$TYPEINFO{Read} = ["function", + [ "map", "string", "any" ], + [ "map", "string", "any" ]]; +} +sub Read { + + my $self = shift; + my $args = shift; + my $ret = {}; + + Users->SetGUI (0); + + my $user_type = $args->{"user_type"} || "local"; + + if ($args->{"login_defaults"} || 0) { + Users->ReadLoginDefaults (); + $ret->{"login_defaults"} = Users->GetLoginDefaults (); + } + # return password length limitation for given user ('local' by default) + if ($args->{"password_length"} || 0) { + Users->ReadSystemDefaults (1); + $ret->{"pw_min"} = Users->GetMinPasswordLength ($user_type); + $ret->{"pw_max"} = Users->GetMaxPasswordLength ($user_type); + } + + if ($args->{"uid_limits"} || 0) { + Users->ReadSystemDefaults (0); + my %configuration = ( + "max_system_uid" => UsersCache->GetMaxUID ("system"), + "max_system_gid" => UsersCache->GetMaxGID ("system") + ); + UsersPasswd->Read (\%configuration); # for filling last UID... + + UsersCache->SetLastUID (UsersPasswd->GetLastUID ($user_type), $user_type); + $ret->{"uid_min"} = UsersCache->GetMinUID ($user_type); + $ret->{"uid_max"} = UsersCache->GetMaxUID ($user_type); + $ret->{"uid_next"} = UsersCache->NextFreeUID (); + } + if ($args->{"all_shells"} || 0) { + Users->ReadAllShells (); + $ret->{"all_shells"} = Users->AllShells (); + } + return $ret; +} 42; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org