mirror of
https://github.com/ovh/debian-cis.git
synced 2024-11-22 05:27:01 +01:00
add log details to be more comprehensive (#49)
Co-authored-by: Jeremy Denoun <jeremy.denoun@iguanesolutions.com>
This commit is contained in:
parent
84ac4db90f
commit
b44fb47c3a
@ -37,7 +37,7 @@ audit() {
|
|||||||
for FILE in $FILES_PRESENT; do
|
for FILE in $FILES_PRESENT; do
|
||||||
does_file_exist "$FILE"
|
does_file_exist "$FILE"
|
||||||
if [ "$FNRET" != 0 ]; then
|
if [ "$FNRET" != 0 ]; then
|
||||||
crit "$FILE is absent"
|
crit "$FILE is absent, should exist"
|
||||||
else
|
else
|
||||||
has_file_correct_ownership "$FILE" "$USER" "$GROUP"
|
has_file_correct_ownership "$FILE" "$USER" "$GROUP"
|
||||||
if [ "$FNRET" = 0 ]; then
|
if [ "$FNRET" = 0 ]; then
|
||||||
@ -69,7 +69,7 @@ apply() {
|
|||||||
for FILE in $FILES_PRESENT; do
|
for FILE in $FILES_PRESENT; do
|
||||||
does_file_exist "$FILE"
|
does_file_exist "$FILE"
|
||||||
if [ "$FNRET" != 0 ]; then
|
if [ "$FNRET" != 0 ]; then
|
||||||
warn "$FILE is absent"
|
warn "$FILE is absent, fixing (touch)"
|
||||||
touch "$FILE"
|
touch "$FILE"
|
||||||
fi
|
fi
|
||||||
has_file_correct_ownership "$FILE" "$USER" "$GROUP"
|
has_file_correct_ownership "$FILE" "$USER" "$GROUP"
|
||||||
|
Loading…
Reference in New Issue
Block a user