Diff for /loncom/lond between versions 1.54 and 1.55

version 1.54, 2001/11/15 23:33:57 version 1.55, 2001/11/16 06:19:33
Line 642  sub make_new_child { Line 642  sub make_new_child {
      } else {       } else {
        print $client "refused\n";         print $client "refused\n";
      }       }
   # -------------------------------------------------------------- changeuserauth
                      } elsif ($userinput =~ /^changeuserauth/) {
        if ($wasenc==1) {
                          my 
                          ($cmd,$udom,$uname,$umode,$npass)=split(/:/,$userinput);
                          chomp($npass);
                          $npass=&unescape($npass);
                          my $proname=propath($udom,$uname);
                          my $passfilename="$proname/passwd";
          if ($udom ne $perlvar{'lonDefDomain'}) {
                              print $client "not_right_domain\n";
                          } else {
      if ($umode eq 'krb4') {
                                  { 
      my $pf = IO::File->new(">$passfilename");
      print $pf "krb4:$npass\n"; 
                                  }             
                                  print $client "ok\n";
      } elsif ($umode eq 'internal') {
          my $salt=time;
                                  $salt=substr($salt,6,2);
          my $ncpass=crypt($npass,$salt);
                                  { 
      my $pf = IO::File->new(">$passfilename");
      print $pf "internal:$ncpass\n"; 
                                  }
                                  print $client "ok\n";
      } elsif ($umode eq 'localauth') {
          {
      my $pf = IO::File->new(">$passfilename");
      print $pf "localauth:$npass\n";
          }
          print $client "ok\n";
      } elsif ($umode eq 'unix') {
          {
      my $execpath="$perlvar{'lonDaemons'}/".
          "lcuseradd";
      {
          my $se = IO::File->new("|$execpath");
          print $se "$uname\n";
          print $se "$npass\n";
          print $se "$npass\n";
      }
      my $pf = IO::File->new(">$passfilename");
      print $pf "unix:\n"; 
          }
          print $client "ok\n";
      } elsif ($umode eq 'none') {
                                  { 
      my $pf = IO::File->new(">$passfilename");
      print $pf "none:\n"; 
                                  }             
                                  print $client "ok\n";
      } else {
                                  print $client "auth_mode_error\n";
      }  
                          }
        } else {
          print $client "refused\n";
        }
 # ------------------------------------------------------------------------ home  # ------------------------------------------------------------------------ home
                    } elsif ($userinput =~ /^home/) {                     } elsif ($userinput =~ /^home/) {
                        my ($cmd,$udom,$uname)=split(/:/,$userinput);                         my ($cmd,$udom,$uname)=split(/:/,$userinput);

Removed from v.1.54  
changed lines
  Added in v.1.55


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