bash: prevent aliasing of libc's 'getenv'

By default, bash brings its own version of 'getenv', named exactly like
the libc function. This becomes a problem in fork/execve scenarios if
the dynamic linker resolves 'getenv' to the bash binary instead of the
libc.

This patch fixes the generate step of the genodians.org scenario.

Issue #3882
This commit is contained in:
Norman Feske 2020-09-09 21:25:30 +02:00
parent f5dc71ed35
commit 8dde14f93e

View File

@ -1,4 +1,12 @@
CONFIGURE_ARGS = --without-bash-malloc
#
# Avoid aliasing with the libc 'getenv' to prevent the dynamic linker from
# resolving libc-internal references to the bash binary, which causes
# trouble for fork/execve.
#
CONFIGURE_ARGS += bash_cv_getenv_redef=no
CFLAGS += -Dsh_xfree=free
#