mirror of
https://github.com/ovh/debian-cis.git
synced 2024-11-22 05:27:01 +01:00
IMP(shellcheck): refactor continue (SC2104)
This commit is contained in:
parent
addd48c4dd
commit
ef800954f4
@ -27,19 +27,19 @@ audit() {
|
|||||||
does_file_exist $FILE
|
does_file_exist $FILE
|
||||||
if [ "$FNRET" != 0 ]; then
|
if [ "$FNRET" != 0 ]; then
|
||||||
crit "$FILE does not exist"
|
crit "$FILE does not exist"
|
||||||
continue
|
|
||||||
fi
|
|
||||||
has_file_correct_ownership "$FILE" "$USER" "$GROUP"
|
|
||||||
if [ "$FNRET" = 0 ]; then
|
|
||||||
ok "$FILE has correct ownership"
|
|
||||||
else
|
else
|
||||||
crit "$FILE ownership was not set to $USER:$GROUP"
|
has_file_correct_ownership "$FILE" "$USER" "$GROUP"
|
||||||
fi
|
if [ "$FNRET" = 0 ]; then
|
||||||
has_file_correct_permissions "$FILE" "$PERMISSIONS"
|
ok "$FILE has correct ownership"
|
||||||
if [ "$FNRET" = 0 ]; then
|
else
|
||||||
ok "$FILE has correct permissions"
|
crit "$FILE ownership was not set to $USER:$GROUP"
|
||||||
else
|
fi
|
||||||
crit "$FILE permissions were not set to $PERMISSIONS"
|
has_file_correct_permissions "$FILE" "$PERMISSIONS"
|
||||||
|
if [ "$FNRET" = 0 ]; then
|
||||||
|
ok "$FILE has correct permissions"
|
||||||
|
else
|
||||||
|
crit "$FILE permissions were not set to $PERMISSIONS"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,19 +27,19 @@ audit() {
|
|||||||
does_file_exist $FILE
|
does_file_exist $FILE
|
||||||
if [ "$FNRET" != 0 ]; then
|
if [ "$FNRET" != 0 ]; then
|
||||||
crit "$FILE does not exist"
|
crit "$FILE does not exist"
|
||||||
continue
|
|
||||||
fi
|
|
||||||
has_file_correct_ownership "$FILE" "$USER" "$GROUP"
|
|
||||||
if [ "$FNRET" = 0 ]; then
|
|
||||||
ok "$FILE has correct ownership"
|
|
||||||
else
|
else
|
||||||
crit "$FILE ownership was not set to $USER:$GROUP"
|
has_file_correct_ownership "$FILE" "$USER" "$GROUP"
|
||||||
fi
|
if [ "$FNRET" = 0 ]; then
|
||||||
has_file_correct_permissions "$FILE" "$PERMISSIONS"
|
ok "$FILE has correct ownership"
|
||||||
if [ "$FNRET" = 0 ]; then
|
else
|
||||||
ok "$FILE has correct permissions"
|
crit "$FILE ownership was not set to $USER:$GROUP"
|
||||||
else
|
fi
|
||||||
crit "$FILE permissions were not set to $PERMISSIONS"
|
has_file_correct_permissions "$FILE" "$PERMISSIONS"
|
||||||
|
if [ "$FNRET" = 0 ]; then
|
||||||
|
ok "$FILE has correct permissions"
|
||||||
|
else
|
||||||
|
crit "$FILE permissions were not set to $PERMISSIONS"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,19 +27,19 @@ audit() {
|
|||||||
does_file_exist $FILE
|
does_file_exist $FILE
|
||||||
if [ "$FNRET" != 0 ]; then
|
if [ "$FNRET" != 0 ]; then
|
||||||
crit "$FILE does not exist"
|
crit "$FILE does not exist"
|
||||||
continue
|
|
||||||
fi
|
|
||||||
has_file_correct_ownership "$FILE" "$USER" "$GROUP"
|
|
||||||
if [ "$FNRET" = 0 ]; then
|
|
||||||
ok "$FILE has correct ownership"
|
|
||||||
else
|
else
|
||||||
crit "$FILE ownership was not set to $USER:$GROUP"
|
has_file_correct_ownership "$FILE" "$USER" "$GROUP"
|
||||||
fi
|
if [ "$FNRET" = 0 ]; then
|
||||||
has_file_correct_permissions "$FILE" "$PERMISSIONS"
|
ok "$FILE has correct ownership"
|
||||||
if [ "$FNRET" = 0 ]; then
|
else
|
||||||
ok "$FILE has correct permissions"
|
crit "$FILE ownership was not set to $USER:$GROUP"
|
||||||
else
|
fi
|
||||||
crit "$FILE permissions were not set to $PERMISSIONS"
|
has_file_correct_permissions "$FILE" "$PERMISSIONS"
|
||||||
|
if [ "$FNRET" = 0 ]; then
|
||||||
|
ok "$FILE has correct permissions"
|
||||||
|
else
|
||||||
|
crit "$FILE permissions were not set to $PERMISSIONS"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user