[LON-CAPA-cvs] cvs: loncom / lond

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Mon, 12 Nov 2007 22:54:43 -0000


raeburn		Mon Nov 12 17:54:43 2007 EDT

  Modified files:              
    /loncom	lond 
  Log:
  Changes in lond rev 1.387 resulted in some cases of double linefeeds, causing out-of sync behavior for some requests.  
  
  
Index: loncom/lond
diff -u loncom/lond:1.389 loncom/lond:1.390
--- loncom/lond:1.389	Fri Nov  9 22:38:28 2007
+++ loncom/lond	Mon Nov 12 17:54:42 2007
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # lond "LON Daemon" Server (port "LOND" 5663)
 #
-# $Id: lond,v 1.389 2007/11/10 03:38:28 raeburn Exp $
+# $Id: lond,v 1.390 2007/11/12 22:54:42 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -59,7 +59,7 @@
 my $status='';
 my $lastlog='';
 
-my $VERSION='$Revision: 1.389 $'; #' stupid emacs
+my $VERSION='$Revision: 1.390 $'; #' stupid emacs
 my $remoteVERSION;
 my $currenthostid="default";
 my $currentdomainid;
@@ -1666,7 +1666,7 @@
 	    }
 	    unless ($fperror) {
 		my $result=&make_passwd_file($uname, $umode,$npass, $passfilename);
-		&Reply($client, $result, $userinput);     #BUGBUG - could be fail
+		&Reply($client,\$result, $userinput);     #BUGBUG - could be fail
 	    } else {
 		&Failure($client, \$fperror, $userinput);
 	    }
@@ -1735,7 +1735,7 @@
 		my $result = &change_unix_password($uname, $npass);
 		&logthis("Result of password change for $uname: ".$result);
 		if ($result eq "ok") {
-		    &Reply($client, \$result)
+		    &Reply($client, \$result);
 		} else {
 		    &Failure($client, \$result);
 		}
@@ -2582,6 +2582,7 @@
     my ($udom,$uname,$namespace,$what) = split(/:/,$tail);
     chomp($what);
 
+
     my $replystring = read_profile($udom, $uname, $namespace, $what);
     my ($first) = split(/:/,$replystring);
     if($first ne "error") {
@@ -6342,7 +6343,7 @@
 
 sub make_passwd_file {
     my ($uname, $umode,$npass,$passfilename)=@_;
-    my $result="ok\n";
+    my $result="ok";
     if ($umode eq 'krb4' or $umode eq 'krb5') {
 	{
 	    my $pf = IO::File->new(">$passfilename");
@@ -6410,7 +6411,7 @@
 		if($useraddok > 0) {
 		    my $error_text = &lcuseraddstrerror($useraddok);
 		    &logthis("Failed lcuseradd: $error_text");
-		    $result = "lcuseradd_failed:$error_text\n";
+		    $result = "lcuseradd_failed:$error_text";
 		}  else {
 		    my $pf = IO::File->new(">$passfilename");
 		    if($pf) {
@@ -6434,7 +6435,7 @@
 	    }
 	}
     } else {
-	$result="auth_mode_error\n";
+	$result="auth_mode_error";
     }
     return $result;
 }