V8.13.400.2025.11.08
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 56s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 56s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -128,17 +128,27 @@ normalize_ssh_keys_in_dir() {
|
||||
declare var_key_dir="" var_key_file=""
|
||||
var_key_dir="$1"
|
||||
|
||||
[[ -d "${var_key_dir}" ]] || return 0
|
||||
shopt -s nullglob dotglob
|
||||
|
||||
if [[ -d "${var_key_dir}" ]]; then
|
||||
shopt -u nullglob dotglob
|
||||
return 0
|
||||
fi
|
||||
|
||||
### Cover both root identity keys and host keys.
|
||||
for var_key_file in "${var_key_dir}"/id_* "${var_key_dir}"/ssh_host_*; do
|
||||
|
||||
[[ -e "${var_key_file}" ]] || continue
|
||||
|
||||
normalize_ssh_key_file "${var_key_file}" || return 1
|
||||
if ! normalize_ssh_key_file "${var_key_file}"; then
|
||||
shopt -u nullglob dotglob
|
||||
return 1
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
shopt -u nullglob dotglob
|
||||
|
||||
return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
|
||||
Reference in New Issue
Block a user