mirror of
https://github.com/ovh/debian-cis.git
synced 2024-11-22 13:37:02 +01:00
Fixed 8.2.4 check file exists before testing rights
This commit is contained in:
parent
3ece442743
commit
5048099df8
@ -19,6 +19,10 @@ GROUP='adm'
|
|||||||
audit () {
|
audit () {
|
||||||
FILES=$(grep "file(" $SYSLOG_BASEDIR/syslog-ng.conf | grep '"' | cut -d'"' -f 2)
|
FILES=$(grep "file(" $SYSLOG_BASEDIR/syslog-ng.conf | grep '"' | cut -d'"' -f 2)
|
||||||
for FILE in $FILES; do
|
for FILE in $FILES; do
|
||||||
|
does_file_exist $FILE
|
||||||
|
if [ $FNRET != 0 ]; then
|
||||||
|
crit "$FILE does not exist"
|
||||||
|
else
|
||||||
has_file_correct_ownership $FILE $USER $GROUP
|
has_file_correct_ownership $FILE $USER $GROUP
|
||||||
if [ $FNRET = 0 ]; then
|
if [ $FNRET = 0 ]; then
|
||||||
ok "$FILE has correct ownership"
|
ok "$FILE has correct ownership"
|
||||||
@ -31,6 +35,7 @@ audit () {
|
|||||||
else
|
else
|
||||||
crit "$FILE has not $PERMISSIONS permissions set"
|
crit "$FILE has not $PERMISSIONS permissions set"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# CIS Debian 7 Hardening
|
# CIS Debian 7 Hardening
|
||||||
#
|
#
|
||||||
|
|
||||||
# If you followed this CIS hardenning, this script follows 8.3.1_install_tripwire.sh
|
# If you followed this CIS hardening, this script follows 8.3.1_install_tripwire.sh
|
||||||
# After installing tripwire, you may want to run those few commented commands to make it fully functionnal
|
# After installing tripwire, you may want to run those few commented commands to make it fully functionnal
|
||||||
|
|
||||||
echo "Generating Site key file..."
|
echo "Generating Site key file..."
|
||||||
|
4
debian/default
vendored
4
debian/default
vendored
@ -1,5 +1,5 @@
|
|||||||
# Default file for CIS Debian hardenning scripts
|
# Default file for CIS Debian hardening scripts
|
||||||
|
|
||||||
# Define here root directory for CIS debian hardenning scripts
|
# Define here root directory for CIS debian hardening scripts
|
||||||
CIS_ROOT_DIR='/opt/cis-hardening'
|
CIS_ROOT_DIR='/opt/cis-hardening'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user