Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 Apr 1996 00:21:19 -0700
From:      Warner Losh <imp@village.org>
To:        hackers@freebsd.org
Subject:   tftpd and -s
Message-ID:  <199604030721.AAA05371@rover.village.org>

next in thread | raw e-mail | index | archive | help
SunOS had a useful feature in tftpd -s.  Since I replaced a Sun box as
the boot server for my X terminal some time ago, I've been running a
hacked version of tftpd that accepts only one arg: -s.  -s dir will
chroot to that dir before starting tftpd.  I did this because it was
easier to hack tftpd.c to accept -s than to try to reconfigure the X
terminal that I moved to my freebsd box to put /usr/local/tftpboot/ in
front of *ALL* of its paths.  You have to run it as root, but it does
a setuid to nobody once it the chroot is effective (well, immediately
after it parses the args).  And it fails safe: If chroot fails, so
does tftpd on the theory that it is better to fail than to give access
to any world readable file.

Would anybody be interested in these patches to tftpd.c?  While they
wouldn't appeal to everybody, there may some interest.

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604030721.AAA05371>