--- loncom/build/make_domain_coordinator.pl 2011/04/27 20:42:58 1.19 +++ loncom/build/make_domain_coordinator.pl 2011/11/17 14:29:51 1.20 @@ -11,7 +11,7 @@ make_domain_coordinator.pl - Make a doma # 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 Term::ReadKey; use Apache::lonnet; use Apache::lonlocal; use DBI; +use strict; =pod @@ -122,7 +123,6 @@ coordinator. =cut -my ($username,$domain)=(@ARGV); my $lang = &Apache::lonlocal::choose_language(); &Apache::lonlocal::get_language_handle(undef,$lang); print"\n"; @@ -191,7 +191,7 @@ unless (($go_on eq '') || ($go_on =~ /^\ } 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 @@ while ((!$got_passwd) && ($trial < $maxt 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 @@ if (-d "/home/$username") { # 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.').