command-not-found: Update with new executables
[termux-packages] / packages / busybox / ftpd.c.patch
CommitLineData
59f0d218
FF
1We disable security, because chroot() does not work with our non-root usage.
2
3With chdir() it's unsafe as a general network service,
4but can be used for bootstrapping on a local network.
5
6diff -u -r ../busybox-1.23.1/networking/ftpd.c ./networking/ftpd.c
7--- ../busybox-1.23.1/networking/ftpd.c 2015-01-27 03:51:46.000000000 -0500
8+++ ./networking/ftpd.c 2015-02-06 16:38:33.202473045 -0500
9@@ -1230,7 +1230,7 @@
10 G.root_fd = xopen("/", O_RDONLY | O_DIRECTORY);
11 close_on_exec_on(G.root_fd);
12 #endif
13- xchroot(argv[0]);
14+ xchdir(argv[0]);
15 }
16
17 /* RFC-959 Section 5.1