mirror of
https://github.com/ovh/debian-cis.git
synced 2024-11-25 06:54:29 +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"
|
||||
else
|
||||
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
|
||||
ok "$FILE permissions were set to $PERMISSIONS"
|
||||
else
|
||||
@ -36,6 +40,7 @@ audit () {
|
||||
crit "$FILE permissions were not set to $PERMISSIONS"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
@ -70,6 +75,10 @@ apply () {
|
||||
ok "$FILE permissions were set to $PERMISSIONS"
|
||||
else
|
||||
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
|
||||
ok "$FILE permissions were set to $PERMISSIONS"
|
||||
else
|
||||
@ -77,6 +86,7 @@ apply () {
|
||||
chmod 0$PERMISSIONS $FILE
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
for FILE in $($SUDO_CMD find $DIR -xdev -type f -name 'ssh_host_*_key.pub');
|
||||
|
Loading…
Reference in New Issue
Block a user