V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 2m15s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 2m15s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -220,7 +220,7 @@ bantime.overalljails = true
|
||||
bantime.rndtime = 877s
|
||||
filter = sshd
|
||||
findtime = 16m
|
||||
mode = aggressive
|
||||
mode = normal
|
||||
port = ${VAR_SSH_PORT}
|
||||
protocol = tcp
|
||||
maxretry = 4
|
||||
|
||||
@@ -402,6 +402,8 @@ EOF
|
||||
|
||||
[[ "${var_2fa_tty}" == "true" ]] && write_ciss_2fa_user "${var_username}" "login" "on" "${var_target}"
|
||||
|
||||
write_ciss_2fa_user "${var_username}" "su" "on" "${var_target}"
|
||||
|
||||
write_ciss_2fa_user "${var_username}" "sudo" "on" "${var_target}"
|
||||
|
||||
fi
|
||||
@@ -748,12 +750,9 @@ write_ciss_2fa_user() {
|
||||
declare -r var_ciss_2fa_map="${var_target}/etc/ciss/2fa.map"
|
||||
declare -r var_map_file="${var_ciss_2fa_map}"
|
||||
declare -r var_tmp_file="${var_map_file}.tmp.$$"
|
||||
declare -r var_umask=$(umask)
|
||||
declare -i col_idx="" found="0" status=""
|
||||
declare line=""
|
||||
|
||||
umask 0077
|
||||
|
||||
# shellcheck disable=SC2249
|
||||
case "${var_s,,}" in
|
||||
on|1|yes|true) status="1" ;;
|
||||
@@ -846,11 +845,10 @@ write_ciss_2fa_user() {
|
||||
if [[ -e "${var_tmp_file}" ]]; then
|
||||
|
||||
mv -f -- "${var_tmp_file}" "${var_map_file}" || rm -f -- "${var_tmp_file}"
|
||||
chmod 0644 "${var_map_file}"
|
||||
|
||||
fi
|
||||
|
||||
umask "${var_umask}"
|
||||
|
||||
return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
|
||||
Reference in New Issue
Block a user