Subject: Temporary hack re-enable invalid variable names From: Chris Boot Forwarded: not-needed Upstream busybox commit b6838b520 ("ash: [VAR] Sanitise environment variable names on entry") breaks assumptions used by debian-installer's preseed system. This results in settings passed to the installer on the kernel command-line getting stripped out if they contain invalid characters in the variable name, such as '/', which is actually very common in this use case. This is not a long term fix for this problem: a different approach is needed to parse the values from the kernel command-line, but we don't want to be responsible for holding up the debian-installer alpha release any longer than it has already. --- a/shell/Config.src +++ b/shell/Config.src @@ -184,6 +184,13 @@ the script in 'applets_sh' and a stub C file containing configuration in the appropriate subsystem directory. +config FEATURE_DI_ENV_HACK + bool "Use d-i environment variable hack" + default n + depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH + help + Do NOT use this. You don't want this. Really. + endif # Options common to all shells endmenu --- a/shell/ash.c +++ b/shell/ash.c @@ -14401,8 +14401,13 @@ initvar(); for (envp = environ; envp && *envp; envp++) { +#if ENABLE_FEATURE_DI_ENV_HACK + if (strchr(*envp, '=')) +#else p = endofname(*envp); - if (p != *envp && *p == '=') { + if (p != *envp && *p == '=') +#endif + { setvareq(*envp, VEXPORT|VTEXTFIXED); } }