Diff for /loncom/Attic/lcuseradd between versions 1.27 and 1.28

version 1.27, 2004/08/05 20:47:27 version 1.28, 2004/08/06 10:29:37
Line 147  unless (&try_to_lock("/tmp/lock_lcpasswd Line 147  unless (&try_to_lock("/tmp/lock_lcpasswd
 my @input;  my @input;
 if (@ARGV>=3) {  if (@ARGV>=3) {
     @input=@ARGV;      @input=@ARGV;
 }  } elsif (@ARGV) {
 elsif (@ARGV) {  
     print("Error. This program needs at least 3 command-line arguments (username, ".      print("Error. This program needs at least 3 command-line arguments (username, ".
   "password 1, password 2 [errorfile]).\n") unless $noprint;    "password 1, password 2 [errorfile]).\n") unless $noprint;
     unlink('/tmp/lock_lcpasswd');      unlink('/tmp/lock_lcpasswd');
     &Exit(2);      &Exit(2);
 }  } else {
 else {  
     @input=<>;      @input=<>;
     if (@input < 3) {      if (@input < 3) {
  print("Error. At least three lines should be entered into standard input.\n")   print("Error. At least three lines should be entered into standard input.\n")
Line 208  if($error_file) { Line 206  if($error_file) {
     Exit(14);      Exit(14);
  }   }
   
     }       } else {
     else {  
  $error_file="";   $error_file="";
  print "Invalid error filename\n" unless $noprint;   print "Invalid error filename\n" unless $noprint;
  Exit(14);   Exit(14);
Line 334  sub enable_root_capability { Line 331  sub enable_root_capability {
     if ($wwwid==$>) {      if ($wwwid==$>) {
  ($<,$>)=($>,0);   ($<,$>)=($>,0);
  ($(,$))=($),0);   ($(,$))=($),0);
     }      } else {
     else {  
  # root capability is already enabled   # root capability is already enabled
     }      }
     return $>;      return $>;
Line 346  sub disable_root_capability { Line 342  sub disable_root_capability {
     if ($wwwid==$<) {      if ($wwwid==$<) {
  ($<,$>)=($>,$<);   ($<,$>)=($>,$<);
  ($(,$))=($),$();   ($(,$))=($),$();
     }      } else {
     else {  
  # root capability is already disabled   # root capability is already disabled
     }      }
 }  }
Line 376  sub try_to_lock { Line 371  sub try_to_lock {
     }      }
     sleep 3;      sleep 3;
     $lastpid=$currentpid;      $lastpid=$currentpid;
  }   } else {
  else {  
     last;      last;
  }   }
  if ($_==10) {   if ($_==10) {

Removed from v.1.27  
changed lines
  Added in v.1.28


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