]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
o Reduce path names in RRQ and WRQ packets by:
authorBrian Somers <brian@FreeBSD.org>
Mon, 21 Jun 2004 08:01:16 +0000 (08:01 +0000)
committerBrian Somers <brian@FreeBSD.org>
Mon, 21 Jun 2004 08:01:16 +0000 (08:01 +0000)
commit7bc7e0c85e9a52a347fb79e4af0f31879355d3ce
treeb23d0d3ee239998bb689eb262cc2b53c953a4434
parentf46519d1c1446cd5863857a7217c7f6a4025c372
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.
libexec/tftpd/tftpd.c