summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2002-09-09 12:34:55 +0000
committerivan <ivan>2002-09-09 12:34:55 +0000
commita7013a87b67301d8b43c7847b84e06be4802d948 (patch)
treef5e16b547edb4e991aa3f3eb611fde5612c77b0d
parent49006303c63cc2a6fffb5df5d1d3f8947f700b02 (diff)
: is not legal in GECOS
-rw-r--r--FS/FS/ClientAPI.pm4
-rw-r--r--FS/FS/ClientAPI/passwd.pm9
-rw-r--r--FS/FS/InitHandler.pm4
-rw-r--r--FS/FS/svc_acct.pm2
4 files changed, 12 insertions, 7 deletions
diff --git a/FS/FS/ClientAPI.pm b/FS/FS/ClientAPI.pm
index f7b8eb0..7cbbdbf 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 2960622..016ebff 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 87f507c..0216615 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 e62cdd7..9032e20 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);