Browse Source

openssh: Retain LANG in sshd (closes #343)

android-5
Fredrik Fornwall 9 years ago
parent
commit
7edb3deecb
  1. 2
      packages/openssh/build.sh
  2. 2
      packages/openssh/session_c_tmpdir.patch

2
packages/openssh/build.sh

@ -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:

2
packages/openssh/session_c_tmpdir.patch

@ -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);

Loading…
Cancel
Save