version 1.12, 2003/01/07 21:12:54
|
version 1.22, 2006/12/10 23:23:55
|
Line 1
|
Line 1
|
<!DOCTYPE piml PUBLIC "-//TUX/DTD piml 1.0 Final//EN" |
<!DOCTYPE piml PUBLIC "-//TUX/DTD piml 1.0 Final//EN" |
"http://lpml.sourceforge.net/DTD/piml.dtd"> |
"http://lpml.sourceforge.net/DTD/piml.dtd"> |
<!-- sanitycheck.piml --> |
<!-- sanitycheck.piml --> |
<!-- Scott Harrison --> |
|
|
|
<!-- $Id$ --> |
<!-- $Id$ --> |
|
|
Line 67 unless
|
Line 66 unless
|
{ |
{ |
print("**** ERROR **** Missing <TARGET />\n"); |
print("**** ERROR **** Missing <TARGET />\n"); |
} |
} |
|
<!-- Commented out by Matthew since MySQL insists on doing things its own way |
else # It exists, so look at the file metadata more closely. |
else # It exists, so look at the file metadata more closely. |
{ |
{ |
my @s = stat('<TARGET />'); |
my @s = stat('<TARGET />'); |
Line 77 else # It exists, so look at the file me
|
Line 77 else # It exists, so look at the file me
|
|
|
if ($uid ne $web_uid) # If file owned by someone else other than www. |
if ($uid ne $web_uid) # If file owned by someone else other than www. |
{ |
{ |
print('**** ERROR **** <TARGET /> should be owned by'. |
print('**** WARNING **** <TARGET /> should be owned by'. |
' www.'."\n".'Try these commands to make things right:'."\n". |
' www.'."\n".'Try these commands to make things right:'."\n". |
'chown www:www <TARGET />'."\n". |
'chown www:www <TARGET />'."\n". |
'chmod a-rwx,u+rwx <TARGET />'."\n"); |
'chmod a-rwx,u+rwx <TARGET />'."\n"); |
Line 88 else # It exists, so look at the file me
|
Line 88 else # It exists, so look at the file me
|
my $wflag = $1; |
my $wflag = $1; |
if ($wflag != 7) # Can www use this socket? (Hope so!) |
if ($wflag != 7) # Can www use this socket? (Hope so!) |
{ |
{ |
print('**** ERROR **** '. |
print('**** WARNING **** '. |
'<TARGET /> should be user "rwx" (by'. |
'<TARGET /> should be user "rwx" (by'. |
' www).'."\n".'Try these commands to make things right:'."\n". |
' www).'."\n".'Try these commands to make things right:'."\n". |
'chown www:www <TARGET />'."\n". |
'chown www:www <TARGET />'."\n". |
Line 98 else # It exists, so look at the file me
|
Line 98 else # It exists, so look at the file me
|
$wflag=$1; |
$wflag=$1; |
if ($wflag ne "00") # Can others use this socket? (Hope not!) |
if ($wflag ne "00") # Can others use this socket? (Hope not!) |
{ |
{ |
print('**** ERROR **** '. |
print('**** WARNING **** '. |
'<TARGET /> should not be group or everybody accessible'. |
'<TARGET /> should not be group or everybody accessible'. |
'.'."\n".'Try these commands to make things right:'."\n". |
'.'."\n".'Try these commands to make things right:'."\n". |
'chown www:www <TARGET />'."\n". |
'chown www:www <TARGET />'."\n". |
Line 106 else # It exists, so look at the file me
|
Line 106 else # It exists, so look at the file me
|
} |
} |
} |
} |
} |
} |
|
--> |
</perlscript> |
</perlscript> |
</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> |
<perlscript mode='fg'> |
<perlscript mode='fg'> |
open IN, "<<TARGET />"; |
open IN, "<<TARGET />"; |
my $hbug=-1; |
my $hbug=-1; |
Line 148 my $rbug=0;
|
Line 150 my $rbug=0;
|
my $dbug=0; |
my $dbug=0; |
my $sbug=0; |
my $sbug=0; |
my $fbug=0; |
my $fbug=0; |
|
my %line; |
|
my $line=0; |
while (<IN>) { |
while (<IN>) { |
|
$line++; |
next if (/^(\#|\s*$)/); |
next if (/^(\#|\s*$)/); |
if (/\S/) { |
if (/\S/) { |
$rbug=1 if /\r/; |
if (/\r/) { $rbug=1; push(@{$line{'r'}},$line); } |
my @a=split(/\:/,$_); |
my @a=split(/\:/,$_); |
$dbug=1 if $a[0]=~/\W/; |
if ($a[0]=~/[^\w\-.]/ || |
$dbug=1 if $a[0]=~/\_/; |
$a[1]=~/[^\w\-.]/ || |
$dbug=1 if $a[1]=~/\_/; |
$a[0]=~/\_/ || |
$dbug=1 if $a[1]=~/\W/; |
$a[1]=~/\_/ ) { $dbug=1; push(@{$line{'d'}},$line); } |
$fbug=1 if (@a<5 || @a>6); |
if (@a<4 || @a>5) { $fbug=1; push(@{$line{'f'}},$line); } |
my $expr='\s.+$'; |
my $expr='\s.+$'; |
$sbug=1 if ($a[0] =~ /$expr/ || |
if ($a[0] =~ /$expr/ || |
$a[1] =~ /$expr/ || |
$a[1] =~ /$expr/ || |
$a[2] =~ /$expr/ || |
$a[2] =~ /$expr/ || |
$a[3] =~ /$expr/ || |
$a[3] =~ /$expr/ ) { $sbug=1; push(@{$line{'s'}},$line); } |
$a[4] =~ /$expr/ ) |
|
; |
; |
} |
} |
} |
} |
close IN; |
close IN; |
if ($rbug) { |
if ($rbug) { |
print "**** ERROR **** <TARGET /> is DOS-formatted\n"; |
print "**** ERROR **** <TARGET /> is DOS-formatted (lines ".join(', ',@{$line{'r'}}).")\n"; |
} |
} |
if ($dbug) { |
if ($dbug) { |
print "**** ERROR **** <TARGET /> has invalid host id or domain id\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 5 or 6 columns for every row\n"; |
print "**** ERROR **** <TARGET /> is lacking 4 or 5 columns for every row (lines ".join(', ',@{$line{'f'}}).")\n"; |
} |
} |
if ($sbug) { |
if ($sbug) { |
print "**** ERROR **** <TARGET /> has illegal whitespace character\n"; |
print "**** ERROR **** <TARGET /> has illegal whitespace character (lines ".join(', ',@{$line{'s'}}).")\n"; |
} |
} |
</file> |
</file> |
<file> |
<file> |
Line 187 open IN, "<<TARGET />";
|
Line 191 open IN, "<<TARGET />";
|
my $rbug=0; |
my $rbug=0; |
my $dbug=0; |
my $dbug=0; |
my $sbug=0; |
my $sbug=0; |
while (<IN>) { |
while (my $line = <IN>) { |
if (/\S/) { |
if ($line =~ /\S/) { |
$rbug=1 if /\r/; |
$rbug=1 if $line=~/\r/; |
$dbug=1 if $_=~/\W.*\n$/; |
if ($line =~ /\W.*\n/) { |
$dbug=1 if $_=~/\_/; |
$dbug=$line if ($line !~/\w:(?:primary|default)$/); |
$sbug=1 if /\s.+$/; |
} |
|
$dbug=$line if $line=~/\_/; |
|
$sbug=1 if $line=~/\s.+$/; |
} |
} |
} |
} |
close IN; |
close IN; |
Line 200 if ($rbug) {
|
Line 206 if ($rbug) {
|
print "**** ERROR **** <TARGET /> is DOS-formatted\n"; |
print "**** ERROR **** <TARGET /> is DOS-formatted\n"; |
} |
} |
if ($dbug) { |
if ($dbug) { |
print "**** ERROR **** <TARGET /> has invalid host id\n"; |
print "**** ERROR **** <TARGET /> has invalid host id ($dbug)\n"; |
} |
} |
if ($sbug) { |
if ($sbug) { |
print "**** ERROR **** <TARGET /> has illegal whitespace character\n"; |
print "**** ERROR **** <TARGET /> has illegal whitespace character\n"; |