Hello community,
here is the log from the commit of package yast2-users
checked in at Thu Jun 29 12:06:27 CEST 2006.
--------
--- yast2-users/yast2-users.changes 2006-05-22 17:21:02.000000000 +0200
+++ yast2-users/yast2-users.changes 2006-06-29 11:25:16.000000000 +0200
@@ -1,0 +2,13 @@
+Thu Jun 29 09:09:02 CEST 2006 - jsuchome@suse.cz
+
+- more characters allowed in password (#175706, #186833)
+- enhanced checking for palindroms in passwords (#144725)
+- returned missing part of help text about login
+- added UserPasswd.pm module which can enhance writing performance (#148482)
+- fixed layout of root password dialog (#164803)
+- removed Frame from Login Settings popup (#179788)
+- do not remove runme_at_boot (it's task for other parts of YaST)
+- user regular expressions for text matching
+- 2.13.19
+
+-------------------------------------------------------------------
Old:
----
yast2-users-2.13.18.tar.bz2
New:
----
yast2-users-2.13.19.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-users.spec ++++++
--- /var/tmp/diff_new_pack.0S0IoQ/_old 2006-06-29 12:05:49.000000000 +0200
+++ /var/tmp/diff_new_pack.0S0IoQ/_new 2006-06-29 12:05:49.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-users (Version 2.13.18)
+# spec file for package yast2-users (Version 2.13.19)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-users
-Version: 2.13.18
+Version: 2.13.19
Release: 1
License: GPL
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-users-2.13.18.tar.bz2
+Source0: yast2-users-2.13.19.tar.bz2
prefix: /usr
BuildRequires: cracklib-devel doxygen gcc-c++ perl-Digest-SHA1 perl-XML-Writer update-desktop-files yast2 yast2-devtools yast2-ldap-client yast2-mail-aliases yast2-perl-bindings yast2-security yast2-testsuite
Requires: yast2 yast2-perl-bindings yast2-country yast2-pam yast2-security yast2-mail-aliases cracklib perl-Digest-SHA1 perl-gettext yast2-ldap-client
@@ -42,7 +42,7 @@
Jiri Suchomel
%prep
-%setup -n yast2-users-2.13.18
+%setup -n yast2-users-2.13.19
%build
%{prefix}/bin/y2tool y2autoconf
@@ -85,6 +85,16 @@
%doc %{prefix}/share/doc/packages/yast2-users
%changelog -n yast2-users
+* Thu Jun 29 2006 - jsuchome@suse.cz
+- more characters allowed in password (#175706, #186833)
+- enhanced checking for palindroms in passwords (#144725)
+- returned missing part of help text about login
+- added UserPasswd.pm module which can enhance writing performance (#148482)
+- fixed layout of root password dialog (#164803)
+- removed Frame from Login Settings popup (#179788)
+- do not remove runme_at_boot (it's task for other parts of YaST)
+- user regular expressions for text matching
+- 2.13.19
* Mon May 22 2006 - jsuchome@suse.cz
- fixed modifying of default group for new users (#176513)
- 2.13.18
++++++ yast2-users-2.13.18.tar.bz2 -> yast2-users-2.13.19.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.13.18/VERSION new/yast2-users-2.13.19/VERSION
--- old/yast2-users-2.13.18/VERSION 2006-05-22 17:09:23.000000000 +0200
+++ new/yast2-users-2.13.19/VERSION 2006-06-29 09:27:18.000000000 +0200
@@ -1 +1 @@
-2.13.18
+2.13.19
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.13.18/src/Makefile.am new/yast2-users-2.13.19/src/Makefile.am
--- old/yast2-users-2.13.18/src/Makefile.am 2005-09-08 10:36:37.000000000 +0200
+++ new/yast2-users-2.13.19/src/Makefile.am 2006-05-26 16:21:20.000000000 +0200
@@ -14,6 +14,7 @@
UsersLDAP.pm \
UsersRoutines.pm \
UsersUI.ycp \
+ UsersPasswd.pm \
UsersPlugins.pm \
UsersPluginLDAPAll.pm
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.13.18/src/Makefile.in new/yast2-users-2.13.19/src/Makefile.in
--- old/yast2-users-2.13.18/src/Makefile.in 2006-01-27 08:42:33.000000000 +0100
+++ new/yast2-users-2.13.19/src/Makefile.in 2006-05-26 16:21:27.000000000 +0200
@@ -225,6 +225,7 @@
UsersLDAP.pm \
UsersRoutines.pm \
UsersUI.ycp \
+ UsersPasswd.pm \
UsersPlugins.pm \
UsersPluginLDAPAll.pm
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.13.18/src/Users.pm new/yast2-users-2.13.19/src/Users.pm
--- old/yast2-users-2.13.18/src/Users.pm 2006-05-05 11:08:35.000000000 +0200
+++ new/yast2-users-2.13.19/src/Users.pm 2006-06-29 09:53:56.000000000 +0200
@@ -152,7 +152,7 @@
my $obscure_checks = 1;
# User/group names must match the following regex expression. (/etc/login.defs)
-my $character_class = "[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.\$-]\\?";
+my $character_class = "[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.\$-]\\?";
# Umask which is used for creating new home directories. (/etc/login.defs)
my $umask = "022";
@@ -4150,7 +4150,7 @@
$plugin_error = GetPluginError ($args, $result);
}
}
- # -------------------------------------- write /etc/group
+ # -------------------------------------- write /etc/passwd
if ($plugin_error eq "" && !WritePasswd ()) {
$ret = Message->ErrorWritingFile ("$base_directory/passwd");
Report->Error ($ret);
@@ -4354,7 +4354,12 @@
# now CHARACTER_CLASS from /etc/login.defs is used
my $valid_logname_chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ._-";
-my $valid_password_chars = "[-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#\$%^&*() ,;:._+/|?{}=\['\"`<>]|]";# the ']' is or-ed...
+my $valid_password_chars = "[-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#\$%^&*() ,;:._+/|?{}=\['\"`~<>]|]";# the ']' is or-ed...
+
+# error popup
+my $valid_password_message = _("The password may only contain the following characters:
+0-9, a-z, A-Z, and any of \"`~!@#\$%^&* ,.;:._-+/|\?='{[(<>)]}\\\".
+Try again.");
my $valid_home_chars = "[0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/_.-]";
@@ -4364,6 +4369,28 @@
return $valid_logname_chars;
}
+##------------------------------------
+BEGIN { $TYPEINFO{ValidPasswordChars} = ["function", "string"]; }
+sub ValidPasswordChars {
+ return $valid_password_chars;
+}
+
+##------------------------------------
+BEGIN { $TYPEINFO{ValidPasswordMessage} = ["function", "string"]; }
+sub ValidPasswordMessage {
+ return $valid_password_message;
+}
+
+##------------------------------------
+# Return the part of help text about valid password characters
+BEGIN { $TYPEINFO{ValidPasswordHelptext} = ["function", "string"]; }
+sub ValidPasswordHelptext {
+ # help text (default part shown in more places)
+ return __("<p>
+Valid password characters are letters, digits, blanks, and
+<tt>,.;:._-+</tt><tt>`~!@#\$%^&*\\/|?{[()]}=</tt>.
+</p>");
+}
##------------------------------------
# check the uid of current user
@@ -4626,12 +4653,10 @@
my $filtered = $pw;
$filtered =~ s/$valid_password_chars//g;
+ $filtered =~ s/\\//g; # bug 175706
if ($filtered ne "") {
- # error popup
- return __("The password may only contain the following characters:
-0-9, a-z, A-Z, and any of \"#* ,.;:._-+!\$%^&/|\?=`'{[(<>)]}\".
-Try again.");
+ return $valid_password_message;
}
return "";
}
@@ -4685,13 +4710,30 @@
# check for lowercase
my $filtered = $pw;
- $filtered =~ s/[a-z]//g;
+ $filtered =~ s/[[:lower:]]//g;
if ($filtered eq "") {
# popup question
return __("You have used only lowercase letters for the password.
This is not a good security practice. Really use this password?");
}
+ # check for uppercase
+ $filtered = $pw;
+ $filtered =~ s/[[:upper:]]//g;
+ if ($filtered eq "") {
+ # popup question
+ return __("You have used only uppercase letters for the password.
+This is not a good security practice. Really use this password?");
+ }
+
+ # check for palindroms
+ $filtered = reverse $pw;
+ if ($filtered eq $pw) {
+ # popup question
+ return __("You have used a palindrom for the password.
+This is not a good security practice. Really use this password?");
+ }
+
# check for numbers
$filtered = $pw;
$filtered =~ s/[0-9]//g;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.13.18/src/UsersPasswd.pm new/yast2-users-2.13.19/src/UsersPasswd.pm
--- old/yast2-users-2.13.18/src/UsersPasswd.pm 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-users-2.13.19/src/UsersPasswd.pm 2006-06-07 10:57:56.000000000 +0200
@@ -0,0 +1,928 @@
+#! /usr/bin/perl -w
+# File: modules/UsersPasswd.pm
+# Package: Configuration of users and groups
+# Summary: Access to /etc/passwd, /etc/shadow and /etc/group
+# Author: Jiri Suchomel
+
+package UsersPasswd;
+
+use ycp;
+use strict;
+
+our %TYPEINFO;
+
+YaST::YCP::Import ("FileUtils");
+YaST::YCP::Import ("SCR");
+
+#---------------------------------------------------------------------
+#--------------------------------------------------------- definitions
+
+# see SYSTEM_UID_MAX and SYSTEM_GID_MAX in /etc/login.defs
+my $max_system_uid = 499;
+my $max_system_gid = 499;
+
+my %last_uid = (
+ "local" => $max_system_uid + 1,
+ "system" => 0
+);
+
+my %users = ();
+my %groups = ();
+my %shadow_tmp = ();
+my %shadow = ();
+
+# used for check if values like uid,username are unique:
+my %uids = ();
+my %usernames = ();
+my %homes = ();
+my %gids = ();
+my %groupnames = ();
+
+# for each user there is a list of groups, where the user is contained
+my %users_groups = ();
+
+my %users_by_uidnumber = ();
+my %groups_by_gidnumber = ();
+
+my $plus_line_group = "";
+my $plus_line_passwd = "";
+my $plus_line_shadow = "";
+
+my @plus_lines_group = ();
+my @plus_lines_passwd = ();
+my @plus_lines_shadow = ();
+
+my @comments_group = ();
+my @comments_passwd = ();
+my @comments_shadow = ();
+
+# error number
+my $errno = 0;
+
+#more information about the error
+my $error_info = "";
+
+# directory where user/group/shadow data should be found
+my $base_directory = "/etc";
+
+# data correctly initialized ? (Read must be called before Get*)
+my $initialized = 0;
+
+#---------------------------------------------------------------------
+#-------------------------------------------------- internal functions
+
+# compares 2 arrays; return 1 if they are equal
+# (from perlfaq)
+sub same_arrays {
+
+ my ($first, $second) = @_;
+ return 0 unless @$first == @$second;
+ for (my $i = 0; $i < @$first; $i++) {
+ return 0 if $first->[$i] ne $second->[$i];
+ }
+ return 1;
+}
+
+# check if the data were initialized correctly
+sub check_init {
+
+ if (!$initialized) {
+ y2warning ("not correctly initialized, data might be broken!");
+ }
+ return $initialized;
+}
+
+
+#---------------------------------------------
+# read /etc/shadow and prepare global 'shadow_tmp' structure
+sub read_shadow {
+
+ %shadow_tmp = ();
+ @plus_lines_shadow = ();
+ @comments_shadow = ();
+
+ my $file = "$base_directory/shadow";
+
+ if (! FileUtils->Exists ($file)) {
+ y2warning ("$file is not available!");
+ return 1;
+ }
+ my $in = SCR->Read (".target.string", $file);
+
+ if (! defined $in) {
+ y2warning ("$file cannot be opened for reading!");
+ return 1;
+ }
+
+ foreach my $shadow_entry (split (/\n/,$in)) {
+ chomp $shadow_entry;
+
+ my ($uname,$pass,$last_change,$min, $max, $warn, $inact, $expire, $flag)
+ = split(/:/,$shadow_entry);
+ my $first = substr ($uname, 0, 1);
+
+ if ($first eq "#") {
+ y2warning ("Found comment line in shadow file: '$shadow_entry'");
+ y2warning ("It will be moved to the end of file");
+ push @comments_shadow, $shadow_entry;
+ }
+ elsif ($first ne "+" && $first ne "-")
+ {
+ if ($uname eq "") {
+ y2error ("strange line in shadow file: '$shadow_entry'");
+ $errno = 9;
+ return 0;
+ }
+
+ if (defined $shadow_tmp{$uname})
+ {
+ y2error ("duplicated username in /etc/shadow! Exiting...");
+ $errno = 3;
+ $error_info = $uname;
+ return 0;
+ }
+ $shadow_tmp{$uname} = {
+ "shadowlastchange" => $last_change,
+ "shadowwarning" => $warn,
+ "shadowinactive" => $inact,
+ "shadowexpire" => $expire,
+ "shadowmin" => $min,
+ "shadowmax" => $max,
+ "shadowflag" => $flag,
+ "userpassword" => $pass || ""
+ };
+ }
+ else # plus line in /etc/shadow
+ {
+ $plus_line_shadow = $shadow_entry;
+ push @plus_lines_shadow, $shadow_entry;
+ }
+ }
+ return 1;
+}
+
+#---------------------------------------------
+# read /etc/group and prepar global 'users_groups' structure
+sub read_group {
+
+ %groups = ();
+ %gids = ();
+ %groupnames = ();
+ @plus_lines_group = ();
+ @comments_group = ();
+
+ my $file = "$base_directory/group";
+
+ if (! FileUtils->Exists ($file)) {
+ y2warning ("$file is not available!");
+ return 1;
+ }
+ my $in = SCR->Read (".target.string", $file);
+ if (! defined $in) {
+ y2warning ("$file cannot be opened for reading!");
+ return 1;
+ }
+
+ foreach my $group (split (/\n/,$in)) {
+
+ chomp $group;
+ my ($groupname, $pass, $gid, $users) = split (/:/,$group);
+ my $first = substr ($groupname, 0, 1);
+
+ if ($first eq "#") {
+ y2warning ("Found comment line in group file: '$group'");
+ y2warning ("It will be moved to the end of file");
+ push @comments_group, $group;
+ }
+ elsif ( $first ne "+" && $first ne "-" ) {
+
+ if (!defined $pass || !defined $gid || !defined $users ||
+ $gid eq "") {
+ y2error ("strange line in group file: '$group'");
+ $errno = 8;
+ $error_info = "$group";
+ return 0;
+ }
+
+ my $group_type = "local";
+ if (($gid <= $max_system_gid || $groupname eq "nobody" ||
+ $groupname eq "nogroup") &&
+ ($groupname ne "users"))
+ {
+ $group_type = "system";
+ }
+
+ # check for duplicates...
+ if (defined $gids{$group_type}{$gid})
+ {
+ y2warning ("duplicated gid ($gid) in /etc/group");
+ $gids{$group_type}{$gid} = $gids{$group_type}{$gid} + 1;
+ }
+ else
+ {
+ $gids{$group_type}{$gid} = 1;
+ }
+
+ if (defined $groupnames{"local"}{$groupname} ||
+ defined $groupnames{"system"}{$groupname})
+ {
+ y2error ("duplicated groupname in /etc/group! Exiting...");
+ $errno = 6;
+ $error_info = $groupname;
+ return 0;
+ }
+ else
+ {
+ $groupnames{$group_type}{$groupname} = 1;
+ }
+ # for each user generate list of groups, where the user is contained
+ my @userlist = split(/,/,$users);
+ my %userlist = ();
+ foreach my $u (@userlist) {
+ $userlist{$u} = 1;
+ $users_groups{$u}{$groupname} = 1;
+ }
+ $groups{$group_type}{$groupname} = {
+ "cn" => $groupname,
+ "gidnumber" => $gid,
+ "userlist" => \%userlist,
+ "type" => $group_type,
+ "userpassword" => $pass,
+ "more_users" => {}
+ };
+
+ if (!defined $groups_by_gidnumber{$group_type}{$gid}) {
+ $groups_by_gidnumber{$group_type}{$gid} = {};
+ }
+ $groups_by_gidnumber{$group_type}{$gid}{$groupname} = 1;
+ }
+ else # save the possible "+"/"-" entries
+ {
+ $plus_line_group = $group;
+ push @plus_lines_group, $group;
+ }
+ }
+ return 1;
+}
+
+# actually read /etc/passwd and save into internal stricture
+sub read_passwd {
+
+ my $file = "$base_directory/passwd";
+ if (! FileUtils->Exists ($file)) {
+ y2warning ("$file cannot be opened for reading!");
+ return 1;
+ }
+ my $in = SCR->Read (".target.string", $file);
+ if (! defined $in) {
+ y2warning ("$file cannot be opened for reading!");
+ return 1;
+ }
+
+ %users = ();
+ %shadow = ();
+ %uids = ();
+ %usernames = ();
+ %homes = ();
+ @plus_lines_passwd = ();
+ @comments_passwd = ();
+
+ foreach my $user (split (/\n/,$in)) {
+
+ chomp $user;
+ my ($username, $password, $uid, $gid, $full, $home, $shell)
+ = split(/:/,$user);
+ my $first = substr ($username, 0, 1);
+
+ if ($first eq "#") {
+ y2warning ("Found comment line in passwd file: '$user'");
+ y2warning ("It will be moved to the end of file");
+ push @comments_passwd, $user;
+ }
+ elsif ($first ne "+" && $first ne "-") {
+
+ if (!defined $password || !defined $uid || !defined $gid ||
+ !defined $full || !defined $home || !defined $shell ||
+ $username eq "" || $uid eq "" || $gid eq "") {
+ y2error ("strange line in passwd file: '$user'");
+ $errno = 7;
+ $error_info = "$user";
+ return 0;
+ }
+
+ my $user_type = "local";
+ my $group_type = "";
+ my $groupname = "";
+ my %grouplist = ();
+
+ if (defined $groups_by_gidnumber{"system"}{$gid})
+ {
+ $group_type = "system";
+ }
+ if (defined $groups_by_gidnumber{"local"}{$gid})
+ {
+ $group_type = "local";
+ }
+ if ($group_type ne "")
+ {
+ $groupname = (keys %{$groups_by_gidnumber{$group_type}{$gid}})[0];
+ # modify default group's more_users entry
+ $groups{$group_type}{$groupname}{"more_users"}{$username} = 1;
+ }
+
+ # add the grouplist
+ if (defined $users_groups{$username}) {
+ %grouplist = %{$users_groups{$username}};
+ }
+
+ if (($uid <= $max_system_uid) || ($username eq "nobody")) {
+ $user_type = "system";
+ if ($last_uid{"system"} < $uid && $username ne "nobody") {
+ $last_uid{"system"} = $uid;
+ }
+ }
+ else {
+ if ($last_uid{"local"} < $uid) {
+ $last_uid{"local"} = $uid;
+ }
+ }
+ my $encoding = "";
+ if ($encoding ne "") {
+ from_to ($full, $encoding, "utf-8");
+ }
+
+ my $colon = index ($full, ",");
+ my $additional = "";
+ if ( $colon > -1)
+ {
+ $additional = $full;
+ $full = substr ($additional, 0, $colon);
+ $additional = substr ($additional, $colon + 1,
+ length ($additional));
+ }
+
+ # check for duplicates in /etc/passwd:
+ if (defined $uids{$user_type}{$uid})
+ {
+ y2warning ("duplicated UID in /etc/passwd: $uid");
+ $uids{$user_type}{$uid} = $uids{$user_type}{$uid} + 1;
+ }
+ else
+ {
+ $uids{$user_type}{$uid} = 1;
+ }
+
+ if (defined $usernames{"local"}{$username} ||
+ defined $usernames{"system"}{$username})
+ {
+ y2error ("duplicated username in /etc/passwd! Exiting...");
+ $errno = 2;
+ $error_info = $username;
+ return 0;
+ }
+ else
+ {
+ $usernames{$user_type}{$username} = 1;
+ }
+ if ($home ne "")
+ {
+ $homes{$user_type}{$home} = 1;
+ }
+
+ my @grouplist = keys (%grouplist);
+
+ # such map we would like to export from the read script...
+ $users{$user_type}{$username} = {
+ "addit_data" => $additional,
+ "cn" => $full,
+ "homedirectory" => $home,
+ "uid" => $username,
+ "uidnumber" => $uid,
+ "gidnumber" => $gid,
+ "loginshell" => $shell,
+ "groupname" => $groupname,
+ "grouplist" => \%grouplist,
+ "userpassword" => "x",
+ "type" => $user_type
+ };
+
+ if (! defined $shadow_tmp{$username}) {
+ y2debug ("There is no shadow entry for user $username.");
+ }
+ else {
+ # divide shadow map accoring to user type
+ $shadow{$user_type}{$username} = $shadow_tmp{$username};
+ }
+
+ if (!defined $users_by_uidnumber{$user_type}{$uid}) {
+ $users_by_uidnumber{$user_type}{$uid} = {};
+ }
+ $users_by_uidnumber{$user_type}{$uid}{$username} = 1;
+ }
+ else # the "+" entry in passwd
+ {
+ $plus_line_passwd = $user;
+ push @plus_lines_passwd, $user;
+ }
+ }
+ return 1;
+}
+
+
+#---------------------------------------------------------------------
+# ------------------------------------------------------- external API
+
+
+# Return last error number
+# @return integer
+BEGIN { $TYPEINFO{GetError} = ["function", "integer"]}
+sub GetError {
+ return YaST::YCP::Integer ($errno);
+}
+
+# Return error message of last error
+# @return string
+BEGIN { $TYPEINFO{GetErrorInfo} = ["function", "string"]}
+sub GetErrorInfo {
+
+ return $error_info;
+}
+
+# Read the data from passwd, shadow and group files and save them to global
+# structures.
+# @return boolean (success)
+# @param configuration map; can contain these keys:
+# "max_system_uid" - maximal UID for system users
+# "max_system_gid" - maximal GID for system groups
+# "base_directory" - directory with data files ("/etc" by default)
+BEGIN { $TYPEINFO{Read} = ["function", "boolean", ["map", "string", "string"]]}
+sub Read {
+
+ my $self = shift;
+ my $config = shift;
+ my $ret = 0;
+
+ if (defined ($config->{"max_system_uid"})) {
+ $max_system_uid = $config->{"max_system_uid"};
+ }
+ if (defined ($config->{"max_system_gid"})) {
+ $max_system_gid = $config->{"max_system_gid"};
+ }
+ if (defined ($config->{"base_directory"})) {
+ $base_directory = $config->{"base_directory"};
+ }
+ if (read_shadow () && read_group ()) {
+ $ret = read_passwd ();
+ }
+ $initialized = $ret;
+ return $ret;
+}
+
+
+# Return the map with users from passwd file.
+# @return map - map is indexed by user name
+# @param type of users to get (local/system)
+BEGIN { $TYPEINFO{GetUsers} = ["function",
+ ["map", "string", ["map", "string", "any"]],
+ "string"];
+}
+sub GetUsers {
+
+ check_init ();
+ my $self = shift;
+ my $type = shift;
+
+ if (defined $users{$type}) {
+ return $users{$type};
+ }
+ return {};
+}
+
+# Return the map with mappings of UID's to user names with such UID
+# @param type of users to get (local/system)
+BEGIN { $TYPEINFO{GetUsersByUIDNumber} = ["function",
+ ["map", "integer", ["map", "string", "integer"]],
+ "string"];
+}
+sub GetUsersByUIDNumber {
+
+ check_init ();
+ my $self = shift;
+ my $type = shift;
+
+ if (defined $users_by_uidnumber{$type}) {
+ return $users_by_uidnumber{$type};
+ }
+ return {};
+}
+
+# Return the map with data from shadow file.
+# @return map - map is indexed by user name
+# @param type of users to get (local/system)
+BEGIN { $TYPEINFO{GetShadow} = ["function",
+ ["map", "string", ["map", "string", "any"]],
+ "string"];
+}
+sub GetShadow {
+ check_init ();
+ my $self = shift;
+ my $type = shift;
+
+ if (defined $shadow{$type}) {
+ return $shadow{$type};
+ }
+ return {};
+}
+
+# Return the map with group data from group file.
+# @return map - map is indexed by group name
+# @param type of groups to get (local/system)
+BEGIN { $TYPEINFO{GetGroups} = ["function",
+ ["map", "string", ["map", "string", "any"]],
+ "string"];
+}
+sub GetGroups {
+ check_init ();
+ my $self = shift;
+ my $type = shift;
+
+ if (defined $groups{$type}) {
+ return $groups{$type};
+ }
+}
+
+# Return the map with mappings of GID's to group names with such GID
+# @param type of groups to get (local/system)
+BEGIN { $TYPEINFO{GetGroupsByGIDNumber} = ["function",
+ ["map", "string", ["map", "string", "any"]],
+ "string"];
+}
+sub GetGroupsByGIDNumber {
+ check_init ();
+ my $self = shift;
+ my $type = shift;
+
+ if (defined $groups_by_gidnumber{$type}) {
+ return $groups_by_gidnumber{$type};
+ }
+ return {};
+}
+
+
+# Return the list of lines beginning with +
+# @param string file to get lines from (passwd/shadow/group)
+BEGIN { $TYPEINFO{GetPluslines} = ["function", ["list", "string"], "string"];}
+sub GetPluslines {
+
+ check_init ();
+ my $self = shift;
+ my $file = shift;
+ if ($file eq "passwd") {
+ return \@plus_lines_passwd;
+ }
+ elsif ($file eq "shadow") {
+ return \@plus_lines_shadow;
+ }
+ elsif ($file eq "group") {
+ return \@plus_lines_group;
+ }
+ return [];
+}
+
+# Set the new list of lines beginning with + for given file. The lines will
+# be written to the end of the file during writing (Write* functions)
+# @param string file to get lines from (passwd/shadow/group)
+# @param list<string> new set of + lines
+BEGIN { $TYPEINFO{SetPluslines} = ["function", "boolean", "string",
+ ["list", "string"]];
+}
+sub SetPluslines {
+
+ my $self = shift;
+ my $file = shift;
+ my $lines = shift;
+
+ if (! defined $lines || ref ($lines) ne "ARRAY") {
+ return 0;
+ }
+
+ if ($file eq "passwd") {
+ if (same_arrays (\@plus_lines_passwd, $lines)) {
+ return 0;
+ }
+ else {
+ @plus_lines_passwd = @$lines;
+ y2milestone ("new plus lines in passwd: ", @plus_lines_passwd);
+ return 1;
+ }
+ }
+ elsif ($file eq "shadow") {
+ if (same_arrays (\@plus_lines_shadow, $lines)) {
+ return 0;
+ }
+ else {
+ @plus_lines_shadow = @$lines;
+ y2milestone ("new plus lines in shadow: ", @plus_lines_shadow);
+ return 1;
+ }
+ }
+ elsif ($file eq "group") {
+ if (same_arrays (\@plus_lines_group, $lines)) {
+ return 0;
+ }
+ else {
+ @plus_lines_group = @$lines;
+ y2milestone ("new plus lines in group: ", @plus_lines_group);
+ return 1;
+ }
+ }
+ return 0;
+}
+
+#--------------------------------------
+# Write map of users to the passwd file
+# @param map of users, indexed by type in 1st level, and by user name in 2nd one
+BEGIN { $TYPEINFO{WriteUsers} = ["function", "boolean", "any" ];}
+sub WriteUsers {
+
+ my $self = shift;
+ my %users_w = %{$_[0]};
+
+ check_init ();
+
+ # do not allow user to remove whole passwd
+ if (!%users_w) {
+ %users_w = %users;
+ }
+
+ my $file = "$base_directory/passwd";
+ if (! FileUtils->Exists ($file)) {
+ y2warning ("$file cannot be opened for writing!");
+ }
+ my $out = "";
+
+ foreach my $type (sort {$b cmp $a} keys %users_w) {
+
+ if ($type ne "local" && $type ne "system") {
+ next;
+ }
+
+ foreach my $username (sort keys %{$users_w{$type}}) {
+
+ my %user = %{$users_w{$type}{$username}};
+ my $pass = "x";
+ my $cn = $user{"cn"} || "";
+ if (defined $user{"addit_data"} && $user{"addit_data"} ne "") {
+ $cn .= ",".$user{"addit_data"};
+ }
+ my $userline = join (":", (
+ $user{"uid"} || "",
+ $pass,
+ $user{"uidnumber"} || 0,
+ $user{"gidnumber"} || 0,
+ $cn,
+ $user{"homedirectory"} || "",
+ $user{"loginshell"} || "",
+ ));
+ if (defined $userline) {
+ $out = $out."$userline\n";
+ }
+ }
+ }
+ if (@comments_passwd > 0) {
+ foreach my $comment (@comments_passwd) {
+ $out = $out."$comment\n";
+ }
+ }
+ if (@plus_lines_passwd > 0) {
+ foreach my $plusline (@plus_lines_passwd) {
+ $out = $out."$plusline\n";
+ }
+ }
+ SCR->Write (".target.string", $file, $out);
+ return 1;
+}
+
+#--------------------------------------------
+# Write map of shadow data to the shadow file
+# @param map of shadow info for all users
+BEGIN { $TYPEINFO{WriteShadow} = ["function", "boolean", "any" ];}
+sub WriteShadow {
+
+ my $self = shift;
+ my %shadow_w = %{$_[0]};
+
+ check_init ();
+
+ # do not allow user to remove whole shadow
+ if (!%shadow_w) {
+ %shadow_w = %shadow;
+ }
+
+ my $file = "$base_directory/shadow";
+ if (! FileUtils->Exists ($file)) {
+ y2warning ("$file cannot be opened for writing!");
+ }
+ my $out = "";
+
+ foreach my $type (sort {$b cmp $a} keys %shadow_w ) {
+
+ if ($type ne "local" && $type ne "system") {
+ next;
+ }
+
+ foreach my $uname (sort keys %{$shadow_w{$type}}) {
+
+ my %shadow_entry = %{$shadow_w{$type}{$uname}};
+ foreach my $key ("shadowwarning", "shadowinactive", "shadowexpire", "shadowflag", "userpassword") {
+ if (!defined $shadow_entry{$key}) {
+ $shadow_entry{$key} = "";
+ }
+ }
+ my $shadowline = join (":", (
+ $uname,
+ $shadow_entry{"userpassword"},
+ $shadow_entry{"shadowlastchange"},
+ $shadow_entry{"shadowmin"},
+ $shadow_entry{"shadowmax"},
+ $shadow_entry{"shadowwarning"},
+ $shadow_entry{"shadowinactive"},
+ $shadow_entry{"shadowexpire"},
+ $shadow_entry{"shadowflag"}
+ ));
+ if (defined $shadowline) {
+ $out = $out."$shadowline\n";
+ }
+ }
+ }
+ if (@comments_shadow > 0) {
+ foreach my $comment (@comments_shadow) {
+ $out = $out."$comment\n";
+ }
+ }
+ if (@plus_lines_shadow > 0) {
+ foreach my $plusline (@plus_lines_shadow) {
+ $out = $out."$plusline\n";
+ }
+ }
+ return SCR->Write (".target.string", $file, $out);
+}
+
+
+#--------------------------------------
+# Write map of groups to the group file
+BEGIN { $TYPEINFO{WriteGroups} = ["function", "boolean", "any" ];}
+sub WriteGroups {
+
+ my $self = shift;
+ my %groups_w = %{$_[0]};
+
+ check_init ();
+
+ # do not allow user to remove whole group
+ if (!%groups_w) {
+ %groups_w = %groups;
+ }
+
+ my $file = "$base_directory/group";
+ if (! FileUtils->Exists ($file)) {
+ y2warning ("$file cannot be opened for writing!");
+ }
+ my $out = "";
+
+ # sort order: system items go before local ones
+ foreach my $type (sort {$b cmp $a} keys %groups_w ) {
+
+ if ($type ne "local" && $type ne "system") {
+ next;
+ }
+
+ # sort order: id
+ foreach my $groupname (sort keys %{$groups_w{$type}}) {
+
+ my %group = %{$groups_w{$type}{$groupname}};
+ my $pass = "x";
+ if (defined $group{"userpassword"}) {
+ $pass = $group{"userpassword"};
+ }
+ my @group_entry = (
+ $group{"cn"},
+ $pass,
+ $group{"gidnumber"} || 0,
+ join (",", sort keys %{$group{"userlist"}})
+ );
+ my $groupline = join (":", @group_entry);
+
+ if (defined $groupline) {
+ $out = $out."$groupline\n";
+ }
+ }
+ }
+ if (@comments_group > 0) {
+ foreach my $comment (@comments_group) {
+ $out = $out."$comment\n";
+ }
+ }
+ if (@plus_lines_group > 0) {
+ foreach my $plusline (@plus_lines_group) {
+ $out = $out."$plusline\n";
+ }
+ }
+ return SCR->Write (".target.string", $file, $out);
+}
+
+#---------------------------------------------------------------------
+#----------------------------------- functions used in caching modules
+
+
+# Return map of home directories of given type (in the form "home" -> 1)
+# @param string type of users
+BEGIN { $TYPEINFO{GetHomes} = ["function",
+ ["map", "string", "integer"],
+ "string"];
+}
+sub GetHomes {
+ my $self = shift;
+ my $type = shift;
+ if (defined $homes{$type}) {
+ return $homes{$type};
+ }
+ return {};
+}
+
+# Return map of UIDs of given type
+# @param string type of users
+BEGIN { $TYPEINFO{GetUIDs} = ["function",
+ ["map", "integer", "integer"],
+ "string"];
+}
+sub GetUIDs {
+ my $self = shift;
+ my $type = shift;
+ if (defined $uids{$type}) {
+ return $uids{$type};
+ }
+ return {};
+}
+
+# Return map of user names of given type
+# @param string type of users
+BEGIN { $TYPEINFO{GetUsernames} = ["function",
+ ["map", "string", "integer"],
+ "string"];
+}
+sub GetUsernames {
+ my $self = shift;
+ my $type = shift;
+ if (defined $usernames{$type}) {
+ return $usernames{$type};
+ }
+ return {};
+}
+
+# Return the highest UID used for user of given type
+# @return integer
+# @param string type of user
+BEGIN { $TYPEINFO{GetLastUID} = ["function", "integer", "string"]; }
+sub GetLastUID {
+ my $self = shift;
+ my $type = shift;
+ if (defined $last_uid{$type}) {
+ return YaST::YCP::Integer ($last_uid{$type});
+ }
+ return 0;
+}
+
+# Return map of GIDs of given type
+# @param string type of groups
+BEGIN { $TYPEINFO{GetGIDs} = ["function",
+ ["map", "integer", "integer"],
+ "string"];
+}
+sub GetGIDs {
+ my $self = shift;
+ my $type = shift;
+ if (defined $gids{$type}) {
+ return $gids{$type};
+ }
+ return {};
+}
+
+# Return map of group names of given type
+# @param string type of groups
+BEGIN { $TYPEINFO{GetGroupnames} = ["function",
+ ["map", "string", "integer"],
+ "string"];
+}
+sub GetGroupnames {
+ my $self = shift;
+ my $type = shift;
+ if (defined $groupnames{$type}) {
+ return $groupnames{$type};
+ }
+ return {};
+}
+
+
+42
+# EOF
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.13.18/src/dialogs.ycp new/yast2-users-2.13.19/src/dialogs.ycp
--- old/yast2-users-2.13.18/src/dialogs.ycp 2006-05-22 16:48:50.000000000 +0200
+++ new/yast2-users-2.13.19/src/dialogs.ycp 2006-05-24 07:48:15.000000000 +0200
@@ -5,7 +5,7 @@
* Authors: Johannes Buchhold ,
* Jiri Suchomel
*
- * $Id: dialogs.ycp 26218 2005-11-21 15:15:22Z jsuchome $
+ * $Id: dialogs.ycp 31120 2006-05-24 05:48:08Z jsuchome $
*/
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.13.18/src/helps.ycp new/yast2-users-2.13.19/src/helps.ycp
--- old/yast2-users-2.13.18/src/helps.ycp 2006-05-02 16:09:51.000000000 +0200
+++ new/yast2-users-2.13.19/src/helps.ycp 2006-06-29 09:53:52.000000000 +0200
@@ -55,11 +55,7 @@
</p>"), enc_to_string[method]:method,
Users::GetMinPasswordLength (type), Users::GetMaxPasswordLength (type));
- // help text 3/4
- help_text = help_text + _("<p>
-Valid password characters are letters, digits, blanks, and
-<tt>#*,.;:._-+!</tt><tt>$%&/|?{[()]}=</tt>.
-</p>");
+ help_text = help_text + Users::ValidPasswordHelptext ();
//help text 4/4
help_text = help_text + _("<p>
@@ -225,18 +221,11 @@
");
}
- help = help +
-
- // help text 3/7
- _("<p>
-</p>
-");
-
if (mail) // these are used only during installation time
{
// help text 4/7 (only during installation)
help = help + _("<p>
-With <b>Auto Login</b> enabled, the login procedure is skipped. This user is logged in automatically.</p>
+The username and password created here are needed to log in and work with your Linux system. With <b>Auto Login</b> enabled, the login procedure is skipped. This user is logged in automatically.</p>
") +
// help text 5/7 (only during installation)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.13.18/src/inst_root.ycp new/yast2-users-2.13.19/src/inst_root.ycp
--- old/yast2-users-2.13.18/src/inst_root.ycp 2006-05-09 12:40:26.000000000 +0200
+++ new/yast2-users-2.13.19/src/inst_root.ycp 2006-06-29 10:06:13.000000000 +0200
@@ -33,13 +33,7 @@
include "users/widgets.ycp"; // for EncryptionPopup()
- string valid_password_chars = "-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*() ,;:._+/|?{}=[]";
-
- if (Stage::cont () && ! Linuxrc::usessh ())
- {
- // what is this for??
- SCR::Execute(.target.remove, "/var/lib/YaST2/runme_at_boot");
- }
+ string valid_password_chars = Users::ValidPasswordChars ();
boolean this_is_for_real = ! Mode::test ();
@@ -51,28 +45,16 @@
term contents = `VBox(
`VStretch(),
- `HSquash(
- `VBox(
+ `HSquash(`VBox(
// advise user to remember his new password
`Label(_("Do not forget what you enter here.")),
`VSpacing(1),
-
- `HBox(`HWeight( 80, `Password(`id(`pw1),
- // Label: get password for user root
- // Please use newline if label is longer than 40 characters
- _("&Password for root User"), "")),
- `HWeight( 20, `Empty() )
- ),
+ // Label: get password for user root
+ `Password (`id(`pw1), _("&Password for root User"), ""),
`VSpacing(1),
-
- `HBox(`HWeight( 80, `Password(`id(`pw2),
- // Label: get same password again for verification
- // Please use newline if label is longer than 40 characters
- _("Con&firm Password"), "")),
- `HWeight( 20, `Empty() )
- )
- )
- ),
+ // Label: get same password again for verification
+ `Password (`id(`pw2), _("Con&firm Password"), "")
+ )),
`VSpacing(3),
// push button
`PushButton(`id(`expert), `opt(`key_F7), _("E&xpert Options...") ),
@@ -107,11 +89,7 @@
</p>
");
- // help text, continued 4/5
- helptext = helptext + _("<p>
-Valid password characters are letters, digits, blanks, and
-<tt>#*,.;:._-+!</tt><tt>$%&/|?{[()]}=</tt>.
-</p>");
+ helptext = helptext + Users::ValidPasswordHelptext ();
// help text, continued 5/5
helptext = helptext + _("<p>
@@ -184,8 +162,7 @@
if (findfirstnotof (pw1, valid_password_chars) != nil)
{
- // popup text: invalid characters in root password
- Popup::Message(_("The password may only contain the following characters:\n 0-9, a-z, A-Z, and any of \"#* ,.;:._-+!$%&/|\?{[()]}\".\nTry again."));
+ Popup::Message (Users::ValidPasswordMessage ());
// Invalidate old password
UI::ChangeWidget(`id(`pw1), `Value, "");
UI::ChangeWidget(`id(`pw2), `Value, "");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.13.18/src/widgets.ycp new/yast2-users-2.13.19/src/widgets.ycp
--- old/yast2-users-2.13.18/src/widgets.ycp 2006-01-05 09:49:33.000000000 +0100
+++ new/yast2-users-2.13.19/src/widgets.ycp 2006-06-07 14:47:43.000000000 +0200
@@ -497,8 +497,9 @@
`VBox(
`HSpacing(40),
`VSpacing(0.5),
- // frame label
- `Frame(_("Display Manager Login Settings"), `HBox(
+ // dialog label
+ `Heading(_("Display Manager Login Settings")),
+ `HBox(
`HSpacing (0.5),
`VBox(
`VSpacing(0.5),
@@ -519,7 +520,7 @@
`VSpacing(0.5)
),
`HSpacing(0.5)
- )),
+ ),
`VSpacing(0.5),
`HBox(
`PushButton(`id(`ok),`opt(`default,`key_F10),Label::OKButton()),
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.13.18/testsuite/tests/AddGroup.out new/yast2-users-2.13.19/testsuite/tests/AddGroup.out
--- old/yast2-users-2.13.18/testsuite/tests/AddGroup.out 2006-05-22 17:05:59.000000000 +0200
+++ new/yast2-users-2.13.19/testsuite/tests/AddGroup.out 2006-05-25 14:54:30.000000000 +0200
@@ -52,7 +52,7 @@
Return
Dump ---- current group (after rich add):
Dump $["cn":"testgrp", "gidnumber":"555", "password":"x", "plugins":[], "type":"local", "userlist":$["hh":"1"], "what":"add_group"]
-Execute .target.bash_output "echo 'testgrp' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"testgrp"]
+Execute .target.bash_output "echo 'testgrp' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"testgrp"]
Return
Dump ---- check group after add:
Dump
@@ -69,7 +69,7 @@
Return
Dump ---- current group after add:
Dump $["cn":"new", "gidnumber":"0", "plugins":[], "type":"system", "what":"add_group"]
-Execute .target.bash_output "echo 'new' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"new"]
+Execute .target.bash_output "echo 'new' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"new"]
Return
Dump ---- check group after add:
Dump
@@ -78,7 +78,7 @@
Return
Dump ---- current group after add):
Dump $["cn":"testgrp", "gidnumber":"1000", "plugins":[], "type":"local", "what":"add_group"]
-Execute .target.bash_output "echo 'testgrp' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"testgrp"]
+Execute .target.bash_output "echo 'testgrp' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"testgrp"]
Return There is a conflict between the entered
Dump ---- check group after add:
Dump There is a conflict between the entered
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.13.18/testsuite/tests/AddUser.out new/yast2-users-2.13.19/testsuite/tests/AddUser.out
--- old/yast2-users-2.13.18/testsuite/tests/AddUser.out 2006-05-22 17:05:59.000000000 +0200
+++ new/yast2-users-2.13.19/testsuite/tests/AddUser.out 2006-05-25 14:55:09.000000000 +0200
@@ -45,7 +45,7 @@
Return
Dump ---- current user (after rich add):
Dump $["cn":"", "create_home":true, "encrypted":true, "gidnumber":"100", "grouplist":$["audio":"1"], "groupname":"users", "homedirectory":"/local/home/aaa", "loginshell":"", "plugins":[], "shadowexpire":"", "shadowflag":"", "shadowinactive":"", "shadowlastchange":"0", "shadowmax":"99999", "shadowmin":"0", "shadowwarning":"7", "text_userpassword":"qqqqq", "type":"local", "uid":"aaa", "uidnumber":"501", "userpassword":"crypted_qqqqq", "what":"add_user"]
-Execute .target.bash_output "echo 'aaa' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"aaa"]
+Execute .target.bash_output "echo 'aaa' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"aaa"]
Return
Dump ---- current group (before user commit):
Dump $["cn":"users", "gidnumber":"100", "type":"local"]
@@ -60,7 +60,7 @@
Return
Dump ---- current user (minimal add, used default values):
Dump $["cn":"", "create_home":true, "gidnumber":"100", "grouplist":$["audio":"1", "video":"1"], "groupname":"users", "homedirectory":"/home/hhh", "loginshell":"", "plugins":[], "shadowexpire":"", "shadowflag":"", "shadowinactive":"", "shadowlastchange":"0", "shadowmax":"99999", "shadowmin":"0", "shadowwarning":"7", "type":"local", "uid":"hhh", "uidnumber":"1000", "userpassword":"", "what":"add_user"]
-Execute .target.bash_output "echo 'hhh' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"hhh"]
+Execute .target.bash_output "echo 'hhh' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"hhh"]
Return No password entered.
Dump ---- check user after add:
Dump No password entered.
@@ -70,7 +70,7 @@
Return
Dump ---- current user (just added):
Dump $["cn":"", "create_home":true, "encrypted":true, "gidnumber":"100", "grouplist":$["audio":"1", "video":"1"], "groupname":"users", "homedirectory":"/home/root", "loginshell":"", "plugins":[], "shadowexpire":"", "shadowflag":"", "shadowinactive":"", "shadowlastchange":"0", "shadowmax":"99999", "shadowmin":"0", "shadowwarning":"7", "text_userpassword":"qqqqq", "type":"local", "uid":"root", "uidnumber":"1000", "userpassword":"crypted_qqqqq", "what":"add_user"]
-Execute .target.bash_output "echo 'root' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"root"]
+Execute .target.bash_output "echo 'root' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"root"]
Return There is a conflict between the entered
Dump ---- check user after add:
Dump There is a conflict between the entered
@@ -91,7 +91,7 @@
Return
Dump ---- current user (just added):
Dump $["cn":"", "create_home":true, "encrypted":true, "gidnumber":"100", "grouplist":$["audio":"1", "video":"1"], "groupname":"users", "homedirectory":"/home/iii$", "loginshell":"", "plugins":[], "shadowexpire":"", "shadowflag":"", "shadowinactive":"", "shadowlastchange":"0", "shadowmax":"99999", "shadowmin":"0", "shadowwarning":"7", "text_userpassword":"qqqqq", "type":"local", "uid":"iii$", "uidnumber":"1000", "userpassword":"crypted_qqqqq", "what":"add_user"]
-Execute .target.bash_output "echo 'iii$' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":""]
+Execute .target.bash_output "echo 'iii$' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":""]
Return The username may contain only
Dump ---- check user after add:
Dump The username may contain only
@@ -103,7 +103,7 @@
Return
Dump ---- current user (just added):
Dump $["cn":"", "create_home":true, "dn":"uid=iii$,dc=suse,dc=cz", "encrypted":true, "gidnumber":"100", "grouplist":$["audio":"1", "video":"1"], "groupname":"users", "homedirectory":"/home/ldap/iii", "loginshell":"", "plugins":[], "shadowexpire":"", "shadowflag":"", "shadowinactive":"", "shadowlastchange":"0", "shadowmax":"99999", "shadowmin":"0", "shadowwarning":"7", "text_userpassword":"qqqqq", "type":"ldap", "uid":"iii$", "uidnumber":"1000", "userpassword":"crypted_qqqqq", "what":"add_user"]
-Execute .target.bash_output "echo 'iii' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"iii"]
+Execute .target.bash_output "echo 'iii' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"iii"]
Return
Dump ---- check user after add:
Dump
@@ -111,5 +111,5 @@
Dump ============== duplicated UID number =====================
Return
Return
-Execute .target.bash_output "echo 'admin' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"admin"]
+Execute .target.bash_output "echo 'admin' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"admin"]
Return
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.13.18/testsuite/tests/CheckPassword.out new/yast2-users-2.13.19/testsuite/tests/CheckPassword.out
--- old/yast2-users-2.13.18/testsuite/tests/CheckPassword.out 2006-05-22 17:05:59.000000000 +0200
+++ new/yast2-users-2.13.19/testsuite/tests/CheckPassword.out 2006-06-29 11:08:46.000000000 +0200
@@ -1,9 +1,13 @@
Execute .crack "qqqqq" 0
Return $["question":"You have used only lowercase letters for the password.\nThis is not a good security practice. Really use this password?", "question_id":"obscure"]
+Execute .crack "QQQQQ" 0
+Return $["question":"You have used only uppercase letters for the password.\nThis is not a good security practice. Really use this password?", "question_id":"obscure"]
Execute .crack "12hh5" 0
Return $["question":"You have used the username as a part of the password.\nThis is not a good security practice. Really use this password?", "question_id":"obscure"]
Execute .crack "12345" 0
Return $["question":"You have used only digits for the password.\nThis is not a good security practice. Really use this password?", "question_id":"obscure"]
+Execute .crack "aaaQQaaa" 0
+Return $["question":"You have used a palindrom for the password.\nThis is not a good security practice. Really use this password?", "question_id":"obscure"]
Execute .crack "1a" 0
Return $["question":"The password should have at least 5 characters.\nReally use this shorter password?", "question_id":"short"]
Execute .crack "1aaaaaaaaaaaaaaaaa" 0
@@ -13,7 +17,9 @@
Dump -------- password: [];',./{}:"<>
Return
Dump -------- password: \
+Return
+Dump -------- password: řšč
Return The password may only contain the following characters:
Dump -------- error: The password may only contain the following characters:
-Dump 0-9, a-z, A-Z, and any of "#* ,.;:._-+!$%^&/|?=`'{[(<>)]}".
+Dump 0-9, a-z, A-Z, and any of "`~!@#$%^&* ,.;:._-+/|?='{[(<>)]}\".
Dump Try again.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.13.18/testsuite/tests/CheckPassword.ycp new/yast2-users-2.13.19/testsuite/tests/CheckPassword.ycp
--- old/yast2-users-2.13.18/testsuite/tests/CheckPassword.ycp 2006-05-22 17:05:59.000000000 +0200
+++ new/yast2-users-2.13.19/testsuite/tests/CheckPassword.ycp 2006-06-07 13:44:30.000000000 +0200
@@ -23,11 +23,14 @@
}
test_ui ("hh", "qqqqq");
+ test_ui ("hh", "QQQQQ");
test_ui ("hh", "12hh5");
test_ui ("hh", "12345");
+ test_ui ("hh", "aaaQQaaa");
test_ui ("hh", "1a");
test_ui ("hh", "1aaaaaaaaaaaaaaaaa");
test_contents ("`!@#$%^&*()-=_+|");
test_contents ("[];',./{}:\"<>");
test_contents ("\\");
+ test_contents ("řšč");
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.13.18/testsuite/tests/EditUser.out new/yast2-users-2.13.19/testsuite/tests/EditUser.out
--- old/yast2-users-2.13.18/testsuite/tests/EditUser.out 2006-05-22 17:05:59.000000000 +0200
+++ new/yast2-users-2.13.19/testsuite/tests/EditUser.out 2006-05-25 14:55:36.000000000 +0200
@@ -42,7 +42,7 @@
Return
Dump ---- user 'hh':
Dump $["create_home":true, "grouplist":$["users":"1"], "homedirectory":"/home/hh", "org_uidnumber":"500", "org_user":$["create_home":true, "grouplist":$["users":"1"], "homedirectory":"/home/hh", "sn":"HH", "type":"local", "uid":"hh", "uidnumber":"500", "userpassword":"x"], "plugins":[], "sn":"HH", "type":"local", "uid":"hh", "uidnumber":"501", "userpassword":"x", "what":"edit_user"]
-Execute .target.bash_output "echo 'hh' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"hh"]
+Execute .target.bash_output "echo 'hh' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"hh"]
Return
Dump ---- check user after edit:
Dump
@@ -66,7 +66,7 @@
Return
Dump ---- user 'hh':
Dump $["create_home":true, "grouplist":$["users":"1"], "homedirectory":"/new/home/hh", "org_homedirectory":"/home/hh", "org_uid":"hh", "org_uidnumber":"501", "org_user":$["create_home":true, "grouplist":$["users":"1"], "homedirectory":"/home/hh", "org_homedirectory":"/home/hh", "org_uid":"hh", "org_uidnumber":"501", "plugins":[], "sn":"HH", "type":"local", "uid":"hh", "uidnumber":"501", "userpassword":"x", "what":"edit_user"], "plugins":[], "sn":"HH", "type":"local", "uid":"hh", "uidnumber":"501", "userpassword":"x", "what":"edit_user"]
-Execute .target.bash_output "echo 'hh' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"hh"]
+Execute .target.bash_output "echo 'hh' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"hh"]
Return
Dump ---- check user after edit:
Dump
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.13.18/testsuite/tests/EditUsersGroups.out new/yast2-users-2.13.19/testsuite/tests/EditUsersGroups.out
--- old/yast2-users-2.13.18/testsuite/tests/EditUsersGroups.out 2006-05-22 17:05:59.000000000 +0200
+++ new/yast2-users-2.13.19/testsuite/tests/EditUsersGroups.out 2006-05-25 14:55:58.000000000 +0200
@@ -37,7 +37,7 @@
Read .passwd.system.groups.groupnames $["ggs":1]
Return
Return
-Execute .target.bash_output "echo 'hh' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"hh"]
+Execute .target.bash_output "echo 'hh' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"hh"]
Return
Dump ---- unchanged group 'ggl':
Dump $["cn":"ggl", "gidnumber":"1000", "type":"local", "userlist":$["hh":"1"]]
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.13.18/testsuite/tests/Import.out new/yast2-users-2.13.19/testsuite/tests/Import.out
--- old/yast2-users-2.13.18/testsuite/tests/Import.out 2006-05-22 17:05:59.000000000 +0200
+++ new/yast2-users-2.13.19/testsuite/tests/Import.out 2006-05-25 14:56:31.000000000 +0200
@@ -27,7 +27,7 @@
Read .passwd.local.users.homes $[]
Read .passwd.local.users.usernames $[]
Read .passwd.local.users.uids $[]
-Execute .target.bash_output "echo 'ggg' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"ggg"]
+Execute .target.bash_output "echo 'ggg' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"ggg"]
Read .target.string "/etc/shells" ""
Read .passwd.system.users.last_uid 0
Read .passwd.system.users.homes $[]
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.13.18/testsuite/tests/YaPIGroupAdd.out new/yast2-users-2.13.19/testsuite/tests/YaPIGroupAdd.out
--- old/yast2-users-2.13.18/testsuite/tests/YaPIGroupAdd.out 2006-05-22 17:05:59.000000000 +0200
+++ new/yast2-users-2.13.19/testsuite/tests/YaPIGroupAdd.out 2006-05-25 14:57:59.000000000 +0200
@@ -37,7 +37,7 @@
Read .passwd.local.groups.groupnames $["users":1]
Read .passwd.system.groups.gids $[0:1]
Read .passwd.system.groups.groupnames $["root":1]
-Execute .target.bash_output "echo 'gg' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"gg"]
+Execute .target.bash_output "echo 'gg' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"gg"]
Execute .target.bash "/bin/cp /etc/group /etc/group.YaST2save" 0
Write .passwd.groups $["local":$["by_gidnumber":$["100":$["users":"1"]], "gg":$["cn":"gg", "gidnumber":"1000", "modified":"added", "org_cn":"gg", "org_gidnumber":"1000", "plugins":[], "type":"local", "userlist":$[], "what":"add_group"], "gids":$["100":"1"], "groupnames":$["users":"1"], "users":$["cn":"users", "gidnumber":"100", "type":"local"]], "system":$["by_gidnumber":$["0":$["root":"1"]], "gids":$["0":"1"], "groupnames":$["root":"1"], "root":$["cn":"root", "gidnumber":"0", "type":"system"]]] true
Execute .target.bash "/usr/sbin/nscd -i group" 0
@@ -82,7 +82,7 @@
Read .passwd.local.groups.groupnames $["users":1]
Read .passwd.system.groups.gids $[0:1]
Read .passwd.system.groups.groupnames $["root":1]
-Execute .target.bash_output "echo 'gg' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"gg"]
+Execute .target.bash_output "echo 'gg' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"gg"]
Execute .target.bash "/bin/cp /etc/group /etc/group.YaST2save" 0
Write .passwd.groups $["local":$["by_gidnumber":$["100":$["users":"1"]], "gg":$["cn":"gg", "gidnumber":"1000", "modified":"added", "org_cn":"gg", "org_gidnumber":"1000", "plugins":[], "type":"local", "userlist":$["hh1":"1", "hh2":"1"], "what":"add_group"], "gids":$["100":"1"], "groupnames":$["users":"1"], "users":$["cn":"users", "gidnumber":"100", "type":"local"]], "system":$["by_gidnumber":$["0":$["root":"1"]], "gids":$["0":"1"], "groupnames":$["root":"1"], "root":$["cn":"root", "gidnumber":"0", "type":"system"]]] true
Execute .target.bash "/usr/sbin/nscd -i group" 0
@@ -127,7 +127,7 @@
Read .passwd.local.groups.groupnames $["users":1]
Read .passwd.system.groups.gids $[0:1]
Read .passwd.system.groups.groupnames $["root":1]
-Execute .target.bash_output "echo 'gg' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"gg"]
+Execute .target.bash_output "echo 'gg' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"gg"]
Execute .target.bash "/bin/cp /etc/group /etc/group.YaST2save" 0
Write .passwd.groups $["local":$["by_gidnumber":$["100":$["users":"1"]], "gg":$["cn":"gg", "gidnumber":"1000", "modified":"added", "org_cn":"gg", "org_gidnumber":"1000", "plugins":[], "type":"local", "userlist":$["hh1":"1", "hh2":"1"], "what":"add_group"], "gids":$["100":"1"], "groupnames":$["users":"1"], "users":$["cn":"users", "gidnumber":"100", "type":"local"]], "system":$["by_gidnumber":$["0":$["root":"1"]], "gids":$["0":"1"], "groupnames":$["root":"1"], "root":$["cn":"root", "gidnumber":"0", "type":"system"]]] true
Execute .target.bash "/usr/sbin/nscd -i group" 0
@@ -172,7 +172,7 @@
Read .passwd.local.groups.groupnames $["users":1]
Read .passwd.system.groups.gids $[0:1]
Read .passwd.system.groups.groupnames $["root":1]
-Execute .target.bash_output "echo 'root' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"root"]
+Execute .target.bash_output "echo 'root' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"root"]
Return There is a conflict between the entered
Dump ------------ GroupAdd return value:
Dump There is a conflict between the entered
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.13.18/testsuite/tests/YaPIGroupMemberAdd.out new/yast2-users-2.13.19/testsuite/tests/YaPIGroupMemberAdd.out
--- old/yast2-users-2.13.18/testsuite/tests/YaPIGroupMemberAdd.out 2006-05-22 17:05:59.000000000 +0200
+++ new/yast2-users-2.13.19/testsuite/tests/YaPIGroupMemberAdd.out 2006-05-25 14:58:53.000000000 +0200
@@ -37,7 +37,7 @@
Read .passwd.local.groups.groupnames $["some_group":1, "users":1]
Read .passwd.system.groups.gids $[0:1]
Read .passwd.system.groups.groupnames $["root":1]
-Execute .target.bash_output "echo 'some_group' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"some_group"]
+Execute .target.bash_output "echo 'some_group' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"some_group"]
Execute .target.bash "/bin/cp /etc/group /etc/group.YaST2save" 0
Write .passwd.groups $["local":$["by_gidnumber":$["100":$["users":"1"], "200":$["some_group":"1"]], "gids":$["100":"1", "200":"1"], "groupnames":$["some_group":"1", "users":"1"], "some_group":$["cn":"some_group", "gidnumber":"200", "modified":"edited", "org_cn":"some_group", "org_gidnumber":"200", "org_group":$["cn":"some_group", "gidnumber":"200", "type":"local"], "plugins":[], "removed_userlist":$[], "type":"local", "userlist":$["hh":"1"], "what":"edit_group"], "users":$["cn":"users", "gidnumber":"100", "type":"local"]], "system":$["by_gidnumber":$["0":$["root":"1"]], "gids":$["0":"1"], "groupnames":$["root":"1"], "root":$["cn":"root", "gidnumber":"0", "type":"system"]]] true
Execute .target.bash "/usr/sbin/nscd -i group" 0
@@ -122,7 +122,7 @@
Read .passwd.local.groups.groupnames $["some_group":1, "users":1]
Read .passwd.system.groups.gids $[0:1]
Read .passwd.system.groups.groupnames $["root":1]
-Execute .target.bash_output "echo 'some_group' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"some_group"]
+Execute .target.bash_output "echo 'some_group' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"some_group"]
Execute .target.bash "/bin/cp /etc/group /etc/group.YaST2save" 0
Write .passwd.groups $["local":$["by_gidnumber":$["100":$["users":"1"], "200":$["some_group":"1"]], "gids":$["100":"1", "200":"1"], "groupnames":$["some_group":"1", "users":"1"], "some_group":$["cn":"some_group", "gidnumber":"200", "modified":"edited", "org_cn":"some_group", "org_gidnumber":"200", "org_group":$["cn":"some_group", "gidnumber":"200", "type":"local"], "plugins":[], "removed_userlist":$[], "type":"local", "userlist":$["jjj":"1"], "what":"edit_group"], "users":$["cn":"users", "gidnumber":"100", "type":"local"]], "system":$["by_gidnumber":$["0":$["root":"1"]], "gids":$["0":"1"], "groupnames":$["root":"1"], "root":$["cn":"root", "gidnumber":"0", "type":"system"]]] true
Execute .target.bash "/usr/sbin/nscd -i group" 0
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.13.18/testsuite/tests/YaPIGroupMemberDelete.out new/yast2-users-2.13.19/testsuite/tests/YaPIGroupMemberDelete.out
--- old/yast2-users-2.13.18/testsuite/tests/YaPIGroupMemberDelete.out 2006-05-22 17:05:59.000000000 +0200
+++ new/yast2-users-2.13.19/testsuite/tests/YaPIGroupMemberDelete.out 2006-05-25 14:59:50.000000000 +0200
@@ -80,7 +80,7 @@
Read .passwd.local.groups.groupnames $["some_group":1, "users":1]
Read .passwd.system.groups.gids $[0:1]
Read .passwd.system.groups.groupnames $["root":1]
-Execute .target.bash_output "echo 'some_group' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"some_group"]
+Execute .target.bash_output "echo 'some_group' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"some_group"]
Execute .target.bash "/bin/cp /etc/group /etc/group.YaST2save" 0
Write .passwd.groups $["local":$["by_gidnumber":$["100":$["users":"1"], "200":$["some_group":"1"]], "gids":$["100":"1", "200":"1"], "groupnames":$["some_group":"1", "users":"1"], "some_group":$["cn":"some_group", "gidnumber":"200", "modified":"edited", "org_cn":"some_group", "org_gidnumber":"200", "org_group":$["cn":"some_group", "gidnumber":"200", "type":"local", "userlist":$[]], "plugins":[], "removed_userlist":$[], "type":"local", "userlist":$[], "what":"edit_group"], "users":$["cn":"users", "gidnumber":"100", "type":"local"]], "system":$["by_gidnumber":$["0":$["root":"1"]], "gids":$["0":"1"], "groupnames":$["root":"1"], "root":$["cn":"root", "gidnumber":"0", "type":"system"]]] true
Execute .target.bash "/usr/sbin/nscd -i group" 0
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.13.18/testsuite/tests/YaPIGroupModify.out new/yast2-users-2.13.19/testsuite/tests/YaPIGroupModify.out
--- old/yast2-users-2.13.18/testsuite/tests/YaPIGroupModify.out 2006-05-22 17:05:59.000000000 +0200
+++ new/yast2-users-2.13.19/testsuite/tests/YaPIGroupModify.out 2006-05-25 15:00:59.000000000 +0200
@@ -77,7 +77,7 @@
Read .passwd.local.groups.groupnames $["users":1]
Read .passwd.system.groups.gids $[0:1, 17:1]
Read .passwd.system.groups.groupnames $["audio":1, "root":1]
-Execute .target.bash_output "echo 'ggg' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"ggg"]
+Execute .target.bash_output "echo 'ggg' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"ggg"]
Execute .target.bash "/bin/cp /etc/group /etc/group.YaST2save" 0
Write .passwd.groups $["local":$["by_gidnumber":$["100":$["users":"1"]], "gids":$["100":"1"], "groupnames":$["users":"1"], "users":$["cn":"users", "gidnumber":"100", "more_users":$["hh":"1"], "type":"local"]], "system":$["by_gidnumber":$["0":$["root":"1"], "17":$["audio":"1"]], "ggg":$["cn":"ggg", "gidnumber":"17", "modified":"edited", "more_users":$[], "org_cn":"ggg", "org_gidnumber":"17", "org_group":$["cn":"audio", "gidnumber":"17", "type":"system"], "plugins":[], "removed_userlist":$[], "type":"system", "what":"edit_group"], "gids":$["0":"1", "17":"1"], "groupnames":$["audio":"1", "root":"1"], "root":$["cn":"root", "gidnumber":"0", "type":"system"]]] true
Execute .target.bash "/usr/sbin/nscd -i group" 0
@@ -122,7 +122,7 @@
Read .passwd.local.groups.groupnames $["users":1]
Read .passwd.system.groups.gids $[0:1, 17:1]
Read .passwd.system.groups.groupnames $["audio":1, "root":1]
-Execute .target.bash_output "echo 'users' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"users"]
+Execute .target.bash_output "echo 'users' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"users"]
Execute .target.bash "/bin/cp /etc/group /etc/group.YaST2save" 0
Write .passwd.groups $["local":$["by_gidnumber":$["100":$["users":"1"]], "gids":$["100":"1"], "groupnames":$["users":"1"], "users":$["cn":"users", "gidnumber":"777", "modified":"edited", "more_users":$["hh":"1"], "org_cn":"users", "org_gidnumber":"777", "org_group":$["cn":"users", "gidnumber":"100", "more_users":$["hh":"1"], "type":"local"], "plugins":[], "removed_userlist":$[], "type":"local", "what":"edit_group"]], "system":$["audio":$["cn":"audio", "gidnumber":"17", "type":"system"], "by_gidnumber":$["0":$["root":"1"], "17":$["audio":"1"]], "gids":$["0":"1", "17":"1"], "groupnames":$["audio":"1", "root":"1"], "root":$["cn":"root", "gidnumber":"0", "type":"system"]]] true
Execute .target.bash "/bin/cp /etc/passwd /etc/passwd.YaST2save" 0
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.13.18/testsuite/tests/YaPIUserAdd.out new/yast2-users-2.13.19/testsuite/tests/YaPIUserAdd.out
--- old/yast2-users-2.13.18/testsuite/tests/YaPIUserAdd.out 2006-05-22 17:05:59.000000000 +0200
+++ new/yast2-users-2.13.19/testsuite/tests/YaPIUserAdd.out 2006-05-25 15:01:48.000000000 +0200
@@ -37,7 +37,7 @@
Read .passwd.local.groups.groupnames $["users":1]
Read .passwd.system.groups.gids $[0:1]
Read .passwd.system.groups.groupnames $["root":1]
-Execute .target.bash_output "echo 'jj' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"jj"]
+Execute .target.bash_output "echo 'jj' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"jj"]
Execute .target.bash "/bin/cp /etc/passwd /etc/passwd.YaST2save" 0
Write .passwd.users $["local":$["by_uidnumber":$["500":$["hh":"1"]], "hh":$["uid":"hh"], "homes":$["/home/hh":"1"], "jj":$["cn":"", "create_home":true, "encrypted":true, "gidnumber":"100", "grouplist":$["audio":"1", "video":"1"], "groupname":"users", "homedirectory":"/tmp/local/home/jj", "loginshell":"", "modified":"added", "org_homedirectory":"/tmp/local/home/jj", "org_uid":"jj", "org_uidnumber":"1000", "plugins":[], "shadowexpire":"", "shadowflag":"", "shadowinactive":"", "shadowlastchange":"0", "shadowmax":"99999", "shadowmin":"0", "shadowwarning":"7", "text_userpassword":"q", "type":"local", "uid":"jj", "uidnumber":"1000", "userpassword":"crypted_q", "what":"add_user"], "last_uid":"500", "uids":$["500":"1"], "usernames":$["hh":"1"]], "system":$["by_uidnumber":$["0":$["root":"1"]], "homes":$[], "last_uid":"0", "root":$["uid":"root", "uidnumber":"0"], "uids":$["0":"1"], "usernames":$["root":"1"]]] true
Read .target.stat "/tmp/local/home/jj" $[]
@@ -90,7 +90,7 @@
Read .passwd.local.groups.groupnames $["users":1]
Read .passwd.system.groups.gids $[0:1]
Read .passwd.system.groups.groupnames $["root":1]
-Execute .target.bash_output "echo 'hh' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"hh"]
+Execute .target.bash_output "echo 'hh' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"hh"]
Return There is a conflict between the entered
Dump ------------ UserAdd return value:
Dump There is a conflict between the entered
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.13.18/testsuite/tests/YaPIUserDisable.out new/yast2-users-2.13.19/testsuite/tests/YaPIUserDisable.out
--- old/yast2-users-2.13.18/testsuite/tests/YaPIUserDisable.out 2006-05-22 17:05:59.000000000 +0200
+++ new/yast2-users-2.13.19/testsuite/tests/YaPIUserDisable.out 2006-05-25 15:03:39.000000000 +0200
@@ -66,7 +66,7 @@
Read .passwd.local.groups.groupnames $["users":1]
Read .passwd.system.groups.gids $[0:1]
Read .passwd.system.groups.groupnames $["root":1]
-Execute .target.bash_output "echo 'hh' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"hh"]
+Execute .target.bash_output "echo 'hh' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"hh"]
Execute .target.bash "/bin/cp /etc/passwd /etc/passwd.YaST2save" 0
Write .passwd.users $["local":$["by_uidnumber":$["500":$["hh":"1"]], "hh":$["create_home":true, "disabled":true, "encrypted":true, "modified":"edited", "org_uid":"hh", "org_uidnumber":"500", "org_user":$["create_home":true, "encrypted":true, "type":"local", "uid":"hh", "uidnumber":"500", "userpassword":"password"], "plugins":[], "type":"local", "uid":"hh", "uidnumber":"500", "userpassword":"!password", "what":"edit_user"], "homes":$["/home/hh":"1"], "last_uid":"500", "uids":$["500":"1"], "usernames":$["hh":"1"]], "system":$["by_uidnumber":$["0":$["root":"1"]], "homes":$[], "last_uid":"0", "root":$["uid":"root", "uidnumber":"0"], "uids":$["0":"1"], "usernames":$["root":"1"]]] true
Execute .target.bash "/bin/cp /etc/shadow /etc/shadow.YaST2save" 0
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.13.18/testsuite/tests/YaPIUserEnable.out new/yast2-users-2.13.19/testsuite/tests/YaPIUserEnable.out
--- old/yast2-users-2.13.18/testsuite/tests/YaPIUserEnable.out 2006-05-22 17:05:59.000000000 +0200
+++ new/yast2-users-2.13.19/testsuite/tests/YaPIUserEnable.out 2006-05-25 15:06:18.000000000 +0200
@@ -37,7 +37,7 @@
Read .passwd.local.groups.groupnames $["users":1]
Read .passwd.system.groups.gids $[0:1]
Read .passwd.system.groups.groupnames $["root":1]
-Execute .target.bash_output "echo 'hh' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"hh"]
+Execute .target.bash_output "echo 'hh' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"hh"]
Execute .target.bash "/bin/cp /etc/passwd /etc/passwd.YaST2save" 0
Write .passwd.users $["local":$["by_uidnumber":$["500":$["hh":"1"]], "hh":$["create_home":true, "enabled":true, "encrypted":true, "modified":"edited", "org_uid":"hh", "org_uidnumber":"500", "org_user":$["create_home":true, "enabled":false, "encrypted":true, "type":"local", "uid":"hh", "uidnumber":"500", "userpassword":"!password"], "plugins":[], "type":"local", "uid":"hh", "uidnumber":"500", "userpassword":"password", "what":"edit_user"], "homes":$["/home/hh":"1"], "last_uid":"500", "uids":$["500":"1"], "usernames":$["hh":"1"]], "system":$["by_uidnumber":$["0":$["root":"1"]], "homes":$[], "last_uid":"0", "root":$["uid":"root", "uidnumber":"0"], "uids":$["0":"1"], "usernames":$["root":"1"]]] true
Execute .target.bash "/bin/cp /etc/shadow /etc/shadow.YaST2save" 0
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.13.18/testsuite/tests/YaPIUserFeatureAdd.out new/yast2-users-2.13.19/testsuite/tests/YaPIUserFeatureAdd.out
--- old/yast2-users-2.13.18/testsuite/tests/YaPIUserFeatureAdd.out 2006-05-22 17:05:59.000000000 +0200
+++ new/yast2-users-2.13.19/testsuite/tests/YaPIUserFeatureAdd.out 2006-05-25 15:09:45.000000000 +0200
@@ -37,7 +37,7 @@
Read .passwd.local.groups.groupnames $["users":1]
Read .passwd.system.groups.gids $[0:1]
Read .passwd.system.groups.groupnames $["root":1]
-Execute .target.bash_output "echo 'hh' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"hh"]
+Execute .target.bash_output "echo 'hh' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"hh"]
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
Dump ============ edit done ========================================
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.13.18/testsuite/tests/YaPIUserModify.out new/yast2-users-2.13.19/testsuite/tests/YaPIUserModify.out
--- old/yast2-users-2.13.18/testsuite/tests/YaPIUserModify.out 2006-05-22 17:05:59.000000000 +0200
+++ new/yast2-users-2.13.19/testsuite/tests/YaPIUserModify.out 2006-05-25 15:29:07.000000000 +0200
@@ -77,7 +77,7 @@
Read .passwd.local.groups.groupnames $["users":1]
Read .passwd.system.groups.gids $[0:1]
Read .passwd.system.groups.groupnames $["root":1]
-Execute .target.bash_output "echo 'hh' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"hh"]
+Execute .target.bash_output "echo 'hh' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"hh"]
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
Dump ============ edit done ========================================
@@ -119,7 +119,7 @@
Read .passwd.local.groups.groupnames $["users":1]
Read .passwd.system.groups.gids $[0:1]
Read .passwd.system.groups.groupnames $["root":1]
-Execute .target.bash_output "echo 'hh' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"hh"]
+Execute .target.bash_output "echo 'hh' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"hh"]
Execute .target.bash "/bin/cp /etc/passwd /etc/passwd.YaST2save" 0
Write .passwd.users $["local":$["by_uidnumber":$["500":$["hh":"1"]], "hh":$["create_home":true, "grouplist":$["users":"1"], "modified":"edited", "org_uid":"hh", "org_uidnumber":"500", "org_user":$["create_home":true, "grouplist":$["users":"1"], "sn":"HH", "type":"local", "uid":"hh", "uidnumber":"500", "userpassword":"x"], "plugins":[], "sn":"HHH", "type":"local", "uid":"hh", "uidnumber":"500", "userpassword":"x", "what":"edit_user"], "homes":$["/home/hh":"1"], "last_uid":"500", "uids":$["500":"1"], "usernames":$["hh":"1"]], "system":$["by_uidnumber":$["0":$["root":"1"]], "homes":$[], "last_uid":"0", "root":$["type":"system", "uid":"root", "uidnumber":"0"], "uids":$["0":"1"], "usernames":$["root":"1"]]] true
Execute .target.bash "/bin/cp /etc/shadow /etc/shadow.YaST2save" 0
@@ -166,7 +166,7 @@
Read .passwd.local.groups.groupnames $["users":1]
Read .passwd.system.groups.gids $[0:1]
Read .passwd.system.groups.groupnames $["root":1]
-Execute .target.bash_output "echo 'hhh' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"hhh"]
+Execute .target.bash_output "echo 'hhh' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"hhh"]
Execute .target.bash "/bin/cp /etc/group /etc/group.YaST2save" 0
Write .passwd.groups $["local":$["by_gidnumber":$["100":$["users":"1"]], "gids":$["100":"1"], "groupnames":$["users":"1"], "users":$["cn":"users", "gidnumber":"100", "modified":"edited", "more_users":$["hhh":"1"], "org_cn":"users", "org_gidnumber":"100", "type":"local", "userlist":$["hhh":"1"], "what":"user_change_default"]], "system":$["by_gidnumber":$["0":$["root":"1"]], "gids":$["0":"1"], "groupnames":$["root":"1"], "root":$["cn":"root", "gidnumber":"0", "type":"system"]]] true
Execute .target.bash "/bin/cp /etc/passwd /etc/passwd.YaST2save" 0
@@ -216,6 +216,6 @@
Read .passwd.local.groups.groupnames $["users":1]
Read .passwd.system.groups.gids $[0:1]
Read .passwd.system.groups.groupnames $["root":1]
-Execute .target.bash_output "echo 'root' | grep '^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\\?$'" $["LANG":"C"] $["stdout":"root"]
+Execute .target.bash_output "echo 'root' | grep '^[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.$-]\\?$'" $["LANG":"C"] $["stdout":"root"]
Return There is a conflict between the entered
Dump ============ edit done ========================================
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit-unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit-help@opensuse.org