Diff for /loncom/lond between versions 1.243 and 1.245

version 1.243, 2004/08/27 18:34:31 version 1.245, 2004/08/29 04:12:18
Line 1299  sub push_file_handler { Line 1299  sub push_file_handler {
 # Side Effects:  # Side Effects:
 #   The reply is written to  $client.  #   The reply is written to  $client.
 #  #
   
 sub du_handler {  sub du_handler {
     my ($cmd, $ududir, $client) = @_;      my ($cmd, $ududir, $client) = @_;
     my $userinput = "$cmd:$ududir";      if ($ududir=~/\.\./ || $ududir!~m|^/home/httpd/|) {
     my $obs;   &Failure($client,"refused\n","$cmd:$ududir");
     my $rights;   return 1;
     my $uduout='';      }
     my $udufn;      my $duout = `du -ks $ududir 2>/dev/null`;
     print $client "from lond not yet\n";      $duout=~s/[^\d]//g; #preserve only the numbers
       &Reply($client,"$duout\n","$cmd:$ududir");
     return 1;      return 1;
 }  }
 &register_handler("du", \&du_handler, 0, 1, 0);  &register_handler("du", \&du_handler, 0, 1, 0);
   
   
   
 #  #
 #   ls  - list the contents of a directory.  For each file in the  #   ls  - list the contents of a directory.  For each file in the
 #    selected directory the filename followed by the full output of  #    selected directory the filename followed by the full output of

Removed from v.1.243  
changed lines
  Added in v.1.245


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