[LON-CAPA-cvs] cvs: loncom /build make_domain_coordinator.pl

raeburn raeburn at source.lon-capa.org
Thu Nov 17 09:29:51 EST 2011


raeburn		Thu Nov 17 14:29:51 2011 EDT

  Modified files:              
    /loncom/build	make_domain_coordinator.pl 
  Log:
  - Add strict pragma.
  - Remove duplicate line.
  - Remove unwanted characters.
  
  
Index: loncom/build/make_domain_coordinator.pl
diff -u loncom/build/make_domain_coordinator.pl:1.19 loncom/build/make_domain_coordinator.pl:1.20
--- loncom/build/make_domain_coordinator.pl:1.19	Wed Apr 27 20:42:58 2011
+++ loncom/build/make_domain_coordinator.pl	Thu Nov 17 14:29:51 2011
@@ -11,7 +11,7 @@
 # The LearningOnline Network
 # make_domain_coordinator.pl - Make a domain coordinator on a system
 #
-# $Id: make_domain_coordinator.pl,v 1.19 2011/04/27 20:42:58 raeburn Exp $
+# $Id: make_domain_coordinator.pl,v 1.20 2011/11/17 14:29:51 raeburn Exp $
 #
 # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
 #
@@ -96,6 +96,7 @@
 use Apache::lonnet;
 use Apache::lonlocal;
 use DBI;
+use strict;
 
 =pod
 
@@ -122,7 +123,6 @@
 
 =cut
 
-my ($username,$domain)=(@ARGV);
 my $lang = &Apache::lonlocal::choose_language();
 &Apache::lonlocal::get_language_handle(undef,$lang);
 print"\n";
@@ -191,7 +191,7 @@
 }
 print "\n";
 
-my ($got_passwd,$firstpass,$secondpass);
+my ($got_passwd,$firstpass,$secondpass,$passwd);
 my $maxtries = 10;
 my $trial = 0;
 while ((!$got_passwd) && ($trial < $maxtries)) {
@@ -199,11 +199,11 @@
     if (length($firstpass) < 6) {
         print(&mt('Password too short.')."\n".
               &mt('Please choose a password with at least six characters.')."\n".
-i             &mt('Please try again.')."\n");
+              &mt('Please try again.')."\n");
     } elsif (length($firstpass) > 30) {
         print(&mt('Password too long.')."\n".
               &mt('Please choose a password with no more than thirty characters.')."\n".
-i             &mt('Please try again.')."\n");
+              &mt('Please try again.')."\n");
     } else {
         my $pbad=0;
         foreach (split(//,$passwd)) {if ((ord($_)<32)||(ord($_)>126)){$pbad=1;}}
@@ -352,7 +352,7 @@
 
 # Process password (taint-check, then pass to the UNIX passwd command).
 $username =~ s/\W//g; # an extra filter, just to be sure
-$pbad = 0;
+my $pbad = 0;
 foreach (split(//,$passwd)) {if ((ord($_)<32)||(ord($_)>126)){$pbad=1;}}
 if ($pbad) {
     print(&mt('Password must consist of standard ASCII characters.').




More information about the LON-CAPA-cvs mailing list