summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorivan <ivan>2002-08-29 09:11:28 +0000
committerivan <ivan>2002-08-29 09:11:28 +0000
commit7171a6086a6ba39c73d45ea6aae37c63cdfe5713 (patch)
tree8f07db7f91e185aadfd7c01939f9455724dafb1c /FS
parent54d3c9d101bf35702c00b63f02a6db57ef0f867c (diff)
dont require uid for finger and quota, fix md5 import, make username/password for unexported services conflict at least with self
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/svc_acct.pm28
1 files changed, 13 insertions, 15 deletions
diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm
index c95df94cf..6fe26c8d5 100644
--- a/FS/FS/svc_acct.pm
+++ b/FS/FS/svc_acct.pm
@@ -246,7 +246,8 @@ sub insert {
if ( @dup_user || @dup_userdomain || @dup_uid ) {
my $exports = FS::part_export::export_info('svc_acct');
- my( %conflict_user_svcpart, %conflict_userdomain_svcpart );
+ my %conflict_user_svcpart;
+ my %conflict_userdomain_svcpart = ( $self->svcpart => 'SELF', );
foreach my $part_export ( $part_svc->part_export ) {
@@ -705,12 +706,6 @@ sub check {
&& $recref->{username} ne 'root'
&& $recref->{username} ne 'toor';
-# $error = $self->ut_textn('finger');
-# return $error if $error;
- $self->getfield('finger') =~
- /^([\w \t\!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\*\<\>]*)$/
- or return "Illegal finger: ". $self->getfield('finger');
- $self->setfield('finger', $1);
$recref->{dir} =~ /^([\/\w\-\.\&]*)$/
or return "Illegal directory";
@@ -745,22 +740,25 @@ sub check {
$recref->{shell} = '/bin/sync';
}
- $recref->{quota} =~ /^(\d*)$/ or return "Illegal quota (unimplemented)";
- $recref->{quota} = $1;
-
} else {
$recref->{gid} ne '' ?
return "Can't have gid without uid" : ( $recref->{gid}='' );
- $recref->{finger} ne '' ?
- return "Can't have finger-name without uid" : ( $recref->{finger}='' );
$recref->{dir} ne '' ?
return "Can't have directory without uid" : ( $recref->{dir}='' );
$recref->{shell} ne '' ?
return "Can't have shell without uid" : ( $recref->{shell}='' );
- $recref->{quota} ne '' ?
- return "Can't have quota without uid" : ( $recref->{quota}='' );
}
+ # $error = $self->ut_textn('finger');
+ # return $error if $error;
+ $self->getfield('finger') =~
+ /^([\w \t\!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\*\<\>]*)$/
+ or return "Illegal finger: ". $self->getfield('finger');
+ $self->setfield('finger', $1);
+
+ $recref->{quota} =~ /^(\d*)$/ or return "Illegal quota";
+ $recref->{quota} = $1;
+
unless ( $part_svc->part_svc_column('slipip')->columnflag eq 'F' ) {
unless ( $recref->{slipip} eq '0e0' ) {
$recref->{slipip} =~ /^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/
@@ -791,7 +789,7 @@ sub check {
#$recref->{password} = $1.
# crypt($3,$saltset[int(rand(64))].$saltset[int(rand(64))]
#;
- } elsif ( $recref->{_password} =~ /^((\*SUSPENDED\* )?)([\w\.\/\$]{13,34})$/ ) {
+ } elsif ( $recref->{_password} =~ /^((\*SUSPENDED\* )?)([\w\.\/\$\;]{13,34})$/ ) {
$recref->{_password} = $1.$3;
} elsif ( $recref->{_password} eq '*' ) {
$recref->{_password} = '*';