Diff for /loncom/auth/lonlogin.pm between versions 1.140 and 1.162

version 1.140, 2010/08/25 16:34:32 version 1.162, 2015/03/06 20:39:22
Line 1 Line 1
 # The LearningOnline Network  # The LearningOnline Network
 # Login Screen  # Login Screen
 #  #
 # $Id$  # $Id$
 #  #
 # Copyright Michigan State University Board of Trustees  # Copyright Michigan State University Board of Trustees
 #  #
 # This file is part of the LearningOnline Network with CAPA (LON-CAPA).  # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
 #  #
 # LON-CAPA is free software; you can redistribute it and/or modify  # LON-CAPA is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by  # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 2 of the License, or  # the Free Software Foundation; either version 2 of the License, or
 # (at your option) any later version.  # (at your option) any later version.
 #  #
 # LON-CAPA is distributed in the hope that it will be useful,  # LON-CAPA is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of  # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.  # GNU General Public License for more details.
 #  #
 # You should have received a copy of the GNU General Public License  # You should have received a copy of the GNU General Public License
 # along with LON-CAPA; if not, write to the Free Software  # along with LON-CAPA; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #  #
 # /home/httpd/html/adm/gpl.txt  # /home/httpd/html/adm/gpl.txt
 #  #
 # http://www.lon-capa.org/  # http://www.lon-capa.org/
 #  #
   
 package Apache::lonlogin;  package Apache::lonlogin;
   
 use strict;  use strict;
 use Apache::Constants qw(:common);  use Apache::Constants qw(:common);
 use Apache::File ();  use Apache::File ();
 use Apache::lonnet;  use Apache::lonnet;
 use Apache::loncommon();  use Apache::loncommon();
 use Apache::lonauth();  use Apache::lonauth();
 use Apache::lonlocal;  use Apache::lonlocal;
 use Apache::migrateuser();  use Apache::migrateuser();
 use lib '/home/httpd/lib/perl/';  use lib '/home/httpd/lib/perl/';
 use LONCAPA;  use LONCAPA;
     
 sub handler {  sub handler {
     my $r = shift;      my $r = shift;
   
     &Apache::loncommon::get_unprocessed_cgi      &Apache::loncommon::get_unprocessed_cgi
  (join('&',$ENV{'QUERY_STRING'},$env{'request.querystring'},   (join('&',$ENV{'QUERY_STRING'},$env{'request.querystring'},
       $ENV{'REDIRECT_QUERY_STRING'}),        $ENV{'REDIRECT_QUERY_STRING'}),
  ['interface','username','domain','firsturl','localpath','localres',   ['interface','username','domain','firsturl','localpath','localres',
   'token','role','symb']);    'token','role','symb','iptoken']);
     if (!defined($env{'form.firsturl'})) {      if (!defined($env{'form.firsturl'})) {
         &Apache::lonacc::get_posted_cgi($r,['firsturl']);          &Apache::lonacc::get_posted_cgi($r,['firsturl']);
     }      }
   
 # -- check if they are a migrating user  # -- check if they are a migrating user
     if (defined($env{'form.token'})) {      if (defined($env{'form.token'})) {
  return &Apache::migrateuser::handler($r);   return &Apache::migrateuser::handler($r);
     }      }
   
     &Apache::loncommon::no_cache($r);      &Apache::loncommon::no_cache($r);
     &Apache::lonlocal::get_language_handle($r);      &Apache::lonlocal::get_language_handle($r);
     &Apache::loncommon::content_type($r,'text/html');      &Apache::loncommon::content_type($r,'text/html');
     $r->send_http_header;      $r->send_http_header;
     return OK if $r->header_only;      return OK if $r->header_only;
   
   
 # Are we re-routing?  # Are we re-routing?
     if (-e '/home/httpd/html/lon-status/reroute.txt') {      my $londocroot = $r->dir_config('lonDocRoot');
  &Apache::lonauth::reroute($r);      if (-e "$londocroot/lon-status/reroute.txt") {
  return OK;   &Apache::lonauth::reroute($r);
     }   return OK;
       }
   
 # -------------------------------- Prevent users from attempting to login twice      $env{'form.firsturl'} =~ s/(`)/'/g;
     my $handle = &Apache::lonnet::check_for_valid_session($r);  
     if ($handle ne '') {  # -------------------------------- Prevent users from attempting to login twice
         my $lonidsdir=$r->dir_config('lonIDsDir');      my $handle = &Apache::lonnet::check_for_valid_session($r);
         if ($handle=~/^publicuser\_/) {      if ($handle ne '') {
 # For "public user" - remove it, we apparently really want to login          my $lonidsdir=$r->dir_config('lonIDsDir');
     unlink($r->dir_config('lonIDsDir')."/$handle.id");          if ($handle=~/^publicuser\_/) {
         } else {  # For "public user" - remove it, we apparently really want to login
 # Indeed, a valid token is found      unlink($r->dir_config('lonIDsDir')."/$handle.id");
             &Apache::lonnet::transfer_profile_to_env($lonidsdir,$handle);          } else {
     my $start_page =   # Indeed, a valid token is found
         &Apache::loncommon::start_page('Already logged in');              &Apache::lonnet::transfer_profile_to_env($lonidsdir,$handle);
     my $end_page =       my $start_page =
         &Apache::loncommon::end_page();          &Apache::loncommon::start_page('Already logged in');
             my $dest = '/adm/roles';      my $end_page =
             if ($env{'form.firsturl'} ne '') {          &Apache::loncommon::end_page();
                 $dest = $env{'form.firsturl'};               my $dest = '/adm/roles';
             }              if ($env{'form.firsturl'} ne '') {
     $r->print(                  $dest = $env{'form.firsturl'};
                   $start_page              }
                  .'<h1>'.&mt('You are already logged in!').'</h1>'      $r->print(
                  .'<p>'.&mt('Please either [_1]continue the current session[_2] or [_3]log out[_4].',                    $start_page
                   '<a href="'.$dest.'">','</a>','<a href="/adm/logout">','</a>').'</p>'                   .'<p class="LC_warning">'.&mt('You are already logged in!').'</p>'
                  .$end_page                   .'<p>'.&mt('Please either [_1]continue the current session[_2] or [_3]log out[_4].',
                  );                    '<a href="'.$dest.'">','</a>','<a href="/adm/logout">','</a>').'</p>'
             return OK;                   .$end_page
         }                   );
     }              return OK;
           }
 # ---------------------------------------------------- No valid token, continue      }
   
  # ---------------------------- Not possible to really login to domain "public"  # ---------------------------------------------------- No valid token, continue
     if ($env{'form.domain'} eq 'public') {  
  $env{'form.domain'}='';  # ---------------------------- Not possible to really login to domain "public"
  $env{'form.username'}='';      if ($env{'form.domain'} eq 'public') {
     }   $env{'form.domain'}='';
 # ----------------------------------------------------------- Process Interface   $env{'form.username'}='';
     $env{'form.interface'}=~s/\W//g;      }
   
     my $httpbrowser=$ENV{"HTTP_USER_AGENT"};  # ------ Is this page requested because /adm/migrateuser detected an IP change?
       my %sessiondata;
     my $iconpath=       if ($env{'form.iptoken'}) {
  &Apache::loncommon::lonhttpdurl($r->dir_config('lonIconsURL'));          %sessiondata = &Apache::lonnet::tmpget($env{'form.iptoken'});
           unless ($sessiondata{'sessionserver'}) {
     my $lonhost = $r->dir_config('lonHostID');              my $delete = &Apache::lonnet::tmpdel($env{'form.iptoken'});
     my $domain = &Apache::lonnet::default_login_domain();              delete($env{'form.iptoken'});
     if ($lonhost ne '') {          }
         my $redirect = &check_loginvia($domain,$lonhost);      }
         if ($redirect) {  # ----------------------------------------------------------- Process Interface
             $r->print($redirect);      $env{'form.interface'}=~s/\W//g;
             return OK;  
         }       (undef,undef,undef,undef,undef,undef,my $clientmobile) =
     }          &Apache::loncommon::decode_user_agent();
   
     if (($env{'form.domain'}) &&       my $iconpath=
  (&Apache::lonnet::domain($env{'form.domain'},'description'))) {   &Apache::loncommon::lonhttpdurl($r->dir_config('lonIconsURL'));
  $domain=$env{'form.domain'};  
     }      my $lonhost = $r->dir_config('lonHostID');
     my $role    = $r->dir_config('lonRole');      my $domain = &Apache::lonnet::default_login_domain();
     my $loadlim = $r->dir_config('lonLoadLim');      my $defdom = $domain;
     my $servadm = $r->dir_config('lonAdmEMail');      if ($lonhost ne '') {
     my $tabdir  = $r->dir_config('lonTabDir');          unless ($sessiondata{'sessionserver'}) {
     my $include = $r->dir_config('lonIncludes');              my $redirect = &check_loginvia($domain,$lonhost);
     my $expire  = $r->dir_config('lonExpire');              if ($redirect) {
     my $version = $r->dir_config('lonVersion');                  $r->print($redirect);
     my $host_name = &Apache::lonnet::hostname($lonhost);                  return OK;
               }
 # --------------------------------------------- Default values for login fields          }
       }
     my $authusername=($env{'form.username'}?$env{'form.username'}:'');  
     my $authdomain=($env{'form.domain'}?$env{'form.domain'}:$domain);      if (($sessiondata{'domain'}) &&
           (&Apache::lonnet::domain($env{'form.domain'},'description'))) {
 # ---------------------------------------------------------- Determine own load          $domain=$sessiondata{'domain'};
     my $loadavg;      } elsif (($env{'form.domain'}) &&
     {   (&Apache::lonnet::domain($env{'form.domain'},'description'))) {
  my $loadfile=Apache::File->new('/proc/loadavg');   $domain=$env{'form.domain'};
  $loadavg=<$loadfile>;      }
     }  
     $loadavg =~ s/\s.*//g;      my $role    = $r->dir_config('lonRole');
     my $loadpercent=sprintf("%.1f",100*$loadavg/$loadlim);      my $loadlim = $r->dir_config('lonLoadLim');
     my $userloadpercent=&Apache::lonnet::userload();      my $uloadlim= $r->dir_config('lonUserLoadLim');
       my $servadm = $r->dir_config('lonAdmEMail');
     my $firsturl=      my $tabdir  = $r->dir_config('lonTabDir');
     ($env{'request.firsturl'}?$env{'request.firsturl'}:$env{'form.firsturl'});      my $include = $r->dir_config('lonIncludes');
 # ----------------------------------------------------------- Get announcements      my $expire  = $r->dir_config('lonExpire');
     my $announcements=&Apache::lonnet::getannounce();      my $version = $r->dir_config('lonVersion');
 # -------------------------------------------------------- Set login parameters      my $host_name = &Apache::lonnet::hostname($lonhost);
   
     my @hexstr=('0','1','2','3','4','5','6','7',  # --------------------------------------------- Default values for login fields
                 '8','9','a','b','c','d','e','f');     
     my $lkey='';      my ($authusername,$authdomain);
     for (0..7) {      if ($sessiondata{'username'}) {
         $lkey.=$hexstr[rand(15)];          $authusername=$sessiondata{'username'};
     }      } else {
           $env{'form.username'} = &Apache::loncommon::cleanup_html($env{'form.username'});
     my $ukey='';          $authusername=($env{'form.username'}?$env{'form.username'}:'');
     for (0..7) {      }
         $ukey.=$hexstr[rand(15)];      if ($sessiondata{'domain'}) {
     }          $authdomain=$sessiondata{'domain'};
       } else {
     my $lextkey=hex($lkey);          $env{'form.domain'} = &Apache::loncommon::cleanup_html($env{'form.domain'});
     if ($lextkey>2147483647) { $lextkey-=4294967296; }          $authdomain=($env{'form.domain'}?$env{'form.domain'}:$domain);
       }
     my $uextkey=hex($ukey);  
     if ($uextkey>2147483647) { $uextkey-=4294967296; }  # ---------------------------------------------------------- Determine own load
       my $loadavg;
 # -------------------------------------------------------- Store away log token      {
     my $tokenextras;   my $loadfile=Apache::File->new('/proc/loadavg');
     if ($env{'form.role'}) {   $loadavg=<$loadfile>;
         $tokenextras = '&role='.&escape($env{'form.role'});      }
     }      $loadavg =~ s/\s.*//g;
     if ($env{'form.symb'}) {  
         if (!$tokenextras) {      my ($loadpercent,$userloadpercent);
             $tokenextras = '&';      if ($loadlim) {
         }          $loadpercent=sprintf("%.1f",100*$loadavg/$loadlim);
         $tokenextras .= '&symb='.&escape($env{'form.symb'});      }
     }      if ($uloadlim) {
     my $logtoken=Apache::lonnet::reply(          $userloadpercent=&Apache::lonnet::userload();
        'tmpput:'.$ukey.$lkey.'&'.$firsturl.$tokenextras,      }
        $lonhost);  
       my $firsturl=
 # ------------------- If we cannot talk to ourselves, we are in serious trouble      ($env{'request.firsturl'}?$env{'request.firsturl'}:$env{'form.firsturl'});
   
     if ($logtoken eq 'con_lost') {  # ----------------------------------------------------------- Get announcements
         my $spares='';      my $announcements=&Apache::lonnet::getannounce();
  my $last;  # -------------------------------------------------------- Set login parameters
         foreach my $hostid (sort  
     {      my @hexstr=('0','1','2','3','4','5','6','7',
  &Apache::lonnet::hostname($a) cmp                  '8','9','a','b','c','d','e','f');
     &Apache::lonnet::hostname($b);      my $lkey='';
     }      for (0..7) {
     keys(%Apache::lonnet::spareid)) {          $lkey.=$hexstr[rand(15)];
             next if ($hostid eq $lonhost);      }
     my $hostname = &Apache::lonnet::hostname($hostid);  
     next if ($last eq $hostname);      my $ukey='';
             $spares.='<br /><font size="+1"><a href="http://'.      for (0..7) {
                 $hostname.          $ukey.=$hexstr[rand(15)];
                 '/adm/login?domain='.$authdomain.'">'.      }
                 $hostname.'</a>'.  
                 ' '.&mt('(preferred)').'</font>'.$/;      my $lextkey=hex($lkey);
     $last=$hostname;      if ($lextkey>2147483647) { $lextkey-=4294967296; }
         }  
 $spares.= '<br />';      my $uextkey=hex($ukey);
 my %all_hostnames = &Apache::lonnet::all_hostnames();      if ($uextkey>2147483647) { $uextkey-=4294967296; }
 foreach my $hostid (sort  
     {  # -------------------------------------------------------- Store away log token
  &Apache::lonnet::hostname($a) cmp      my $tokenextras;
     &Apache::lonnet::hostname($b);      if ($env{'form.role'}) {
     }          $tokenextras = '&role='.&escape($env{'form.role'});
     keys(%all_hostnames)) {      }
     next if ($hostid eq $lonhost || $Apache::lonnet::spareid{$hostid});      if ($env{'form.symb'}) {
     my $hostname = &Apache::lonnet::hostname($hostid);          if (!$tokenextras) {
     next if ($last eq $hostname);              $tokenextras = '&';
     $spares.='<br /><a href="http://'.          }
  $hostname.          $tokenextras .= '&symb='.&escape($env{'form.symb'});
  '/adm/login?domain='.$authdomain.'">'.      }
  $hostname.'</a>';      if ($env{'form.iptoken'}) {
     $last=$hostname;          if (!$tokenextras) {
 }              $tokenextras = '&&';
 $r->print(          }
    '<html>'          $tokenextras .= '&iptoken='.&escape($env{'form.iptoken'});
   .'<head><title>'      }
   .&mt('The LearningOnline Network with CAPA')      my $logtoken=Apache::lonnet::reply(
   .'</title></head>'         'tmpput:'.$ukey.$lkey.'&'.$firsturl.$tokenextras,
   .'<body bgcolor="#FFFFFF">'         $lonhost);
   .'<h1>'.&mt('The LearningOnline Network with CAPA').'</h1>'  
   .'<img src="/adm/lonKaputt/lonlogo_broken.gif" align="right" />'  # -- If we cannot talk to ourselves, or hostID does not map to a hostname
   .'<h3>'.&mt('This LON-CAPA server is temporarily not available for login.').'</h3>'  #    we are in serious trouble
   .'<p>'.&mt('Please attempt to login to one of the following servers:').'</p>'  
   .$spares      if (($logtoken eq 'con_lost') || ($logtoken eq 'no_such_host')) {
   .'</body>'          if ($logtoken eq 'no_such_host') {
   .'</html>'              &Apache::lonnet::logthis('No valid logtoken for log-in page -- unable to determine hostname for hostID: '.$lonhost.'. Check entry in hosts.tab');
 );          }
 return OK;          my $spares='';
 }   my $last;
           foreach my $hostid (sort
 # ----------------------------------------------- Apparently we are in business      {
 $servadm=~s/\,/\<br \/\>/g;   &Apache::lonnet::hostname($a) cmp
       &Apache::lonnet::hostname($b);
 # ----------------------------------------------------------- Front page design      }
 my $pgbg=&Apache::loncommon::designparm('login.pgbg',$domain);      keys(%Apache::lonnet::spareid)) {
 my $font=&Apache::loncommon::designparm('login.font',$domain);              next if ($hostid eq $lonhost);
 my $link=&Apache::loncommon::designparm('login.link',$domain);      my $hostname = &Apache::lonnet::hostname($hostid);
 my $vlink=&Apache::loncommon::designparm('login.vlink',$domain);      next if (($last eq $hostname) || ($hostname eq ''));
 my $alink=&Apache::loncommon::designparm('login.alink',$domain);              $spares.='<br /><font size="+1"><a href="http://'.
 my $mainbg=&Apache::loncommon::designparm('login.mainbg',$domain);                  $hostname.
 my $loginbox_bg=&Apache::loncommon::designparm('login.sidebg',$domain);                  '/adm/login?domain='.$authdomain.'">'.
 my $loginbox_header_bgcol=&Apache::loncommon::designparm('login.bgcol',$domain);                  $hostname.'</a>'.
 my $loginbox_header_textcol=&Apache::loncommon::designparm('login.textcol',$domain);                  ' '.&mt('(preferred)').'</font>'.$/;
 my $logo=&Apache::loncommon::designparm('login.logo',$domain);      $last=$hostname;
 my $img=&Apache::loncommon::designparm('login.img',$domain);          }
 my $domainlogo='<div>'.&Apache::loncommon::domainlogo($domain).'</div>';          if ($spares) {
 my $showbanner = 1;              $spares.= '<br />';
 my $showmainlogo = 1;          }
 if (defined(&Apache::loncommon::designparm('login.showlogo_img',$domain))) {          my %all_hostnames = &Apache::lonnet::all_hostnames();
     $showbanner = &Apache::loncommon::designparm('login.showlogo_img',$domain);          foreach my $hostid (sort
 }      {
 if (defined(&Apache::loncommon::designparm('login.showlogo_logo',$domain))) {   &Apache::lonnet::hostname($a) cmp
     $showmainlogo = &Apache::loncommon::designparm('login.showlogo_logo',$domain);      &Apache::lonnet::hostname($b);
 }      }
 my $showadminmail=&Apache::loncommon::designparm('login.adminmail',$domain);      keys(%all_hostnames)) {
 my $showcoursecat =              next if ($hostid eq $lonhost || $Apache::lonnet::spareid{$hostid});
 &Apache::loncommon::designparm('login.coursecatalog',$domain);              my $hostname = &Apache::lonnet::hostname($hostid);
 my $shownewuserlink =               next if (($last eq $hostname) || ($hostname eq ''));
 &Apache::loncommon::designparm('login.newuser',$domain);              $spares.='<br /><a href="http://'.
 my $now=time;               $hostname.
 my $js = (<<ENDSCRIPT);               '/adm/login?domain='.$authdomain.'">'.
                $hostname.'</a>';
 <script type="text/javascript" language="JavaScript">              $last=$hostname;
 // <![CDATA[           }
 function send()           $r->print(
 {     '<html>'
 this.document.server.elements.uname.value    .'<head><title>'
 =this.document.client.elements.uname.value;    .&mt('The LearningOnline Network with CAPA')
     .'</title></head>'
 this.document.server.elements.udom.value    .'<body bgcolor="#FFFFFF">'
 =this.document.client.elements.udom.value;    .'<h1>'.&mt('The LearningOnline Network with CAPA').'</h1>'
     .'<img src="/adm/lonKaputt/lonlogo_broken.gif" align="right" />'
 uextkey=this.document.client.elements.uextkey.value;    .'<h3>'.&mt('This LON-CAPA server is temporarily not available for login.').'</h3>');
 lextkey=this.document.client.elements.lextkey.value;          if ($spares) {
 initkeys();              $r->print('<p>'.&mt('Please attempt to login to one of the following servers:')
                        .'</p>'
 this.document.server.elements.upass0.value                       .$spares);
     =crypted(this.document.client.elements.upass$now.value.substr(0,15));          }
 this.document.server.elements.upass1.value          $r->print('</body>'
     =crypted(this.document.client.elements.upass$now.value.substr(15,15));                   .'</html>'
 this.document.server.elements.upass2.value          );
     =crypted(this.document.client.elements.upass$now.value.substr(30,15));          return OK;
       }
 this.document.client.elements.uname.value='';  
 this.document.client.elements.upass$now.value='';  # ----------------------------------------------- Apparently we are in business
       $servadm=~s/\,/\<br \/\>/g;
 this.document.server.submit();  
 return false;  # ----------------------------------------------------------- Front page design
 }      my $pgbg=&Apache::loncommon::designparm('login.pgbg',$domain);
       my $font=&Apache::loncommon::designparm('login.font',$domain);
 function enableInput() {      my $link=&Apache::loncommon::designparm('login.link',$domain);
     this.document.client.elements.upass$now.removeAttribute("readonly");      my $vlink=&Apache::loncommon::designparm('login.vlink',$domain);
     this.document.client.elements.uname.removeAttribute("readonly");      my $alink=&Apache::loncommon::designparm('login.alink',$domain);
     this.document.client.elements.udom.removeAttribute("readonly");      my $mainbg=&Apache::loncommon::designparm('login.mainbg',$domain);
     return;      my $loginbox_bg=&Apache::loncommon::designparm('login.sidebg',$domain);
 }      my $loginbox_header_bgcol=&Apache::loncommon::designparm('login.bgcol',$domain);
       my $loginbox_header_textcol=&Apache::loncommon::designparm('login.textcol',$domain);
 // ]]>      my $logo=&Apache::loncommon::designparm('login.logo',$domain);
 </script>      my $img=&Apache::loncommon::designparm('login.img',$domain);
       my $domainlogo=&Apache::loncommon::domainlogo($domain);
 ENDSCRIPT      my $showbanner = 1;
       my $showmainlogo = 1;
 # --------------------------------------------------- Print login screen header      if (defined(&Apache::loncommon::designparm('login.showlogo_img',$domain))) {
           $showbanner = &Apache::loncommon::designparm('login.showlogo_img',$domain);
 my %add_entries = (      }
        bgcolor      => "$mainbg",      if (defined(&Apache::loncommon::designparm('login.showlogo_logo',$domain))) {
        text         => "$font",          $showmainlogo = &Apache::loncommon::designparm('login.showlogo_logo',$domain);
        link         => "$link",      }
        vlink        => "$vlink",      my $showadminmail;
        alink        => "$alink",      my @possdoms = &Apache::lonnet::current_machine_domains();
                onload       => 'javascript:enableInput();',);      if (grep(/^\Q$domain\E$/,@possdoms)) {
           $showadminmail=&Apache::loncommon::designparm('login.adminmail',$domain);
 $r->print(&Apache::loncommon::start_page('The LearningOnline Network with CAPA Login',$js,      }
        { 'redirect'       => [$expire,'/adm/roles'],       my $showcoursecat =
  'add_entries' => \%add_entries,          &Apache::loncommon::designparm('login.coursecatalog',$domain);
  'only_body'   => 1,}));      my $shownewuserlink =
           &Apache::loncommon::designparm('login.newuser',$domain);
 # ----------------------------------------------------------------------- Texts      my $showhelpdesk =
           &Apache::loncommon::designparm('login.helpdesk',$domain);
 my %lt=&Apache::lonlocal::texthash(      my $now=time;
           'un'       => 'Username',      my $js = (<<ENDSCRIPT);
           'pw'       => 'Password',  
           'dom'      => 'Domain',  <script type="text/javascript" language="JavaScript">
           'perc'     => 'percent',  // <![CDATA[
           'load'     => 'Server Load',  function send()
           'userload' => 'User Load',  {
           'catalog'  => 'Course/Community Catalog',  this.document.server.elements.uname.value
           'log'      => 'Log in',  =this.document.client.elements.uname.value;
           'help'     => 'Log-in Help',  
           'serv'     => 'Server',  this.document.server.elements.udom.value
           'servadm'  => 'Server Administration',  =this.document.client.elements.udom.value;
           'helpdesk' => 'Contact Helpdesk',  
           'forgotpw' => 'Forgot password?',  uextkey=this.document.client.elements.uextkey.value;
           'newuser'  => 'New User?',  lextkey=this.document.client.elements.lextkey.value;
        );  initkeys();
 # -------------------------------------------------- Change password field name  
   this.document.server.elements.upass0.value
 my $forgotpw = &forgotpwdisplay(%lt);      =this.document.client.elements.upass$now.value.substr(0,15);
 $forgotpw .= '<br />' if $forgotpw;  this.document.server.elements.upass1.value
 my $loginhelp = &loginhelpdisplay($authdomain,%lt);      =this.document.client.elements.upass$now.value.substr(15,15);
 $loginhelp .= '<br />' if $loginhelp;  this.document.server.elements.upass2.value
       =this.document.client.elements.upass$now.value.substr(30,15);
 # ---------------------------------------------------- Serve out DES JavaScript  
 {  if(this.document.server.action.substr(0,5) === 'http:'){
 my $jsh=Apache::File->new($include."/londes.js");      for (var idx in [1,2,3]){
 $r->print(<$jsh>);          this.document.server.elements['upass' + idx].value =
 }              crypted(this.document.server.elements['upass' + idx].value);
 # ---------------------------------------------------------- Serve rest of page      }
   }
 $r->print(  
     '<div class="LC_Box"'  this.document.client.elements.uname.value='';
    .' style="margin:0 auto; padding:10px; width:90%; height: auto; background-color:#FFFFFF;">'  this.document.client.elements.upass$now.value='';
 );  
   this.document.server.submit();
 #  return false;
 #  If the loadbalancing yielded just http:// because perhaps there's no loadbalancing?  }
 #  then just us a relative link to authenticate:  
 #  function enableInput() {
       this.document.client.elements.upass$now.removeAttribute("readOnly");
 $r->print(<<ENDSERVERFORM);      this.document.client.elements.uname.removeAttribute("readOnly");
 <form name="server" action="/adm/authenticate" method="post" target="_top">      this.document.client.elements.udom.removeAttribute("readOnly");
    <input type="hidden" name="logtoken" value="$logtoken" />      return;
    <input type="hidden" name="serverid" value="$lonhost" />  }
    <input type="hidden" name="uname" value="" />  
    <input type="hidden" name="upass0" value="" />  // ]]>
    <input type="hidden" name="upass1" value="" />  </script>
    <input type="hidden" name="upass2" value="" />  
    <input type="hidden" name="udom" value="" />  ENDSCRIPT
    <input type="hidden" name="localpath" value="$env{'form.localpath'}" />  
    <input type="hidden" name="localres" value="$env{'form.localres'}" />  # --------------------------------------------------- Print login screen header
   </form>  
 ENDSERVERFORM      my %add_entries = (
 my $coursecatalog;         bgcolor      => "$mainbg",
 if (($showcoursecat eq '') || ($showcoursecat)) {         text         => "$font",
     $coursecatalog = &coursecatalog_link($lt{'catalog'}).'<br />';         link         => "$link",
 }         vlink        => "$vlink",
 my $newuserlink;         alink        => "$alink",
 if ($shownewuserlink) {                 onload       => 'javascript:enableInput();',);
     $newuserlink = &newuser_link($lt{'newuser'}).'<br />';  
 }      my %defaultdomconf = &Apache::loncommon::get_domainconf($defdom);
 my $logintitle =      my $headextra = $defaultdomconf{$defdom.'.login.headtag_'.$lonhost};
     '<h2 class="LC_hcell"'      my $headextra_exempt = $defaultdomconf{$domain.'.login.headtag_exempt_'.$lonhost};
    .' style="background:'.$loginbox_header_bgcol.';'      if ($headextra) {
    .' color:'.$loginbox_header_textcol.'">'          my $omitextra;
    .$lt{'log'}          if ($headextra_exempt ne '') {
    .'</h2>';              my @exempt = split(',',$headextra_exempt);
               my $ip = $ENV{'REMOTE_ADDR'};
 my $noscript_warning='<noscript><span class="LC_warning"><b>'              if (grep(/^\Q$ip\E$/,@exempt)) {
                      .&mt('Use of LON-CAPA requires Javascript to be enabled in your web browser.')                  $omitextra = 1;
                     .'</b></span></noscript>';              }
 my $helpdeskscript;          }
 my $contactblock = &contactdisplay(\%lt,$servadm,$showadminmail,          unless ($omitextra) {
                                    $authdomain,\$helpdeskscript);              my $confname = $defdom.'-domainconfig';
               if ($headextra =~ m{^\Q/res/$defdom/$confname/login/headtag/$lonhost/\E}) {
 my $loginform=(<<LFORM);                  my $extra = &Apache::lonnet::getfile(&Apache::lonnet::filelocation("",$headextra));
 <form name="client" action="" onsubmit="return(send())">                  unless ($extra eq '-1') {
   <input type="hidden" name="lextkey" value="$lextkey" />                      $js .= "\n".$extra."\n";
   <input type="hidden" name="uextkey" value="$uextkey" />                  }
   <b><label for="uname">$lt{'un'}</label>:</b><br />              }
   <input type="text" name="uname" id="uname" size="15" value="$authusername" readonly="readonly" /><br />          }
   <b><label for="upass$now">$lt{'pw'}</label>:</b><br />      }
   <input type="password" name="upass$now" id="upass$now" size="15" readonly="readonly" /><br />  
   <b><label for="udom">$lt{'dom'}</label>:</b><br />      $r->print(&Apache::loncommon::start_page('The LearningOnline Network with CAPA Login',$js,
   <input type="text" name="udom" id="udom" size="15" value="$authdomain" readonly="readonly" /><br />         { 'redirect'       => [$expire,'/adm/roles'],
   <input type="submit" value="$lt{'log'}" />   'add_entries' => \%add_entries,
 </form>   'only_body'   => 1,}));
 LFORM  
   # ----------------------------------------------------------------------- Texts
     if ($showbanner) {  
         $r->print(<<HEADER);      my %lt=&Apache::lonlocal::texthash(
 <!-- The LON-CAPA Header -->            'un'       => 'Username',
 <div style="background:$pgbg;margin:0;width:100%;">            'pw'       => 'Password',
   <img src="$img" border="0" alt="The Learning Online Network with CAPA" />            'dom'      => 'Domain',
 </div>            'perc'     => 'percent',
 HEADER            'load'     => 'Server Load',
     }            'userload' => 'User Load',
     $r->print(<<ENDTOP);            'catalog'  => 'Course/Community Catalog',
 <div style="float:left;">            'log'      => 'Log in',
 <div class="LC_Box" style="background:$loginbox_bg;">            'help'     => 'Log-in Help',
   $logintitle            'serv'     => 'Server',
   $loginform            'servadm'  => 'Server Administration',
   $noscript_warning            'helpdesk' => 'Contact Helpdesk',
 </div>            'forgotpw' => 'Forgot password?',
               'newuser'  => 'New User?',
 <div class="LC_Box" style="padding-top: 10px;">         );
   $loginhelp  # -------------------------------------------------- Change password field name
   $forgotpw  
   $contactblock      my $forgotpw = &forgotpwdisplay(%lt);
   $newuserlink      $forgotpw .= '<br />' if $forgotpw;
   $coursecatalog      my $loginhelp = &Apache::lonauth::loginhelpdisplay($authdomain);
 </div>      if ($loginhelp) {
 </div>          $loginhelp = '<a href="'.$loginhelp.'">'.$lt{'help'}.'</a><br />';
       }
 <div>  
 ENDTOP  # ---------------------------------------------------- Serve out DES JavaScript
     if ($showmainlogo) {      {
         $r->print(' <img src="'.$logo.'" alt="" />'."\n");      my $jsh=Apache::File->new($include."/londes.js");
     }      $r->print(<$jsh>);
 $r->print(<<ENDTOP);      }
 $announcements  # ---------------------------------------------------------- Serve rest of page
 $domainlogo  
 </div>      $r->print(
 <hr style="clear:both;" />      '<div class="LC_Box"'
 ENDTOP     .' style="margin:0 auto; padding:10px; width:90%; height: auto; background-color:#FFFFFF;">'
   );
 $r->print(<<ENDDOCUMENT);  
      <table border="0" cellspacing="0" cellpadding="0">      $r->print(<<ENDSERVERFORM);
       <tr>  <form name="server" action="/adm/authenticate" method="post" target="_top">
        <td  align="left" valign="top">     <input type="hidden" name="logtoken" value="$logtoken" />
         <small><b>$lt{'dom'}:&nbsp;</b></small>     <input type="hidden" name="serverid" value="$lonhost" />
        </td>     <input type="hidden" name="uname" value="" />
        <td  align="left" valign="top">     <input type="hidden" name="upass0" value="" />
         <small><tt>&nbsp;$domain</tt></small>     <input type="hidden" name="upass1" value="" />
        </td>     <input type="hidden" name="upass2" value="" />
       </tr>     <input type="hidden" name="udom" value="" />
       <tr>     <input type="hidden" name="localpath" value="$env{'form.localpath'}" />
        <td  align="left" valign="top">     <input type="hidden" name="localres" value="$env{'form.localres'}" />
         <small><b>$lt{'serv'}:&nbsp;</b></small>    </form>
        </td>  ENDSERVERFORM
        <td align="left" valign="top">      my $coursecatalog;
         <small><tt>&nbsp;$lonhost ($role)</tt></small>      if (($showcoursecat eq '') || ($showcoursecat)) {
        </td>          $coursecatalog = &coursecatalog_link($lt{'catalog'}).'<br />';
       </tr>      }
       <tr>      my $newuserlink;
        <td align="left" valign="top">      if ($shownewuserlink) {
         <small><b>$lt{'load'}:&nbsp;</b></small>          $newuserlink = &newuser_link($lt{'newuser'}).'<br />';
        </td>      }
        <td align="left" valign="top">      my $logintitle =
         <small><tt>&nbsp;$loadpercent $lt{'perc'}</tt></small>          '<h2 class="LC_hcell"'
        </td>         .' style="background:'.$loginbox_header_bgcol.';'
       </tr>         .' color:'.$loginbox_header_textcol.'">'
       <tr>         .$lt{'log'}
        <td align="left" valign="top">         .'</h2>';
         <small><b>$lt{'userload'}:&nbsp;</b></small>  
        </td>      my $noscript_warning='<noscript><span class="LC_warning"><b>'
        <td align="left" valign="top">                          .&mt('Use of LON-CAPA requires Javascript to be enabled in your web browser.')
         <small><tt>&nbsp;$userloadpercent $lt{'perc'}</tt></small>                          .'</b></span></noscript>';
        </td>      my $helpdeskscript;
       </tr>      my $contactblock = &contactdisplay(\%lt,$servadm,$showadminmail,
       <tr>                                         $authdomain,\$helpdeskscript,
        <td colspan="2" align="left">                                         $showhelpdesk,\@possdoms);
         <small>$version</small>  
        </td>      my $mobileargs;
       </tr>      if ($clientmobile) {
      </table>          $mobileargs = 'autocapitalize="off" autocorrect="off"';
  </div>      }
       my $loginform=(<<LFORM);
 <script type="text/javascript">  <form name="client" action="" onsubmit="return(send())">
 // <![CDATA[    <input type="hidden" name="lextkey" value="$lextkey" />
 // the if prevents the script error if the browser can not handle this    <input type="hidden" name="uextkey" value="$uextkey" />
 if ( document.client.uname ) { document.client.uname.focus(); }    <b><label for="uname">$lt{'un'}</label>:</b><br />
 // ]]>    <input type="text" name="uname" id="uname" size="15" value="$authusername" readonly="readonly" $mobileargs /><br />
 </script>    <b><label for="upass$now">$lt{'pw'}</label>:</b><br />
 $helpdeskscript    <input type="password" name="upass$now" id="upass$now" size="15" readonly="readonly" /><br />
     <b><label for="udom">$lt{'dom'}</label>:</b><br />
 ENDDOCUMENT    <input type="text" name="udom" id="udom" size="15" value="$authdomain" readonly="readonly" $mobileargs /><br />
     my %endargs = ( 'noredirectlink' => 1, );    <input type="submit" value="$lt{'log'}" />
     $r->print(&Apache::loncommon::end_page(\%endargs));  </form>
     return OK;  LFORM
 }  
       if ($showbanner) {
 sub check_loginvia {          $r->print(<<HEADER);
     my ($domain,$lonhost) = @_;  <!-- The LON-CAPA Header -->
     if ($domain eq '' || $lonhost eq '') {  <div style="background:$pgbg;margin:0;width:100%;">
         return;    <img src="$img" border="0" alt="The Learning Online Network with CAPA" />
     }  </div>
     my %domconfhash = &Apache::loncommon::get_domainconf($domain);  HEADER
     my $loginvia = $domconfhash{$domain.'.login.loginvia_'.$lonhost};      }
     my $loginvia_exempt = $domconfhash{$domain.'.login.loginvia_exempt_'.$lonhost};      $r->print(<<ENDTOP);
     my $output;  <div style="float:left;margin-top:0;">
     if ($loginvia ne '') {  <div class="LC_Box" style="background:$loginbox_bg;">
         my $noredirect;    $logintitle
         my $ip = $ENV{'REMOTE_ADDR'};    $loginform
         if ($ip eq '127.0.0.1') {    $noscript_warning
             $noredirect = 1;  </div>
         } else {   
             if ($loginvia_exempt ne '') {  <div class="LC_Box" style="padding-top: 10px;">
                 my @exempt = split(',',$loginvia_exempt);    $loginhelp
                 if (grep(/^\Q$ip\E$/,@exempt)) {    $forgotpw
                     $noredirect = 1;    $contactblock
                 }    $newuserlink
             }    $coursecatalog
         }  </div>
         unless ($noredirect) {  </div>
             my ($newhost,$path);  
             if ($loginvia =~ /:/) {  <div>
                 ($newhost,$path) = split(':',$loginvia);  ENDTOP
             } else {      if ($showmainlogo) {
                 $newhost = $loginvia;          $r->print(' <img src="'.$logo.'" alt="" />'."\n");
             }      }
             if ($newhost ne $lonhost) {  $r->print(<<ENDTOP);
                 if (&Apache::lonnet::hostname($newhost) ne '') {  $announcements
                     $output = &redirect_page($newhost,$path);  </div>
                 }  <hr style="clear:both;" />
             }  ENDTOP
         }      my ($domainrow,$serverrow,$loadrow,$userloadrow,$versionrow);
     }      $domainrow = <<"END";
     return $output;        <tr>
 }         <td  align="left" valign="top">
           <small><b>$lt{'dom'}:&nbsp;</b></small>
 sub redirect_page {         </td>
     my ($desthost,$path) = @_;         <td  align="left" valign="top">
     my $protocol = $Apache::lonnet::protocol{$desthost};          <small><tt>&nbsp;$domain</tt></small>
     $protocol = 'http' if ($protocol ne 'https');         </td>
     unless ($path =~ m{^/}) {        </tr>
         $path = '/'.$path;  END
     }      $serverrow = <<"END";
     my $url = $protocol.'://'.&Apache::lonnet::hostname($desthost).$path;        <tr>
     if ($env{'form.firsturl'} ne '') {         <td  align="left" valign="top">
         $url .='?firsturl='.$env{'form.firsturl'};          <small><b>$lt{'serv'}:&nbsp;</b></small>
     }         </td>
     my $start_page = &Apache::loncommon::start_page('Switching Server ...',undef,         <td align="left" valign="top">
                                                     {'redirect' => [0,$url],});          <small><tt>&nbsp;$lonhost ($role)</tt></small>
     my $end_page   = &Apache::loncommon::end_page();         </td>
     return $start_page.$end_page;        </tr>
 }  END
       if ($loadlim) {
 sub contactdisplay {          $loadrow = <<"END";
     my ($lt,$servadm,$showadminmail,$authdomain,$helpdeskscript) = @_;        <tr>
     my $contactblock;         <td align="left" valign="top">
     my $showhelpdesk = 0;          <small><b>$lt{'load'}:&nbsp;</b></small>
     my $requestmail = $Apache::lonnet::perlvar{'lonSupportEMail'};         </td>
     if ($requestmail =~ m/^[^\@]+\@[^\@]+$/) {         <td align="left" valign="top">
         $showhelpdesk = 1;          <small><tt>&nbsp;$loadpercent $lt{'perc'}</tt></small>
     }         </td>
     if ($servadm && $showadminmail) {        </tr>
         $contactblock .= $$lt{'servadm'}.':<br />'.  END
                          '<tt>'.$servadm.'</tt><br />';      }
     }      if ($uloadlim) {
     if ($showhelpdesk) {          $userloadrow = <<"END";
         $contactblock .= '<a href="javascript:helpdesk()">'.$lt->{'helpdesk'}.'</a><br />';        <tr>
         my $thisurl = &escape('/adm/login');         <td align="left" valign="top">
         $$helpdeskscript = <<"ENDSCRIPT";          <small><b>$lt{'userload'}:&nbsp;</b></small>
 <script type="text/javascript">         </td>
 // <![CDATA[         <td align="left" valign="top">
 function helpdesk() {          <small><tt>&nbsp;$userloadpercent $lt{'perc'}</tt></small>
     var codedom = document.client.udom.value;         </td>
     if (codedom == '') {        </tr>
         codedom = "$authdomain";  END
     }      }
     var querystr = "origurl=$thisurl&codedom="+codedom;      if (($version ne '') && ($version ne '<!-- VERSION -->')) {
     document.location.href = "/adm/helpdesk?"+querystr;          $versionrow = <<"END";
     return;        <tr>
 }         <td colspan="2" align="left">
 // ]]>          <small>$version</small>
 </script>         </td>
 ENDSCRIPT        </tr>
     }  END
     return $contactblock;      }
 }  
       $r->print(<<ENDDOCUMENT);
 sub forgotpwdisplay {      <div style="float: left;">
     my (%lt) = @_;       <table border="0" cellspacing="0" cellpadding="0">
     my $prompt_for_resetpw = 1;   $domainrow
     if ($prompt_for_resetpw) {  $serverrow
         return '<a href="/adm/resetpw">'.$lt{'forgotpw'}.'</a>';  $loadrow    
     }  $userloadrow
     return;  $versionrow
 }       </table>
       </div>
 sub loginhelpdisplay {      <div style="float: right;">
     my ($authdomain,%lt) = @_;      $domainlogo
     my $login_help = 1;      </div>
     if ($login_help) {      <br style="clear:both;" />
         my $dom = $authdomain;   </div>
         if ($dom eq '') {  
             $dom = &Apache::lonnet::default_login_domain();  <script type="text/javascript">
         }  // <![CDATA[
         my %helpconfig = &Apache::lonnet::get_dom('configuration',['helpsettings'],$dom);  // the if prevents the script error if the browser can not handle this
         my $loginhelp_url = $helpconfig{'helpsettings'}{'loginhelpurl'};  if ( document.client.uname ) { document.client.uname.focus(); }
         if ($loginhelp_url ne '') {  // ]]>
             return '<a href="'.$loginhelp_url.'">'.$lt{'help'}.'</a>';  </script>
         } else {  $helpdeskscript
             return '<a href="/adm/loginproblems.html">'.$lt{'help'}.'</a>';  
         }  ENDDOCUMENT
     }      my %endargs = ( 'noredirectlink' => 1, );
     return;      $r->print(&Apache::loncommon::end_page(\%endargs));
 }      return OK;
   }
 sub coursecatalog_link {  
     my ($linkname) = @_;  sub check_loginvia {
     return <<"END";      my ($domain,$lonhost) = @_;
       <a href="/adm/coursecatalog">$linkname</a>      if ($domain eq '' || $lonhost eq '') {
 END          return;
 }      }
       my %domconfhash = &Apache::loncommon::get_domainconf($domain);
 sub newuser_link {      my $loginvia = $domconfhash{$domain.'.login.loginvia_'.$lonhost};
     my ($linkname) = @_;      my $loginvia_exempt = $domconfhash{$domain.'.login.loginvia_exempt_'.$lonhost};
     return '<a href="/adm/createaccount">'.$linkname.'</a>';      my $output;
 }      if ($loginvia ne '') {
           my $noredirect;
 1;          my $ip = $ENV{'REMOTE_ADDR'};
 __END__          if ($ip eq '127.0.0.1') {
               $noredirect = 1;
           } else {
               if ($loginvia_exempt ne '') {
                   my @exempt = split(',',$loginvia_exempt);
                   if (grep(/^\Q$ip\E$/,@exempt)) {
                       $noredirect = 1;
                   }
               }
           }
           unless ($noredirect) {
               my ($newhost,$path);
               if ($loginvia =~ /:/) {
                   ($newhost,$path) = split(':',$loginvia);
               } else {
                   $newhost = $loginvia;
               }
               if ($newhost ne $lonhost) {
                   if (&Apache::lonnet::hostname($newhost) ne '') {
                       $output = &redirect_page($newhost,$path);
                   }
               }
           }
       }
       return $output;
   }
   
   sub redirect_page {
       my ($desthost,$path) = @_;
       my $protocol = $Apache::lonnet::protocol{$desthost};
       $protocol = 'http' if ($protocol ne 'https');
       unless ($path =~ m{^/}) {
           $path = '/'.$path;
       }
       my $url = $protocol.'://'.&Apache::lonnet::hostname($desthost).$path;
       if ($env{'form.firsturl'} ne '') {
           $url .='?firsturl='.$env{'form.firsturl'};
       }
       my $start_page = &Apache::loncommon::start_page('Switching Server ...',undef,
                                                       {'redirect' => [0,$url],});
       my $end_page   = &Apache::loncommon::end_page();
       return $start_page.$end_page;
   }
   
   sub contactdisplay {
       my ($lt,$servadm,$showadminmail,$authdomain,$helpdeskscript,$showhelpdesk,
           $possdoms) = @_;
       my $contactblock;
       my $origmail;
       if (ref($possdoms) eq 'ARRAY') {
           if (grep(/^\Q$authdomain\E$/,@{$possdoms})) {
               $origmail = $Apache::lonnet::perlvar{'lonSupportEMail'};
           }
       }
       my $requestmail =
           &Apache::loncommon::build_recipient_list(undef,'helpdeskmail',
                                                    $authdomain,$origmail);
       unless ($showhelpdesk eq '0') {
           if ($requestmail =~ m/[^\@]+\@[^\@]+/) {
               $showhelpdesk = 1;
           } else {
               $showhelpdesk = 0;
           }
       }
       if ($servadm && $showadminmail) {
           $contactblock .= $$lt{'servadm'}.':<br />'.
                            '<tt>'.$servadm.'</tt><br />';
       }
       if ($showhelpdesk) {
           $contactblock .= '<a href="javascript:helpdesk()">'.$lt->{'helpdesk'}.'</a><br />';
           my $thisurl = &escape('/adm/login');
           $$helpdeskscript = <<"ENDSCRIPT";
   <script type="text/javascript">
   // <![CDATA[
   function helpdesk() {
       var possdom = document.client.udom.value;
       var codedom = possdom.replace( new RegExp("[^A-Za-z0-9.\\-]","g"),'');
       if (codedom == '') {
           codedom = "$authdomain";
       }
       var querystr = "origurl=$thisurl&codedom="+codedom;
       document.location.href = "/adm/helpdesk?"+querystr;
       return;
   }
   // ]]>
   </script>
   ENDSCRIPT
       }
       return $contactblock;
   }
   
   sub forgotpwdisplay {
       my (%lt) = @_;
       my $prompt_for_resetpw = 1;
       if ($prompt_for_resetpw) {
           return '<a href="/adm/resetpw">'.$lt{'forgotpw'}.'</a>';
       }
       return;
   }
   
   sub coursecatalog_link {
       my ($linkname) = @_;
       return <<"END";
         <a href="/adm/coursecatalog">$linkname</a>
   END
   }
   
   sub newuser_link {
       my ($linkname) = @_;
       return '<a href="/adm/createaccount">'.$linkname.'</a>';
   }
   
   1;
   __END__

Removed from v.1.140  
changed lines
  Added in v.1.162


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