moving MAX_DAYS to the inner scope of the function

This commit is contained in:
jonnyCodev
2020-02-05 11:15:14 +02:00
committed by GitHub
parent a824e064b3
commit d473ebe3f2

View File

@@ -15,8 +15,9 @@ CHECK_TITLE_extra774="[extra774] Check if user have unused console login"
CHECK_SCORED_extra774="NOT_SCORED"
CHECK_TYPE_extra774="EXTRA"
CHECK_ALTERNATE_check774="extra774"
MAX_DAYS=-30
extra774(){
MAX_DAYS=-30
LIST_USERS_WITH_PASSWORD_ENABLED=$(cat $TEMP_REPORT_FILE|awk -F, '{ print $1,$4,$5 }' |grep true | awk '{ print $1 }')
for i in $LIST_USERS_WITH_PASSWORD_ENABLED; do
@@ -30,4 +31,4 @@ extra774(){
textPass "User $user has used console login in the past ${MAX_DAYS#-} days"
fi
done
}
}