summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mandriva.org>2009-09-24 13:15:28 +0000
committerPascal Terjan <pterjan@mandriva.org>2009-09-24 13:15:28 +0000
commitb613a1051efdbd618d9fe5b39b6ebd190138ae9b (patch)
tree87927b131cf53ba03ff648f669dce646c4dfb794
parent477e5654266b1d1e670bbdea38dba85e11bc8e3d (diff)
downloaddrakx-b613a1051efdbd618d9fe5b39b6ebd190138ae9b.tar
drakx-b613a1051efdbd618d9fe5b39b6ebd190138ae9b.tar.gz
drakx-b613a1051efdbd618d9fe5b39b6ebd190138ae9b.tar.bz2
drakx-b613a1051efdbd618d9fe5b39b6ebd190138ae9b.tar.xz
drakx-b613a1051efdbd618d9fe5b39b6ebd190138ae9b.zip
- better describe what usernames we allow (#44783)
- drop useless ? in regexp
-rw-r--r--perl-install/any.pm2
-rw-r--r--perl-install/install/NEWS2
2 files changed, 3 insertions, 1 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index b71305b99..42a208359 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -831,7 +831,7 @@ sub ask_user_and_root {
require authentication;
my $validate_name = sub {
$u->{name} or $in->ask_warn('', N("Please give a user name")), return;
- $u->{name} =~ /^[a-z]+?[a-z0-9_-]*?$/ or $in->ask_warn('', N("The user name must contain only lower cased letters, numbers, `-' and `_'")), return;
+ $u->{name} =~ /^[a-z]+[a-z0-9_-]*$/ or $in->ask_warn('', N("The user name must start with a lower case letter followed by only lower cased letters, numbers, `-' and `_'")), return;
length($u->{name}) <= 32 or $in->ask_warn('', N("The user name is too long")), return;
defined getpwnam($u->{name}) || member($u->{name}, map { $_->{name} } @$users) and $in->ask_warn('', N("This user name has already been added")), return;
'ok';
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 32757b269..37a4ebe98 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,5 @@
+- better describe what usernames we allow (#44783)
+
Version 12.54 - 23 September 2009
- autologin/desktop configuration (shared code):