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.
This commit is contained in:
parent
d27b635768
commit
76ff15a7b1
|
@ -2865,7 +2865,7 @@ usage() {
|
||||||
}
|
}
|
||||||
|
|
||||||
APKBUILD="${APKBUILD:-./APKBUILD}"
|
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
|
while getopts ":AcdD:fFhkKmnP:qrRs:uvV" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
'A') echo "$CARCH"; exit 0;;
|
'A') echo "$CARCH"; exit 0;;
|
||||||
|
|
Loading…
Reference in New Issue