Subject: bin/805: tftp -s must be run as root - should be documented
To: None <gnats-admin@NetBSD.ORG>
From: None <sh391@city.ac.uk>
List: netbsd-bugs
Date: 02/18/1995 10:05:10
>Number:         805
>Category:       bin
>Synopsis:       tftp -s must be run as root - should be documented
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 18 10:05:07 1995
>Originator:     David Brownlee
>Organization:
Private
>Release:        Feb-95
>Environment:
sparc, 1.0A, current
System: NetBSD gluon.city.ac.uk 1.0A NetBSD 1.0A (GLUON) #1: Thu Feb 9 11:25:40 GMT 1995 monoadm@gluon.city.ac.uk:/mono/u1/NetBSD/src/sys/arch/sparc/compile/GLUON sparc


>Description:
	When tftpd is given '-s' it must be run as root, otherwise the
	chroot() call fails. This should be documented. (17 dork points
	awarded here for getting deep into debugging the source before
	thinking "Wait a minute... only root can chroot()..." :)
>How-To-Repeat:
	man chroot
>Fix:

*** libexec/tftpd/tftpd.8.orig	Mon Oct 17 00:15:01 1994
--- libexec/tftpd/tftpd.8	Mon Oct 17 00:16:31 1994
***************
*** 92,99 ****
  flag with a directory name, tftpd will
  .Xr chroot 2
  on startup; therefore the remote host is not expected to pass the directory
! as part of the file name to transfer.  This option is intended primarily for
! compatibility with SunOS boot ROMs which do not include a directory name.
  .Sh SEE ALSO
  .Xr tftp 1 ,
  .Xr inetd 8
--- 92,100 ----
  flag with a directory name, tftpd will
  .Xr chroot 2
  on startup; therefore the remote host is not expected to pass the directory
! as part of the file name to transfer.  It must be run as root to permit this.
! This option is intended primarily for compatibility with SunOS boot ROMs which
! do not include a directory name.
  .Sh SEE ALSO
  .Xr tftp 1 ,
  .Xr inetd 8
>Audit-Trail:
>Unformatted: