mirror of
https://github.com/ovh/debian-cis.git
synced 2024-12-22 22:15:24 +01:00
CHORE: replace ==
with =
that is bash syntax
This commit is contained in:
parent
41ccd5655a
commit
d05ffaf9d5
@ -33,7 +33,7 @@ audit () {
|
||||
if [ "$OWNER" != "$USER" ]; then
|
||||
EXCEP_FOUND=0
|
||||
for excep in $EXCEPTIONS; do
|
||||
if [ "$DIR:$USER:$OWNER" == "$excep" ]; then
|
||||
if [ "$DIR:$USER:$OWNER" = "$excep" ]; then
|
||||
ok "The home directory ($DIR) of user $USER is owned by $OWNER but is part of exceptions ($DIR:$USER:$OWNER)."
|
||||
EXCEP_FOUND=1
|
||||
break
|
||||
|
@ -22,12 +22,12 @@ audit () {
|
||||
FILES="$SYSLOG_BASEDIR/syslog-ng.conf $(find $SYSLOG_BASEDIR/conf.d/)"
|
||||
for FILE in $FILES; do
|
||||
does_pattern_exist_in_file_multiline "$FILE" "$PATTERN"
|
||||
if [ $FNRET == 0 ]; then
|
||||
if [ $FNRET = 0 ]; then
|
||||
FOUND=1
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $FOUND == 1 ]; then
|
||||
if [ $FOUND = 1 ]; then
|
||||
ok "$PATTERN is present in $FILES"
|
||||
else
|
||||
crit "$PATTERN is not present in $FILES"
|
||||
@ -40,11 +40,11 @@ apply () {
|
||||
FILES="$SYSLOG_BASEDIR/syslog-ng.conf $(find $SYSLOG_BASEDIR/conf.d/ -type f)"
|
||||
for FILE in $FILES; do
|
||||
does_pattern_exist_in_file_multiline "$FILE" "$PATTERN"
|
||||
if [ $FNRET == 0 ]; then
|
||||
if [ $FNRET = 0 ]; then
|
||||
FOUND=1
|
||||
fi
|
||||
done
|
||||
if [ $FOUND == 1 ]; then
|
||||
if [ $FOUND = 1 ]; then
|
||||
ok "$PATTERN is present in $FILES"
|
||||
else
|
||||
crit "$PATTERN is not present in $FILES, please set a remote host to send your logs"
|
||||
|
@ -25,11 +25,11 @@ audit () {
|
||||
FOUND=0
|
||||
for FILE in $FILES; do
|
||||
does_pattern_exist_in_file "$FILE" "$PATTERN"
|
||||
if [ "$FNRET" == 0 ]; then
|
||||
if [ "$FNRET" = 0 ]; then
|
||||
FOUND=1
|
||||
fi
|
||||
done
|
||||
if [ $FOUND == 1 ]; then
|
||||
if [ $FOUND = 1 ]; then
|
||||
ok "$PATTERN is present in $FILES"
|
||||
else
|
||||
crit "$PATTERN is not present in $FILES"
|
||||
|
@ -36,7 +36,7 @@ audit () {
|
||||
# previous line will capture actual policy
|
||||
if [[ $ipt =~ $regex ]]; then
|
||||
actual_policy=${BASH_REMATCH[1]}
|
||||
if [[ $actual_policy == "$FW_POLICY" ]]; then
|
||||
if [[ $actual_policy = "$FW_POLICY" ]]; then
|
||||
ok "Policy correctly set to $FW_POLICY for chain $chain"
|
||||
else
|
||||
crit "Policy set to $actual_policy for chain $chain, should be ${FW_POLICY}."
|
||||
|
Loading…
Reference in New Issue
Block a user