wok-current diff 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 diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/busybox/stuff/busybox-1.18-tftp-chroot.u	Sat Mar 10 12:59:12 2012 +0100
     1.3 @@ -0,0 +1,11 @@
     1.4 +--- busybox-1.18.4/networking/tftp.c
     1.5 ++++ busybox-1.18.4/networking/tftp.c
     1.6 +@@ -752,7 +752,7 @@
     1.7 + 	opt = option_mask32 = TFTPD_OPT | (getopt32(argv, "rcu:", &user_opt) << 8);
     1.8 + 	argv += optind;
     1.9 + 	if (argv[0])
    1.10 +-		xchdir(argv[0]);
    1.11 ++		xchroot(argv[0]);
    1.12 + 
    1.13 + 	result = recv_from_to(STDIN_FILENO, block_buf, sizeof(block_buf),
    1.14 + 			0 /* flags */,