V9.14.000.2026.06.07

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2026-06-07 21:19:52 +01:00
parent 98c14bd008
commit 830aa1afa7
@@ -45,7 +45,6 @@ dropbear_build() {
if ! PATH="${var_build_path}" command -v findmnt >/dev/null 2>&1; then
do_log "error" "file_only" "4310() Required Dropbear build command missing from sterile PATH: 'findmnt'."
printf 'ERROR: required Dropbear build command missing from sterile PATH: findmnt\n' >> "${var_build_log}"
return 127
fi
@@ -53,7 +52,6 @@ dropbear_build() {
/opt/.ciss/build/dropbear-*) ;;
*)
do_log "error" "file_only" "4310() Refusing to clean unexpected Dropbear build directory: '${var_build_dir}'."
printf 'ERROR: refusing to clean unexpected Dropbear build directory: %s\n' "${var_build_dir}" >> "${var_build_log}"
return "${ERR_PATH_NOT_VALID}"
;;
esac
@@ -63,7 +61,6 @@ dropbear_build() {
if [[ ! -d "${var_build_dir}" ]]; then
do_log "error" "file_only" "4310() Dropbear build directory missing: '${var_build_dir}'."
printf 'ERROR: Dropbear build directory missing: %s\n' "${var_build_dir}" >> "${var_build_log}"
return "${ERR_PATH_NOT_VALID}"
fi
@@ -71,37 +68,31 @@ dropbear_build() {
if ! var_mount_target="$(PATH="${var_build_path}" findmnt -T "${var_build_dir}" -no TARGET)"; then
do_log "error" "file_only" "4310() Cannot determine mount target for Dropbear build directory: '${var_build_dir}'."
printf 'ERROR: cannot determine mount target for Dropbear build directory: %s\n' "${var_build_dir}" >> "${var_build_log}"
return "${ERR_PATH_NOT_VALID}"
fi
if ! var_mount_options="$(PATH="${var_build_path}" findmnt -T "${var_build_dir}" -no OPTIONS)"; then
do_log "error" "file_only" "4310() Cannot determine mount options for Dropbear build directory: '${var_build_dir}'."
printf 'ERROR: cannot determine mount options for Dropbear build directory: %s\n' "${var_build_dir}" >> "${var_build_log}"
return "${ERR_PATH_NOT_VALID}"
fi
if [[ ! -f "${var_build_dir}/configure" ]]; then
do_log "error" "file_only" "4310() Dropbear configure script missing: '${var_build_dir}/configure'."
printf 'ERROR: Dropbear configure script missing: %s/configure\n' "${var_build_dir}" >> "${var_build_log}"
return "${ERR_PATH_NOT_VALID}"
fi
if ! IFS= read -r var_configure_shebang < "${var_build_dir}/configure"; then
do_log "error" "file_only" "4310() Cannot read Dropbear configure script: '${var_build_dir}/configure'."
printf 'ERROR: cannot read Dropbear configure script: %s/configure\n' "${var_build_dir}" >> "${var_build_log}"
return "${ERR_PATH_NOT_VALID}"
fi
if [[ ! -x "${var_build_dir}/configure" ]]; then
do_log "warn" "file_only" "4310() Dropbear configure script is not executable; correcting trusted source tree mode."
printf 'WARNING: Dropbear configure script is not executable; correcting trusted source tree mode.\n' >> "${var_build_log}"
chmod u+x "${var_build_dir}/configure" || return 126
fi
if [[ ! -x "${var_build_dir}/configure" ]]; then
do_log "error" "file_only" "4310() Dropbear configure script is not executable: '${var_build_dir}/configure'."
printf 'ERROR: Dropbear configure script is not executable: %s/configure\n' "${var_build_dir}" >> "${var_build_log}"
return 126
fi
@@ -129,27 +120,23 @@ dropbear_build() {
if [[ ",${var_mount_options}," == *,noexec,* ]]; then
do_log "error" "file_only" "4310() Dropbear build directory is on a noexec mount: '${var_mount_target}' options '${var_mount_options}'. Use an exec-capable build directory."
printf 'ERROR: Dropbear build directory is on a noexec mount: %s options %s\n' "${var_mount_target}" "${var_mount_options}" >> "${var_build_log}"
return 126
fi
if [[ "${var_configure_shebang}" != "#!"* ]]; then
do_log "error" "file_only" "4310() Dropbear configure script has no interpreter line: '${var_build_dir}/configure'."
printf 'ERROR: Dropbear configure script has no interpreter line: %s/configure\n' "${var_build_dir}" >> "${var_build_log}"
return 126
fi
read -r var_configure_interpreter _ <<< "${var_configure_shebang#\#!}"
if [[ "${var_configure_interpreter}" != /* || ! -x "${var_configure_interpreter}" ]]; then
do_log "error" "file_only" "4310() Dropbear configure interpreter is not executable: '${var_configure_interpreter}'."
printf 'ERROR: Dropbear configure interpreter is not executable: %s\n' "${var_configure_interpreter}" >> "${var_build_log}"
return 126
fi
for var_command in "${ary_required_commands[@]}"; do
if ! PATH="${var_build_path}" command -v "${var_command}" >/dev/null 2>&1; then
do_log "error" "file_only" "4310() Required Dropbear build command missing from sterile PATH: '${var_command}'."
printf 'ERROR: required Dropbear build command missing from sterile PATH: %s\n' "${var_command}" >> "${var_build_log}"
return 127
fi
done