libuv: Update from 1.20.0 to 1.20.1
[termux-packages] / packages / dropbear / svr-chansession.c.patch
CommitLineData
10688585
LP
1diff -uNr dropbear-2018.76/svr-chansession.c dropbear-2018.76.mod/svr-chansession.c
2--- dropbear-2018.76/svr-chansession.c 2018-02-27 16:25:12.000000000 +0200
3+++ dropbear-2018.76.mod/svr-chansession.c 2018-04-21 13:45:06.707063974 +0300
4@@ -919,6 +919,8 @@
5 #endif
6
7 /* clear environment */
8+ /* termux: do not clear environment on android */
9+#ifndef __ANDROID__
10 /* if we're debugging using valgrind etc, we need to keep the LD_PRELOAD
11 * etc. This is hazardous, so should only be used for debugging. */
12 #ifndef DEBUG_VALGRIND
13@@ -931,6 +933,7 @@
14 }
15 #endif /* HAVE_CLEARENV */
16 #endif /* DEBUG_VALGRIND */
17+#endif /* __ANDROID__ */
18
19 /* We can only change uid/gid as root ... */
20 if (getuid() == 0) {
21@@ -956,12 +959,14 @@
22 }
23 }
24
25+ /* termux: do not modify environment since we did not clean it */
26+#ifndef __ANDROID__
27 /* set env vars */
28 addnewvar("USER", ses.authstate.pw_name);
29 addnewvar("LOGNAME", ses.authstate.pw_name);
30 addnewvar("HOME", ses.authstate.pw_dir);
31 addnewvar("SHELL", get_user_shell());
32- addnewvar("PATH", DEFAULT_PATH);
33+#endif /* __ANDROID__ */
34 if (chansess->term != NULL) {
35 addnewvar("TERM", chansess->term);
36 }