From: ivan Date: Mon, 9 Sep 2002 12:34:55 +0000 (+0000) Subject: : is not legal in GECOS X-Git-Tag: freeside_1_5_0pre1~256 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=a7013a87b67301d8b43c7847b84e06be4802d948 : is not legal in GECOS --- diff --git a/FS/FS/ClientAPI.pm b/FS/FS/ClientAPI.pm index f7b8eb028..7cbbdbf67 100644 --- a/FS/FS/ClientAPI.pm +++ b/FS/FS/ClientAPI.pm @@ -1,13 +1,13 @@ package FS::ClientAPI; use strict; -use vars qw(%handler); +use vars qw(%handler $domain); %handler = (); #find modules foreach my $INC ( @INC ) { - foreach my $file ( glob("$INC/FS/ClientAPI/*") ) { + foreach my $file ( glob("$INC/FS/ClientAPI/*.pm") ) { $file =~ /\/(\w+)\.pm$/ or do { warn "unrecognized ClientAPI file: $file"; next diff --git a/FS/FS/ClientAPI/passwd.pm b/FS/FS/ClientAPI/passwd.pm index 29606227d..016ebff79 100644 --- a/FS/FS/ClientAPI/passwd.pm +++ b/FS/FS/ClientAPI/passwd.pm @@ -15,8 +15,9 @@ FS::ClientAPI->register_handlers( sub passwd { my $packet = shift; - #my $domain = qsearchs('svc_domain', { 'domain' => $packet->{'domain'} } ) - # or return { error => "Domain $domain not found" }; + my $domain = $FS::ClientAPI::domain || $packet->{'domain'}; + my $svc_domain = qsearchs('svc_domain', { 'domain' => $domain } ) + or return { error => "Domain $domain not found" }; my $old_password = $packet->{'old_password'}; my $new_password = $packet->{'new_password'}; @@ -27,11 +28,11 @@ sub passwd { my $svc_acct = ( length($old_password) < 13 && qsearchs( 'svc_acct', { 'username' => $packet->{'username'}, - #'domsvc' => $svc_domain->svcnum, + 'domsvc' => $svc_domain->svcnum, '_password' => $old_password } ) ) || qsearchs( 'svc_acct', { 'username' => $packet->{'username'}, - #'domsvc' => $svc_domain->svcnum, + 'domsvc' => $svc_domain->svcnum, '_password' => $old_password } ); unless ( $svc_acct ) { return { error => 'Incorrect password.' } } diff --git a/FS/FS/InitHandler.pm b/FS/FS/InitHandler.pm index 87f507c22..0216615da 100644 --- a/FS/FS/InitHandler.pm +++ b/FS/FS/InitHandler.pm @@ -1,5 +1,9 @@ package FS::InitHandler; +# this leaks memory under graceful restarts and i wouldn't use it on any +# modern server. useful for very slow machines with memory to spare, just +# always do a full restart + use strict; use vars qw($DEBUG); use FS::UID qw(adminsuidsetup); diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm index e62cdd7bb..9032e20c1 100644 --- a/FS/FS/svc_acct.pm +++ b/FS/FS/svc_acct.pm @@ -752,7 +752,7 @@ sub check { # $error = $self->ut_textn('finger'); # return $error if $error; $self->getfield('finger') =~ - /^([\w \t\!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\*\<\>]*)$/ + /^([\w \t\!\@\#\$\%\&\(\)\-\+\;\'\"\,\.\?\/\*\<\>]*)$/ or return "Illegal finger: ". $self->getfield('finger'); $self->setfield('finger', $1);