wok-4.x 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 a4bd979a562b
children 45fd8547b1f4
files busybox/receipt busybox/stuff/busybox-1.18-tftp-chroot.u
line diff
     1.1 --- a/busybox/receipt	Sat Mar 10 09:31:50 2012 +0100
     1.2 +++ b/busybox/receipt	Sat Mar 10 12:59:12 2012 +0100
     1.3 @@ -31,6 +31,7 @@
     1.4  conspy.u
     1.5  httpd.u
     1.6  su-nochdir.u
     1.7 +tftp-chroot.u
     1.8  EOT
     1.9      cp $stuff/$PACKAGE-${VERSION%.*}.config .config
    1.10  }
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/busybox/stuff/busybox-1.18-tftp-chroot.u	Sat Mar 10 12:59:12 2012 +0100
     2.3 @@ -0,0 +1,11 @@
     2.4 +--- busybox-1.18.4/networking/tftp.c
     2.5 ++++ busybox-1.18.4/networking/tftp.c
     2.6 +@@ -752,7 +752,7 @@
     2.7 + 	opt = option_mask32 = TFTPD_OPT | (getopt32(argv, "rcu:", &user_opt) << 8);
     2.8 + 	argv += optind;
     2.9 + 	if (argv[0])
    2.10 +-		xchdir(argv[0]);
    2.11 ++		xchroot(argv[0]);
    2.12 + 
    2.13 + 	result = recv_from_to(STDIN_FILENO, block_buf, sizeof(block_buf),
    2.14 + 			0 /* flags */,