termux-packages/packages/busybox/0012-networking-tftp-no-chr...

17 lines
493 B
Diff
Raw Normal View History

diff -uNr busybox-1.31.1/networking/tftp.c busybox-1.31.1.mod/networking/tftp.c
--- busybox-1.31.1/networking/tftp.c 2019-06-10 13:50:53.000000000 +0300
+++ busybox-1.31.1.mod/networking/tftp.c 2019-11-11 22:36:27.592894669 +0200
@@ -907,7 +907,12 @@
G.pw = xgetpwnam(user_opt);
}
if (argv[0]) {
+#ifdef __ANDROID__
+ // chroot may trigger seccomp and is allowed only for root anyway.
+ xchdir(argv[0]);
+#else
xchroot(argv[0]);
+#endif
}
result = recv_from_to(STDIN_FILENO,