V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m53s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m53s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -39,7 +39,7 @@ check_nic() {
|
||||
clear
|
||||
|
||||
do_log "info" "file_only" "1030() You have selected: '${var_nic}' - proceeding with setup."
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -92,7 +92,7 @@ yaml_parser() {
|
||||
# shellcheck disable=SC1090
|
||||
. "${VAR_PRESEED}"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -258,7 +258,7 @@ END { print max }
|
||||
# shellcheck disable=SC2034
|
||||
VAR_USER_ROOT_SPECIFIC="${user_root_specific,,}"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -219,7 +219,7 @@ yaml_validator() {
|
||||
|
||||
fi
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -87,10 +87,7 @@ ciss_secret_varname_from_path() {
|
||||
### Declare Arrays, HashMaps, and Variables.
|
||||
declare var_path="${1:-}"
|
||||
|
||||
var_path="${var_path//./_}"
|
||||
var_path="${var_path//-/_}"
|
||||
var_path="${var_path//\//_}"
|
||||
var_path="${var_path// /_}"
|
||||
var_path="${var_path//[^A-Za-z0-9_]/_}"
|
||||
var_path="${var_path^^}"
|
||||
|
||||
printf 'CISS_SECRET_%s' "${var_path}"
|
||||
@@ -180,13 +177,18 @@ yaml_secret() {
|
||||
|
||||
### Read path (up to NUL); break on EOF.
|
||||
IFS= read -r -d '' __path <&"${__pipe_fd}" || break
|
||||
echo "${__path}"
|
||||
|
||||
### Read value (up to NUL); if missing (odd count), treat as empty
|
||||
IFS= read -r -d '' __value <&"${__pipe_fd}" || __value=""
|
||||
echo "${__value}"
|
||||
|
||||
### Drop the leading 'secrets.' prefix for naming.
|
||||
__path_wo_prefix="${__path#secrets.}"
|
||||
echo "${__path_wo_prefix}"
|
||||
|
||||
__varname="$(ciss_secret_varname_from_path "${__path_wo_prefix}")"
|
||||
echo "${__varname}"
|
||||
|
||||
### Assign to a global variable, preserving content verbatim (including newlines).
|
||||
unset -v "${__varname}"
|
||||
@@ -199,11 +201,14 @@ yaml_secret() {
|
||||
done
|
||||
|
||||
### Close the producer FD
|
||||
exec {__pipe_fd}>&-
|
||||
exec {__pipe_fd}<&-
|
||||
|
||||
umask "${__umask}"
|
||||
|
||||
guard_dir && return 0
|
||||
echo "Inside 1256()"
|
||||
sleep 60
|
||||
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -402,7 +402,7 @@ partitioning() {
|
||||
printf "%s\n" "${ary_paths_unsorted[@]}" >| "${DIR_LOG}/3200_mount_paths_unsorted.log"
|
||||
printf "%s\n" "${ARY_PATHS_SORTED[@]}" >| "${DIR_LOG}/3200_mount_paths_sorted.log"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -53,7 +53,7 @@ benchmarking_encryption() {
|
||||
# shellcheck disable=SC2155
|
||||
declare -girx VAR_KDF_MEMORY=$(awk -F'[ ,]+' '{print $4}' <<<"${var_result}")
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -279,7 +279,7 @@ partition_encryption() {
|
||||
|
||||
[[ -n "${VAR_LUKS_URL}" ]] && unset VAR_TEMP_PLAIN_NC_AUTH
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -138,7 +138,7 @@ partition_formatting() {
|
||||
|
||||
done
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -384,7 +384,7 @@ mount_partition() {
|
||||
|
||||
done
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -61,7 +61,7 @@ uuid_logger() {
|
||||
|
||||
done
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -71,7 +71,7 @@ func_debootstrap() {
|
||||
chmod 0700 "${var_target}/root/.ciss/cdi"
|
||||
chmod 0700 "${var_target}/root/.ciss/cdi/debootstrap"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
|
||||
else
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ check_debootstrap() {
|
||||
} >> ${var_logfile}
|
||||
"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -124,7 +124,7 @@ prepare_mounts() {
|
||||
|
||||
fi
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -54,7 +54,7 @@ prepare_xdg_root() {
|
||||
unset _xdg_umask
|
||||
'
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -48,7 +48,7 @@ check_usr_merge() {
|
||||
"
|
||||
fi
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -44,7 +44,7 @@ remove_x509() {
|
||||
|
||||
fi
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -80,7 +80,7 @@ EOF
|
||||
|
||||
fi
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -87,7 +87,7 @@ EOF
|
||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
||||
EOF
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -42,7 +42,7 @@ EOF
|
||||
|
||||
chroot_exec "${var_target}" dpkg-reconfigure -f noninteractive tzdata
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -140,7 +140,7 @@ EOF
|
||||
chmod 0644 "${var_target}/etc/default/keyboard"
|
||||
do_log "info" "file_only" "4050() Keyboard layout updated: 'XKBLAYOUT=${locale_keyboard_xkb_keymap}' -> '${var_target}/etc/default/keyboard'."
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -187,7 +187,7 @@ Acquire::Retries "3";
|
||||
EOF
|
||||
sed -i -E 's|^([[:space:]]*)#+|\1//|' "${var_target}/etc/apt/apt.conf.d/91-acquire"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -184,7 +184,7 @@ Acquire::Retries "3";
|
||||
EOF
|
||||
sed -i -E 's|^([[:space:]]*)#+|\1//|' "${var_target}/etc/apt/apt.conf.d/91-acquire"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -78,7 +78,7 @@ update_sources() {
|
||||
|
||||
fi
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -42,7 +42,7 @@ installation_kernel() {
|
||||
|
||||
do_log "info" "file_only" "4120() Kernel image: '${VAR_KERNEL}' installed successfully."
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
|
||||
else
|
||||
|
||||
@@ -54,7 +54,7 @@ installation_kernel() {
|
||||
|
||||
do_log "info" "file_only" "4120() Kernel image: '${image}' installed successfully."
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ EOF
|
||||
RESUME=none
|
||||
EOF
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -103,7 +103,7 @@ installation_toolset() {
|
||||
|
||||
fi
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -49,7 +49,7 @@ installation_systemd() {
|
||||
systemctl --version 2>&1 | tee -a ${var_logfile} | grep -qi 'systemd' || echo '[WARN]: systemd not verifiable' >> ${var_logfile}
|
||||
"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -33,7 +33,7 @@ installation_machineid() {
|
||||
|
||||
fi
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -32,7 +32,7 @@ installation_masking() {
|
||||
"
|
||||
do_log "info" "file_only" "4133() Masked: [plymouth-start.service plymouth-quit.service plymouth-quit-wait.service plymouth-read-write.service]"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -76,7 +76,7 @@ installation_microcode() {
|
||||
|
||||
fi
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -298,7 +298,7 @@ installation_firmware() {
|
||||
apt-get install -y --no-install-recommends --no-install-suggests ${ary_pkgs_resolved[*]} 2>&1 | tee -a ${var_logfile}
|
||||
"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -77,7 +77,7 @@ installation_chrony() {
|
||||
|
||||
rm -f "${var_of}"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -54,7 +54,7 @@ EOF
|
||||
apt-get install -y --no-install-recommends --no-install-suggests eza 2>&1 | tee -a ${var_logfile}
|
||||
"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -54,7 +54,7 @@ EOF
|
||||
apt-get install -y --no-install-recommends --no-install-suggests lynis 2>&1 | tee -a ${var_logfile}
|
||||
"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -190,7 +190,7 @@ tmpfs /run tmpfs
|
||||
# vim: number et ts=2 sw=2 sts=2 ai tw=200 ft=sh
|
||||
EOF
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -48,7 +48,7 @@ check_fstab() {
|
||||
} 2>&1 | tee -a '"${var_logfile}"'
|
||||
'
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -152,7 +152,7 @@ EOF
|
||||
# vim: number et ts=2 sw=2 sts=2 ai tw=200 ft=sh
|
||||
EOF
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -36,7 +36,7 @@ installation_cryptsetup() {
|
||||
apt-get install -y --no-install-recommends --no-install-suggests cryptsetup cryptsetup-initramfs 2>&1 | tee -a ${var_logfile}
|
||||
"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -209,7 +209,7 @@ EOF
|
||||
fi
|
||||
chmod -R 0700 "${TARGET}/etc/grub.d"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -48,7 +48,7 @@ update_grub_password() {
|
||||
|
||||
chroot_exec "${TARGET}" update-grub
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -83,7 +83,7 @@ update_grub_bootparameter() {
|
||||
|
||||
chroot_exec "${TARGET}" update-grub
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -235,7 +235,7 @@ EOF
|
||||
dhcpcd -T ${VAR_FINAL_NIC} | tee -a ${var_logfile}
|
||||
"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -33,7 +33,7 @@ installation_netsec() {
|
||||
apt-get install -y --no-install-suggests fail2ban ufw 2>&1 | tee -a ${var_logfile}
|
||||
"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -71,7 +71,7 @@ dropbear_build() {
|
||||
|
||||
guard_trace off
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -127,7 +127,7 @@ EOF
|
||||
chroot_script "${var_target}" "systemctl mask dropbear.service dropbear.socket"
|
||||
do_log "info" "file_only" "4311() Masked: [dropbear.service dropbear.socket]"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -140,7 +140,7 @@ EOF
|
||||
|
||||
fi
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -45,7 +45,7 @@ update_initramfs() {
|
||||
|
||||
chmod 0400 "${TARGET}/boot/grub/grub.cfg"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -207,7 +207,7 @@ esac
|
||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
||||
EOF
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -47,7 +47,7 @@ EOF
|
||||
|
||||
do_log "info" "file_only" "4400() Installed: '/usr/lib/modules-load.d/30_security-misc.conf'."
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
@@ -71,7 +71,7 @@ kernel_modprobe() {
|
||||
|
||||
do_log "info" "file_only" "4400() Installed: '/etc/modprobe.d/0000_ciss_debian_installer.conf'."
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -30,7 +30,7 @@ kernel_sysctl() {
|
||||
|
||||
do_log "info" "file_only" "4410() Installed: '/etc/sysctl.d/9999_ciss_debian_installer.hardened'."
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -337,7 +337,7 @@ EOF
|
||||
fail2ban-client -d >> ${var_logfile} && echo "OK: config parsed" >> ${var_logfile} || echo "ERROR: config invalid" >> ${var_logfile}
|
||||
"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -67,7 +67,7 @@ uname -snrm
|
||||
EOF
|
||||
chmod 0755 /etc/update-motd.d/10-uname
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -44,7 +44,7 @@ DAEMON_ARGS="-w 2048 -v 1"
|
||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
||||
EOF
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -37,7 +37,7 @@ ExecStart=
|
||||
ExecStart=/usr/sbin/jitterentropy-rngd --osr=2
|
||||
EOF
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -87,7 +87,7 @@ include /etc/logrotate.d
|
||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=conf
|
||||
EOF
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -111,7 +111,7 @@ EOF
|
||||
# - write_pam_sudo-i()
|
||||
# guard_pam_limits
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
@@ -177,7 +177,7 @@ guard_pam_limits() {
|
||||
|
||||
(( var_changed )) && do_log "info" "file_only" "4460() Activated pam_limits.so: (common-session[*])"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -30,7 +30,7 @@ hardening_openssl() {
|
||||
insert_comments "${TARGET}/etc/ssl/openssl.cnf"
|
||||
cat "${VAR_SETUP_PATH}/includes/target/etc/ssl/openssl.cnf" >> "${TARGET}/etc/ssl/openssl.cnf"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -102,7 +102,7 @@ hardening_ufw() {
|
||||
|
||||
chroot_script "${var_target}" "ufw status verbose >> ${var_logfile}"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -55,7 +55,7 @@ hardening_usb() {
|
||||
#sed -i 's/PresentDevicePolicy=apply-policy/PresentDevicePolicy=allow/' /etc/usbguard/usbguard-daemon.conf
|
||||
"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -33,7 +33,7 @@ hardening_virus() {
|
||||
apt-get install -y --no-install-recommends --no-install-suggests rkhunter 2>&1 | tee -a ${var_logfile}
|
||||
"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -54,7 +54,7 @@ accounts_preparation() {
|
||||
|
||||
esac
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -58,7 +58,7 @@ accounts_preparation_ciss() {
|
||||
insert_comments "${var_target}/etc/skel/.ciss/scan_libwrap"
|
||||
insert_comments "${var_target}/etc/skel/.ciss/shortcuts"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -57,7 +57,7 @@ accounts_preparation_physnet() {
|
||||
insert_comments "${var_target}/etc/skel/.ciss/scan_libwrap"
|
||||
insert_comments "${var_target}/etc/skel/.ciss/shortcuts"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -109,7 +109,7 @@ accounts_hardening() {
|
||||
|
||||
fi
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -471,7 +471,7 @@ EOF
|
||||
printf "# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=conf \n" >> "${var_target}/etc/security/access.conf"
|
||||
printf "# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=conf \n" >> "${var_target}/etc/ssh/sshd_config"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -78,7 +78,7 @@ accounts_setup_ciss_root() {
|
||||
|
||||
do_log "info" "file_only" "4520() Skeleton: 'root' successfully generated."
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
@@ -136,7 +136,7 @@ accounts_setup_ciss_user() {
|
||||
|
||||
do_log "info" "file_only" "4520() Skeleton: '${var_username}' successfully generated."
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -76,7 +76,7 @@ accounts_setup_physnet_root() {
|
||||
|
||||
do_log "info" "file_only" "4520() Skeleton: 'root' successfully generated."
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
@@ -131,7 +131,7 @@ accounts_setup_physnet_user() {
|
||||
|
||||
do_log "info" "file_only" "4520() Skeleton: '${var_username}' successfully generated."
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -91,7 +91,7 @@ update_shadow() {
|
||||
### Atomic replace.
|
||||
mv -f "${var_temp}" "${var_shadow}"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -50,7 +50,7 @@ installation_packages() {
|
||||
apt-get clean -y 2>&1 | tee -a ${var_logfile} # Stronger than autoclean: removes the entire '.deb'-cache.
|
||||
"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -98,7 +98,7 @@ EOF
|
||||
|
||||
fi
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -379,7 +379,7 @@ EOF
|
||||
|
||||
chroot_exec "${TARGET}" sed -i 's#^\(ENABLED=\).*#\1"true"#' /etc/default/sysstat
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -97,7 +97,7 @@ auditing_packages() {
|
||||
echo +++ >> ${var_logfile}
|
||||
"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -41,7 +41,7 @@ final_commands() {
|
||||
|
||||
rm -f "${var_target}/root/ciss_xdg_tmp.sh"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -58,7 +58,7 @@ final_logrotate() {
|
||||
"${var_file}"
|
||||
done
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -51,7 +51,7 @@ exiting_chroot_system() {
|
||||
|
||||
declare -gx VAR_CHROOT_ACTIVATED="false"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -41,7 +41,7 @@ installation_kernel_reco() {
|
||||
|
||||
do_log "info" "file_only" "5120() Kernel image: '${VAR_KERNEL}' installed successfully."
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
|
||||
else
|
||||
|
||||
@@ -52,7 +52,7 @@ installation_kernel_reco() {
|
||||
|
||||
do_log "info" "file_only" "5120() Kernel image: '${image}' installed successfully."
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
|
||||
fi
|
||||
|
||||
|
||||
@@ -94,6 +94,6 @@ FSTYPE=${VAR_ROOT_FS}
|
||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
||||
EOF
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
||||
|
||||
@@ -100,6 +100,6 @@ installation_toolset_reco() {
|
||||
|
||||
fi
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
||||
|
||||
@@ -48,6 +48,6 @@ installation_systemd_reco() {
|
||||
systemctl --version 2>&1 | tee -a ${var_logfile} | grep -qi 'systemd' || echo '[WARN]: systemd not verifiable' >> ${var_logfile}
|
||||
"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
||||
|
||||
@@ -33,6 +33,6 @@ installation_machineid_reco() {
|
||||
|
||||
fi
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
||||
|
||||
@@ -34,6 +34,6 @@ installation_masking_reco() {
|
||||
|
||||
do_log "info" "file_only" "5133() Masked: [plymouth-start.service plymouth-quit.service plymouth-quit-wait.service plymouth-read-write.service]"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
||||
|
||||
@@ -43,6 +43,6 @@ exiting_chroot_recovery() {
|
||||
|
||||
declare -gx VAR_CHROOT_ACTIVATED="false"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
||||
|
||||
Reference in New Issue
Block a user