chiark / gitweb /
Initial push
[termux-packages] / packages / busybox / ftpd.c.patch
1 We disable security, because chroot() does not work with our non-root usage.
2
3 With chdir() it's unsafe as a general network service, 
4 but can be used for bootstrapping on a local network.
5
6 diff -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