openssh: update list of env variables to keep

See https://github.com/termux/termux-api/issues/301.
This commit is contained in:
Leonid Pliushch 2020-03-08 20:53:27 +02:00
parent 6de81dfeb6
commit 2f09e83274
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://www.openssh.com/
TERMUX_PKG_DESCRIPTION="Secure shell for logging into a remote machine"
TERMUX_PKG_LICENSE="BSD"
TERMUX_PKG_VERSION=8.2p1
TERMUX_PKG_REVISION=3
TERMUX_PKG_REVISION=4
TERMUX_PKG_SRCURL=https://fastly.cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=43925151e6cf6cee1450190c0e9af4dc36b41c12737619edff8bcebdff64e671
TERMUX_PKG_DEPENDS="libandroid-support, ldns, openssl, libedit, termux-auth, krb5, zlib"

View File

@ -65,7 +65,7 @@ diff -uNr openssh-8.0p1/session.c openssh-8.0p1.mod/session.c
+#ifdef __ANDROID__
+ char const* envs_to_keep[] = {"LD_LIBRARY_PATH", "PATH", "ANDROID_ROOT", "ANDROID_DATA", "EXTERNAL_STORAGE", "LANG", "PREFIX", "TERMUX_HUSHLOGIN", "TMPDIR"};
+ char const* envs_to_keep[] = {"ANDROID_DATA", "ANDROID_ROOT", "ANDROID_RUNTIME_ROOT", "ANDROID_TZDATA_ROOT", "BOOTCLASSPATH", "EXTERNAL_STORAGE", "LANG", "LD_LIBRARY_PATH", "PATH", "PREFIX", "TERMUX_HUSHLOGIN", "TMPDIR"};
+ 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);