Diff for /loncom/lond between versions 1.255 and 1.260

version 1.255, 2004/09/14 11:45:04 version 1.260, 2004/10/11 10:58:28
Line 2091  sub mkdir_user_file_handler { Line 2091  sub mkdir_user_file_handler {
  if (-e $udir) {   if (-e $udir) {
     my $newdir=$udir.'/userfiles/'.$ufile;      my $newdir=$udir.'/userfiles/'.$ufile;
     if (!-e $newdir) {      if (!-e $newdir) {
  mkdir($newdir);   my @parts=split('/',$newdir);
    my $path;
    foreach my $part (@parts) {
       $path .= '/'.$part;
       if (!-e $path) {
    mkdir($path,0770);
       }
    }
  if (!-e $newdir) {   if (!-e $newdir) {
     &Failure($client, "failed\n", "$cmd:$tail");      &Failure($client, "failed\n", "$cmd:$tail");
  } else {   } else {
Line 2441  sub roles_put_handler { Line 2448  sub roles_put_handler {
  my @pairs=split(/\&/,$what);   my @pairs=split(/\&/,$what);
  foreach my $pair (@pairs) {   foreach my $pair (@pairs) {
     my ($key,$value)=split(/=/,$pair);      my ($key,$value)=split(/=/,$pair);
       my $pass_entry = &get_auth_type($udom, $uname);
       my ($auth_type,$pwd)  = split(/:/, $pass_entry);
       $auth_type = $auth_type.":";
     &manage_permissions($key, $udom, $uname,      &manage_permissions($key, $udom, $uname,
        &get_auth_type( $udom, $uname));         $auth_type);
     $hashref->{$key}=$value;      $hashref->{$key}=$value;
  }   }
  if (untie($hashref)) {   if (untie($hashref)) {
Line 3818  sub get_institutional_code_format_handle Line 3828  sub get_institutional_code_format_handle
   0,1,0);    0,1,0);
   
 #  #
 #    Portofolio directory list:  
 #  
 # Parameters:  
 #    cmd     - Command request that got us called.  
 #    tail    - the remainder of the command line.  In this case this is a colon  
 #              separated list containing the username and domain.  
 #              used to locate their portfolio.  
 #    client  - Socket openon the client.  
 # Returns:  
 #    1 indicating processing should continue.  
 #  
 sub list_portfolio {  
     my ($cmd, $tail, $client) = @_;  
     my ($uname, $udom)        = split(/:/, $tail);  
     my $userinput             = "$cmd:$tail";  
       
     my $udir=propath($udom,$uname).'/userfiles/portfolio';  
     my $dirLine='';  
     my $dirContents='';  
     if (opendir(LSDIR,$udir.'/')){  
  while ($dirLine = readdir(LSDIR)){  
     $dirContents = $dirContents.$dirLine.'<br />';  
  }  
     } else {  
  $dirContents = "No directory found\n";  
     }  
     &Reply( $client, $dirContents."\n", $userinput);  
       
   
   
     return 1;  
 }  
 &register_handler("portls", \&list_portfolio, 0,1,0);  
   
 #  
 #  #
 #  #
 #  #
Line 5068  sub get_auth_type Line 5043  sub get_auth_type
  Debug("Password info = $realpassword\n");   Debug("Password info = $realpassword\n");
  my ($authtype, $contentpwd) = split(/:/, $realpassword);   my ($authtype, $contentpwd) = split(/:/, $realpassword);
  Debug("Authtype = $authtype, content = $contentpwd\n");   Debug("Authtype = $authtype, content = $contentpwd\n");
  my $availinfo = '';   return "$authtype:$contentpwd";     
  if($authtype eq 'krb4' or $authtype eq 'krb5') {  
     $availinfo = $contentpwd;  
  }  
   
  return "$authtype:$availinfo";  
     } else {      } else {
  Debug("Returning nouser");   Debug("Returning nouser");
  return "nouser";   return "nouser";

Removed from v.1.255  
changed lines
  Added in v.1.260


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