From owner-cvs-src@FreeBSD.ORG Mon Jun 21 08:01:43 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A0E7E16A4CE; Mon, 21 Jun 2004 08:01:43 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B6DF43D48; Mon, 21 Jun 2004 08:01:43 +0000 (GMT) (envelope-from brian@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i5L81K1a029551; Mon, 21 Jun 2004 08:01:21 GMT (envelope-from brian@repoman.freebsd.org) Received: (from brian@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i5L81ImG029547; Mon, 21 Jun 2004 08:01:18 GMT (envelope-from brian) Message-Id: <200406210801.i5L81ImG029547@repoman.freebsd.org> From: Brian Somers Date: Mon, 21 Jun 2004 08:01:16 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/libexec/tftpd tftpd.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jun 2004 08:01:43 -0000 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