[PATCH 4/6] sec-keys.eclass: avoid heredoc in global scope
Sam James <[email protected]> Fri, 10 Jul 2026 17:41:10 +0100
| Newsgroups | gmane.linux.gentoo.devel |
|---|---|
| Message-ID | <c152ce8b13e1efd07d5325a5835ec58cf275a462.1783701662.git.sam@gentoo.org> |
A heredoc may cause the use of a temporary file with < EAPI 9 and even then still with >= EAPI 9 if the input is large. This becomes a problem if sandboxing is applied to metadata generation. Closes: https://bugs.gentoo.org/978941 Signed-off-by: Sam James <[email protected]> --- eclass/sec-keys.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eclass/sec-keys.eclass b/eclass/sec-keys.eclass index ca1b4de572412..b53b7143bea65 100644 --- a/eclass/sec-keys.eclass +++ b/eclass/sec-keys.eclass @@ -68,7 +68,7 @@ _sec_keys_set_globals() { for key in "${SEC_KEYS_VALIDPGPKEYS[@]}"; do fingerprint=${key%%:*} name=${key#${fingerprint}:}; name=${name%%:*} - IFS=, read -r -a locations <<<"${key##*:}" + mapfile -td ',' locations < <(printf %s "${key##*:}") [[ ${locations[@]} ]] || die "${ECLASS}: ${name}: PGP key remote is mandatory" for loc in "${locations[@]}"; do case ${loc} in -- 2.55.0