wok-current view busybox/stuff/busybox-1.18-tftp-chroot.u @ rev 12089

busybox: tftpd should chroot (thanks Don Manuel)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Mar 10 12:59:12 2012 +0100 (2012-03-10)
parents
children
line source
1 --- busybox-1.18.4/networking/tftp.c
2 +++ busybox-1.18.4/networking/tftp.c
3 @@ -752,7 +752,7 @@
4 opt = option_mask32 = TFTPD_OPT | (getopt32(argv, "rcu:", &user_opt) << 8);
5 argv += optind;
6 if (argv[0])
7 - xchdir(argv[0]);
8 + xchroot(argv[0]);
10 result = recv_from_to(STDIN_FILENO, block_buf, sizeof(block_buf),
11 0 /* flags */,