mirror of
https://github.com/ovh/debian-cis.git
synced 2024-11-22 05:27:01 +01:00
IMP(5.2.3): fix possible permissions for 5.2.3
This commit is contained in:
parent
d40a85085d
commit
f4e0aafacc
@ -29,6 +29,10 @@ audit () {
|
|||||||
ok "$FILE permissions were set to $PERMISSIONS"
|
ok "$FILE permissions were set to $PERMISSIONS"
|
||||||
else
|
else
|
||||||
has_file_correct_permissions $FILE 640
|
has_file_correct_permissions $FILE 640
|
||||||
|
if [ $FNRET = 0 ]; then
|
||||||
|
ok "$FILE permissions were set to $PERMISSIONS"
|
||||||
|
else
|
||||||
|
has_file_correct_permissions $FILE 600
|
||||||
if [ $FNRET = 0 ]; then
|
if [ $FNRET = 0 ]; then
|
||||||
ok "$FILE permissions were set to $PERMISSIONS"
|
ok "$FILE permissions were set to $PERMISSIONS"
|
||||||
else
|
else
|
||||||
@ -36,6 +40,7 @@ audit () {
|
|||||||
crit "$FILE permissions were not set to $PERMISSIONS"
|
crit "$FILE permissions were not set to $PERMISSIONS"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -70,6 +75,10 @@ apply () {
|
|||||||
ok "$FILE permissions were set to $PERMISSIONS"
|
ok "$FILE permissions were set to $PERMISSIONS"
|
||||||
else
|
else
|
||||||
has_file_correct_permissions $FILE 640
|
has_file_correct_permissions $FILE 640
|
||||||
|
if [ $FNRET = 0 ]; then
|
||||||
|
ok "$FILE permissions were set to $PERMISSIONS"
|
||||||
|
else
|
||||||
|
has_file_correct_permissions $FILE 600
|
||||||
if [ $FNRET = 0 ]; then
|
if [ $FNRET = 0 ]; then
|
||||||
ok "$FILE permissions were set to $PERMISSIONS"
|
ok "$FILE permissions were set to $PERMISSIONS"
|
||||||
else
|
else
|
||||||
@ -77,6 +86,7 @@ apply () {
|
|||||||
chmod 0$PERMISSIONS $FILE
|
chmod 0$PERMISSIONS $FILE
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
for FILE in $($SUDO_CMD find $DIR -xdev -type f -name 'ssh_host_*_key.pub');
|
for FILE in $($SUDO_CMD find $DIR -xdev -type f -name 'ssh_host_*_key.pub');
|
||||||
|
Loading…
Reference in New Issue
Block a user