: is not legal in GECOS
authorivan <ivan>
Mon, 9 Sep 2002 12:34:55 +0000 (12:34 +0000)
committerivan <ivan>
Mon, 9 Sep 2002 12:34:55 +0000 (12:34 +0000)
FS/FS/ClientAPI.pm
FS/FS/ClientAPI/passwd.pm
FS/FS/InitHandler.pm
FS/FS/svc_acct.pm

index f7b8eb0..7cbbdbf 100644 (file)
@@ -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
index 2960622..016ebff 100644 (file)
@@ -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.' } }
index 87f507c..0216615 100644 (file)
@@ -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);
index e62cdd7..9032e20 100644 (file)
@@ -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);