cvs commit: src/libexec/tftpd tftpd.c
Brian Somers
brian at FreeBSD.org
Mon Jun 21 01:01:43 PDT 2004
brian 2004-06-21 08:01:16 UTC
FreeBSD src repository
Modified files:
libexec/tftpd tftpd.c
Log:
o Reduce path names in RRQ and WRQ packets by:
Reducing "/+./" strings to "/"
Reducing "/[^/]+/../" to "/"
o Don't send an OACK when the result of the [RW]RQ is an error.
These changes allow tftpd to interact with pxelinux.bin from the syslinux
package.
Whilst the path reducing code doesn't properly handle situations where the
path component before the "/../" is a symlink to (say) ".", I would suggest
that it does the right thing in terms of the clients perception of what
their path string actually represents. This seems better than using
realpath() and breaking environments where symlinks point outside of the
directory hierarchy that tftpd is configured to allow.
Revision Changes Path
1.31 +34 -2 src/libexec/tftpd/tftpd.c
More information about the cvs-src
mailing list