# HG changeset patch # User Pascal Bellard # Date 1331380752 -3600 # Node ID 30e1308b918c503f17ebdfce78924dc608aee851 # Parent a4bd979a562b1a54201bdfb593fce318211b0cb9 busybox: tftpd should chroot (thanks Don Manuel) diff -r a4bd979a562b -r 30e1308b918c busybox/receipt --- a/busybox/receipt Sat Mar 10 09:31:50 2012 +0100 +++ b/busybox/receipt Sat Mar 10 12:59:12 2012 +0100 @@ -31,6 +31,7 @@ conspy.u httpd.u su-nochdir.u +tftp-chroot.u EOT cp $stuff/$PACKAGE-${VERSION%.*}.config .config } diff -r a4bd979a562b -r 30e1308b918c busybox/stuff/busybox-1.18-tftp-chroot.u --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/busybox/stuff/busybox-1.18-tftp-chroot.u Sat Mar 10 12:59:12 2012 +0100 @@ -0,0 +1,11 @@ +--- busybox-1.18.4/networking/tftp.c ++++ busybox-1.18.4/networking/tftp.c +@@ -752,7 +752,7 @@ + opt = option_mask32 = TFTPD_OPT | (getopt32(argv, "rcu:", &user_opt) << 8); + argv += optind; + if (argv[0]) +- xchdir(argv[0]); ++ xchroot(argv[0]); + + result = recv_from_to(STDIN_FILENO, block_buf, sizeof(block_buf), + 0 /* flags */,