From 76ff15a7b1c38de528b2b9052c3f81cc3430b3aa Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 5 Jun 2023 14:57:06 +0200 Subject: [PATCH] abuild: unset option variables to prevent environment leaking in In abuild's getopts loop, option variables such as "keep", "verbose", etc are only set if the corresponding option is found. If such an option is *not* found, any environment variable with the same name will leak in, instead. Prevent this by explicitly unsetting almost all of them. --- abuild.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abuild.in b/abuild.in index 42996d3..39a45f9 100755 --- a/abuild.in +++ b/abuild.in @@ -2865,7 +2865,7 @@ usage() { } APKBUILD="${APKBUILD:-./APKBUILD}" -unset force +unset color_opt force forceroot install_deps keep keep_build nodeps quiet verbose while getopts ":AcdD:fFhkKmnP:qrRs:uvV" opt; do case $opt in 'A') echo "$CARCH"; exit 0;;