Skip to content

Commit

Permalink
openssh: Keep also the LD_PRELOAD environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
fornwall committed Oct 2, 2023
1 parent 3d027ee commit 0e9c510
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/openssh/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Secure shell for logging into a remote machine"
TERMUX_PKG_LICENSE="BSD"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=9.4p1
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://fastly.cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=3608fd9088db2163ceb3e600c85ab79d0de3d221e59192ea1923e23263866a85
TERMUX_PKG_DEPENDS="krb5, ldns, libandroid-support, libedit, openssh-sftp-server, openssl, termux-auth, zlib"
Expand Down
2 changes: 1 addition & 1 deletion packages/openssh/session.c.patch
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ diff -uNr openssh-9.3p1/session.c openssh-9.3p1.mod/session.c


+#ifdef __ANDROID__
+ char const* envs_to_keep[] = {"ASEC_MOUNTPOINT", "BOOTCLASSPATH", "DEX2OATBOOTCLASSPATH", "EXTERNAL_STORAGE", "LANG", "PATH", "PREFIX", "SYSTEMSERVERCLASSPATH", "TMPDIR"};
+ char const* envs_to_keep[] = {"ASEC_MOUNTPOINT", "BOOTCLASSPATH", "DEX2OATBOOTCLASSPATH", "EXTERNAL_STORAGE", "LANG", "PATH", "PREFIX", "SYSTEMSERVERCLASSPATH", "TMPDIR", "LD_PRELOAD"};
+ 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);
Expand Down

0 comments on commit 0e9c510

Please sign in to comment.