version 1.22, 2006/12/10 23:23:55
|
version 1.40, 2013/12/01 22:29:39
|
Line 60 else
|
Line 60 else
|
</file> |
</file> |
<file> |
<file> |
<target dist='default'>/var/lib/mysql/mysql.sock</target> |
<target dist='default'>/var/lib/mysql/mysql.sock</target> |
|
<target dist='suse11.2 suse11.3 suse11.4 suse12.1 suse12.2 suse12.3 suse13.1'>/var/run/mysql/mysql.sock</target> |
|
<target dist='debian5 debian6 ubuntu6 ubuntu8 ubuntu10 ubuntu12'>/var/run/mysqld/mysqld.sock</target> |
<perlscript mode='fg'> |
<perlscript mode='fg'> |
unless |
unless |
(-e '<TARGET />') # Does file exist? |
(-e '<TARGET />') # Does file exist? |
Line 111 else # It exists, so look at the file me
|
Line 113 else # It exists, so look at the file me
|
</file> |
</file> |
<file> |
<file> |
<target dist='default'>/etc/httpd/conf/loncapa.conf</target> |
<target dist='default'>/etc/httpd/conf/loncapa.conf</target> |
<target dist='sles10 suse10.1'>/etc/apache2/loncapa.conf</target> |
<target dist='sles10 sles11 suse10.1 suse10.2 suse10.3 suse11.1 suse11.2 suse11.3 suse11.4 suse12.1 suse12.2 suse12.3 suse13.1 debian5 debian6 ubuntu6 ubuntu8 ubuntu10 ubuntu12'>/etc/apache2/loncapa.conf</target> |
<perlscript mode='fg'> |
<perlscript mode='fg'> |
open IN, "<<TARGET />"; |
open IN, "<<TARGET />"; |
my $hbug=-1; |
my $hbug=-1; |
Line 120 while (<IN>) {
|
Line 122 while (<IN>) {
|
if (/PerlSetVar\s+lonHostID\s+(\S+)/) { |
if (/PerlSetVar\s+lonHostID\s+(\S+)/) { |
my $v=$1; |
my $v=$1; |
$hbug=0; |
$hbug=0; |
$hbug=1 if $v=~/\W/; |
$hbug=1 if $v=~/[^\w.\-]/; |
$hbug=1 if $v=~/\_/; |
$hbug=1 if $v=~/_/; |
} |
} |
if (/PerlSetVar\s+lonDefDomain\s+(\S+)/) { |
if (/PerlSetVar\s+lonDefDomain\s+(\S+)/) { |
my $v=$1; |
my $v=$1; |
$dbug=0; |
$dbug=0; |
$dbug=1 if $v=~/\W/; |
$dbug=1 if $v=~/[^\w.\-]/; |
$dbug=1 if $v=~/\_/; |
$dbug=1 if $v=~/_/; |
# Avoid namespace conflicts under the web server's DocumentRoot. |
# Avoid namespace conflicts under the web server's DocumentRoot. |
my @badnames=('raw','userfiles','priv','adm','uploaded'); |
my @badnames=('raw','userfiles','priv','adm','uploaded'); |
foreach my $bad (@badnames) { |
foreach my $bad (@badnames) { |
Line 152 my $sbug=0;
|
Line 154 my $sbug=0;
|
my $fbug=0; |
my $fbug=0; |
my %line; |
my %line; |
my $line=0; |
my $line=0; |
while (<IN>) { |
while (my $l = <IN>) { |
$line++; |
$line++; |
next if (/^(\#|\s*$)/); |
next if ($l=~/^(\#|\s*$)/); |
if (/\S/) { |
if ($l=~/^\^/) { |
if (/\r/) { $rbug=1; push(@{$line{'r'}},$line); } |
if ($l !~ /^\^[\w.\-]/) { |
my @a=split(/\:/,$_); |
$dns_bug = 1; |
|
push(@{$line{'dns'}},$line); |
|
} |
|
} elsif ($l=~/\S/) { |
|
if ($l=~/\r/) { $rbug=1; push(@{$line{'r'}},$line); } |
|
my @a=split(/:/,$l); |
if ($a[0]=~/[^\w\-.]/ || |
if ($a[0]=~/[^\w\-.]/ || |
$a[1]=~/[^\w\-.]/ || |
$a[1]=~/[^\w\-.]/ || |
$a[0]=~/\_/ || |
$a[0]=~/\_/ || |
$a[1]=~/\_/ ) { $dbug=1; push(@{$line{'d'}},$line); } |
$a[1]=~/\_/ ) { $dbug=1; push(@{$line{'d'}},$line); } |
if (@a<4 || @a>5) { $fbug=1; push(@{$line{'f'}},$line); } |
if (@a<6 || @a>6) { $fbug=1; push(@{$line{'f'}},$line); } |
my $expr='\s.+$'; |
my $expr='\s.+$'; |
if ($a[0] =~ /$expr/ || |
if ($a[0] =~ /$expr/ || |
$a[1] =~ /$expr/ || |
$a[1] =~ /$expr/ || |
Line 179 if ($dbug) {
|
Line 186 if ($dbug) {
|
print "**** ERROR **** <TARGET /> has invalid host id or domain id (lines ".join(', ',@{$line{'d'}}).")\n"; |
print "**** ERROR **** <TARGET /> has invalid host id or domain id (lines ".join(', ',@{$line{'d'}}).")\n"; |
} |
} |
if ($fbug) { |
if ($fbug) { |
print "**** ERROR **** <TARGET /> is lacking 4 or 5 columns for every row (lines ".join(', ',@{$line{'f'}}).")\n"; |
print "**** ERROR **** <TARGET /> is lacking 6 columns for every row (lines ".join(', ',@{$line{'f'}}).")\n"; |
} |
} |
if ($sbug) { |
if ($sbug) { |
print "**** ERROR **** <TARGET /> has illegal whitespace character (lines ".join(', ',@{$line{'s'}}).")\n"; |
print "**** ERROR **** <TARGET /> has illegal whitespace character (lines ".join(', ',@{$line{'s'}}).")\n"; |
} |
} |
|
if ($dns_bug) { |
|
print "**** ERROR **** <TARGET /> host.tab server entry has characters (lines ".join(', ',@{$line{'dns'}}).")\n"; |
|
} |
</file> |
</file> |
<file> |
<file> |
<target dist='default'>/home/httpd/lonTabs/spare.tab</target> |
<target dist='default'>/home/httpd/lonTabs/spare.tab</target> |