openssh: Retain LANG in sshd (closes #343)

This commit is contained in:
Fredrik Fornwall 2016-06-27 10:51:42 -04:00
parent 630795b80f
commit 7edb3deecb
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
TERMUX_PKG_HOMEPAGE=http://www.openssh.com/
TERMUX_PKG_DESCRIPTION="Secure shell for logging into a remote machine"
TERMUX_PKG_VERSION=7.2p2
TERMUX_PKG_BUILD_REVISION=5
TERMUX_PKG_BUILD_REVISION=6
TERMUX_PKG_SRCURL=http://ftp.eu.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_DEPENDS="libandroid-support, ldns, openssl"
# --disable-strip to prevent host "install" command to use "-s", which won't work for target binaries:

View File

@ -24,7 +24,7 @@ diff -u -r ../openssh-7.2p2/session.c ./session.c
child_set_env(&env, &envsize, "TZ", getenv("TZ"));
+#ifdef __ANDROID__
+ char const* envs_to_keep[] = {"LD_LIBRARY_PATH", "PATH", "ANDROID_ROOT", "ANDROID_DATA", "EXTERNAL_STORAGE"};
+ char const* envs_to_keep[] = {"LD_LIBRARY_PATH", "PATH", "ANDROID_ROOT", "ANDROID_DATA", "EXTERNAL_STORAGE", "LANG"};
+ for (i = 0; i < (sizeof(envs_to_keep) / sizeof(envs_to_keep[0])); i++) {
+ char const* env_to_keep_name = envs_to_keep[i];
+ char const* env_to_keep_value = getenv(env_to_keep_name);