version 1.6, 2002/09/22 08:23:26
|
version 1.10, 2002/11/27 15:33:10
|
Line 34 http://www.lon-capa.org/
|
Line 34 http://www.lon-capa.org/
|
<files> |
<files> |
<file> |
<file> |
<target dist='default'>/var/lib/mysql/mysql.sock</target> |
<target dist='default'>/var/lib/mysql/mysql.sock</target> |
|
<target dist='redhat7'>/tmp/mysql.sock</target> |
<perlscript mode='fg'> |
<perlscript mode='fg'> |
unless |
unless |
(-e '<TARGET />') # Does file exist? |
(-e '<TARGET />') # Does file exist? |
Line 52 else # It exists, so look at the file me
|
Line 53 else # It exists, so look at the file me
|
{ |
{ |
print('**** ERROR **** <TARGET /> should be owned by'. |
print('**** ERROR **** <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 /var/lib/mysql/mysql.sock'."\n". |
'chown www:www <TARGET />'."\n". |
'chmod a-rwx,u+rwx /var/lib/mysql/mysql.sock'."\n"); |
'chmod a-rwx,u+rwx <TARGET />'."\n"); |
} |
} |
else # Check permissions on the file to make sure it is private to apache2. |
else # Check permissions on the file to make sure it is private to www. |
{ |
{ |
$smode =~ /^.(.)..$/; |
$smode =~ /^.(.)..$/; |
my $wflag = $1; |
my $wflag = $1; |
if ($wflag != 7) |
if ($wflag != 7) # Can www use this socket? (Hope so!) |
{ |
{ |
print('**** ERROR **** '. |
print('**** ERROR **** '. |
'<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 /var/lib/mysql/mysql.sock'."\n". |
'chown www:www <TARGET />'."\n". |
'chmod a-rwx,u+rwx /var/lib/mysql/mysql.sock'."\n"); |
'chmod a-rwx,u+rwx <TARGET />'."\n"); |
} |
} |
$smode=~/^..(..)$/; |
$smode=~/^..(..)$/; |
$wflag=$1; |
$wflag=$1; |
if ($wflag ne "00") |
if ($wflag ne "00") # Can others use this socket? (Hope not!) |
{ |
{ |
print('**** ERROR **** '. |
print('**** ERROR **** '. |
'<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 /var/lib/mysql/mysql.sock'."\n". |
'chown www:www <TARGET />'."\n". |
'chmod a-rwx,u+rwx /var/lib/mysql/mysql.sock'."\n"); |
'chmod a-rwx,u+rwx <TARGET />'."\n"); |
} |
} |
} |
} |
} |
} |
Line 122 my $dbug=0;
|
Line 123 my $dbug=0;
|
my $sbug=0; |
my $sbug=0; |
my $fbug=0; |
my $fbug=0; |
while (<IN>) { |
while (<IN>) { |
|
next if (/^(\#|\s*$)/); |
if (/\S/) { |
if (/\S/) { |
$rbug=1 if /\r/; |
$rbug=1 if /\r/; |
my @a=split(/\:/,$_); |
my @a=split(/\:/,$_); |