Diff for /loncom/lond between versions 1.410.2.2 and 1.411

version 1.410.2.2, 2009/10/09 12:36:10 version 1.411, 2009/02/10 11:31:26
Line 562  sub InstallFile { Line 562  sub InstallFile {
   
 #  #
 #   ConfigFileFromSelector: converts a configuration file selector  #   ConfigFileFromSelector: converts a configuration file selector
 #                 (one of host or domain at this point) into a   #                 into a configuration file pathname.
 #                 configuration file pathname.  #                 It's probably no longer necessary to preserve
   #                 special handling of hosts or domain as those
   #                 files have been superceded by dns_hosts, dns_domain.
   #                 The default action is just to prepend the directory
   #                 and append .tab
   #
 #  #
 #  Parameters:  #  Parameters:
 #      selector  - Configuration file selector.  #      selector  - Configuration file selector.
Line 580  sub ConfigFileFromSelector { Line 585  sub ConfigFileFromSelector {
     } elsif ($selector eq "domain") {      } elsif ($selector eq "domain") {
  $tablefile = $tabledir."domain.tab";   $tablefile = $tabledir."domain.tab";
     } else {      } else {
  return undef;   $tablefile =  $tabledir.$selector.'.tab';
     }      }
     return $tablefile;      return $tablefile;
   
Line 1781  sub change_password_handler { Line 1786  sub change_password_handler {
     #  npass - New password.      #  npass - New password.
     #  context - Context in which this was called       #  context - Context in which this was called 
     #            (preferences or reset_by_email).      #            (preferences or reset_by_email).
     #  lonhost - HostID of server where request originated  
         
     my ($udom,$uname,$upass,$npass,$context,$lonhost)=split(/:/,$tail);      my ($udom,$uname,$upass,$npass,$context)=split(/:/,$tail);
   
     $upass=&unescape($upass);      $upass=&unescape($upass);
     $npass=&unescape($npass);      $npass=&unescape($npass);
Line 1792  sub change_password_handler { Line 1796  sub change_password_handler {
     # First require that the user can be authenticated with their      # First require that the user can be authenticated with their
     # old password unless context was 'reset_by_email':      # old password unless context was 'reset_by_email':
           
     my ($validated,$failure);      my $validated;
     if ($context eq 'reset_by_email') {      if ($context eq 'reset_by_email') {
         if ($lonhost eq '') {          $validated = 1;
             $failure = 'invalid_client';  
         } else {  
             $validated = 1;  
         }  
     } else {      } else {
         $validated = &validate_user($udom, $uname, $upass);          $validated = &validate_user($udom, $uname, $upass);
     }      }
Line 1812  sub change_password_handler { Line 1812  sub change_password_handler {
     $salt=substr($salt,6,2);      $salt=substr($salt,6,2);
     my $ncpass=crypt($npass,$salt);      my $ncpass=crypt($npass,$salt);
     if(&rewrite_password_file($udom, $uname, "internal:$ncpass")) {      if(&rewrite_password_file($udom, $uname, "internal:$ncpass")) {
  my $msg="Result of password change for $uname: pwchange_success";   &logthis("Result of password change for "
  if ($lonhost) {   ."$uname: pwchange_success");
     $msg .= " - request originated from: $lonhost";  
  }  
  &logthis($msg);  
  &Reply($client, "ok\n", $userinput);   &Reply($client, "ok\n", $userinput);
     } else {      } else {
  &logthis("Unable to open $uname passwd "                  &logthis("Unable to open $uname passwd "               
Line 1837  sub change_password_handler { Line 1834  sub change_password_handler {
  }     }  
   
     } else {      } else {
  if ($failure eq '') {   &Failure( $client, "non_authorized\n", $userinput);
     $failure = 'non_authorized';  
  }  
  &Failure( $client, "$failure\n", $userinput);  
     }      }
   
     return 1;      return 1;
Line 4320  sub dump_domainroles_handler { Line 4314  sub dump_domainroles_handler {
             my ($start,$end) = split(/:/,&unescape($value));              my ($start,$end) = split(/:/,&unescape($value));
             my ($trole,$uname,$udom,$runame,$rudom,$rsec) = split(/:/,&unescape($key));              my ($trole,$uname,$udom,$runame,$rudom,$rsec) = split(/:/,&unescape($key));
             unless ($startfilter eq '.' || !defined($startfilter)) {              unless ($startfilter eq '.' || !defined($startfilter)) {
                 if ((defined($start)) && ($start >= $startfilter)) {                  if ($start >= $startfilter) {
                     $match = 0;                      $match = 0;
                 }                  }
             }              }
             unless ($endfilter eq '.' || !defined($endfilter)) {              unless ($endfilter eq '.' || !defined($endfilter)) {
                 if ((defined($end)) && ($end <= $endfilter)) {                  if ($end <= $endfilter) {
                     $match = 0;                      $match = 0;
                 }                  }
             }              }

Removed from v.1.410.2.2  
changed lines
  Added in v.1.411


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>