|
@ -1,8 +1,7 @@ |
|
|
diff --git a/session.c.orig b/session.c
|
|
|
diff -uNr openssh-7.9p1/session.c openssh-7.9p1.mod/session.c
|
|
|
index 58826db..890e452 100644
|
|
|
--- openssh-7.9p1/session.c 2018-10-17 03:01:20.000000000 +0300
|
|
|
--- a/session.c.orig
|
|
|
+++ openssh-7.9p1.mod/session.c 2019-03-01 23:13:36.360949253 +0200
|
|
|
+++ b/session.c
|
|
|
@@ -200,7 +200,7 @@
|
|
|
@@ -199,7 +199,7 @@ auth_input_request_forwarding(struct ssh *ssh, struct passwd * pw)
|
|
|
|
|
|
temporarily_use_uid(pw); |
|
|
temporarily_use_uid(pw); |
|
|
|
|
|
|
|
|
/* Allocate a buffer for the socket name, and format the name. */ |
|
|
/* Allocate a buffer for the socket name, and format the name. */ |
|
@ -11,7 +10,16 @@ index 58826db..890e452 100644 |
|
|
|
|
|
|
|
|
/* Create private directory for socket */ |
|
|
/* Create private directory for socket */ |
|
|
if (mkdtemp(auth_sock_dir) == NULL) { |
|
|
if (mkdtemp(auth_sock_dir) == NULL) { |
|
|
@@ -802,7 +802,7 @@ do_motd(void)
|
|
|
@@ -268,7 +268,7 @@
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
temporarily_use_uid(pw); |
|
|
|
|
|
- auth_info_file = xstrdup("/tmp/sshauth.XXXXXXXXXXXXXXX");
|
|
|
|
|
|
+ auth_info_file = xstrdup("@TERMUX_PREFIX@/tmp/sshauth.XXXXXXXXXXXXXXX");
|
|
|
|
|
|
if ((fd = mkstemp(auth_info_file)) == -1) { |
|
|
|
|
|
error("%s: mkstemp: %s", __func__, strerror(errno)); |
|
|
|
|
|
goto out; |
|
|
|
|
|
@@ -833,7 +833,7 @@
|
|
|
f = fopen(login_getcapstr(lc, "welcome", "/etc/motd", |
|
|
f = fopen(login_getcapstr(lc, "welcome", "/etc/motd", |
|
|
"/etc/motd"), "r"); |
|
|
"/etc/motd"), "r"); |
|
|
#else |
|
|
#else |
|
@ -20,7 +28,7 @@ index 58826db..890e452 100644 |
|
|
#endif |
|
|
#endif |
|
|
if (f) { |
|
|
if (f) { |
|
|
while (fgets(buf, sizeof(buf), f)) |
|
|
while (fgets(buf, sizeof(buf), f)) |
|
|
@@ -1044,8 +1044,10 @@ do_setup_env(struct ssh *ssh, Session *s, const char *shell)
|
|
|
@@ -1082,8 +1082,10 @@
|
|
|
# endif /* HAVE_CYGWIN */ |
|
|
# endif /* HAVE_CYGWIN */ |
|
|
#endif /* HAVE_LOGIN_CAP */ |
|
|
#endif /* HAVE_LOGIN_CAP */ |
|
|
|
|
|
|
|
@ -31,9 +39,9 @@ index 58826db..890e452 100644 |
|
|
|
|
|
|
|
|
/* Normal systems set SHELL by default. */ |
|
|
/* Normal systems set SHELL by default. */ |
|
|
child_set_env(&env, &envsize, "SHELL", shell); |
|
|
child_set_env(&env, &envsize, "SHELL", shell); |
|
|
@@ -1053,6 +1055,15 @@ do_setup_env(struct ssh *ssh, Session *s, const char *shell)
|
|
|
@@ -1127,6 +1129,15 @@
|
|
|
if (getenv("TZ")) |
|
|
auth_sock_name); |
|
|
child_set_env(&env, &envsize, "TZ", getenv("TZ")); |
|
|
|
|
|
|
|
|
|
|
|
+#ifdef __ANDROID__
|
|
|
+#ifdef __ANDROID__
|
|
|
+ char const* envs_to_keep[] = {"LD_LIBRARY_PATH", "PATH", "ANDROID_ROOT", "ANDROID_DATA", "EXTERNAL_STORAGE", "LANG", "PREFIX", "TMPDIR"};
|
|
|
+ char const* envs_to_keep[] = {"LD_LIBRARY_PATH", "PATH", "ANDROID_ROOT", "ANDROID_DATA", "EXTERNAL_STORAGE", "LANG", "PREFIX", "TMPDIR"};
|
|
|