'gtmp-file','gtmp',
'grouplist-file','grouplist',
'name-regexp','',
+ 'name-maxlen','8',
'admin-group','',
'finish-command','');
%ovalid= ('user-create','boolean',
'gtmp-file','string',
'grouplist-file','string',
'name-regexp','string',
+ 'name-maxlen','number',
'admin-group','string',
'finish-command','string');
if ($ARGV[0] eq '--create') {
$opt{'user-create'} || !$callinguser ||
&quit("group creation by users disabled by administrator");
- length($groupname) <= 8 || &quit("group names must be 8 chars or fewer");
+ length($groupname) <= $opt{'name-maxlen'} ||
+ &quit("group names must be $opt{'name-maxlen'} chars or fewer");
$!=0; (@pw= getpwuid($callinguser))
|| &quit("cannot get your passwd entry: $!");
$createby= $pw[0];
} elsif (m/^\w[-0-9A-Za-z]*$/) {
y/\n//d;
$chgu=$_;
- getpwnam($chgu) || &quit("username $chgu does not exist");
+ defined(getpwnam($chgu)) || &quit("username $chgu does not exist");
eval "\@l = \@$clist; 1" || &quit("internal error: $@");
$already= grep($_ eq $chgu, @l);
if ($action eq 'add') {