From owner-freebsd-bugs@FreeBSD.ORG Sun Apr 1 17:30:17 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3889C106566B for ; Sun, 1 Apr 2012 17:30:17 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 23B7D8FC18 for ; Sun, 1 Apr 2012 17:30:17 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q31HUGDA028160 for ; Sun, 1 Apr 2012 17:30:16 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q31HUGRn028157; Sun, 1 Apr 2012 17:30:16 GMT (envelope-from gnats) Date: Sun, 1 Apr 2012 17:30:16 GMT Message-Id: <201204011730.q31HUGRn028157@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Matthew Story Cc: Subject: Re: bin/166553: find -delete documentation is misleading X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthew Story List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Apr 2012 17:30:17 -0000 The following reply was made to PR bin/166553; it has been noted by GNATS. From: Matthew Story To: Richard Kettlewell Cc: freebsd-gnats-submit@freebsd.org Subject: Re: bin/166553: find -delete documentation is misleading Date: Sun, 1 Apr 2012 13:24:03 -0400 On Sun, Apr 1, 2012 at 5:24 AM, Richard Kettlewell wr= ote: > > The documentation for 'find -delete' includes the following remark: > > =A0 =A0It will not attempt to delete a filename with a =93/=94 character = in its pathname relative to =93.=94 for security reasons. > > This reflects a defensive test early in f_delete. However, the test will = not succeed, since find does not use FTS_NOCHDIR, so entry->fts_accpath sho= uld never contain "/". $ # show test succeeds $ mkdir -p foo/bar/baz $ find ./foo -delete find: -delete: ./foo: relative path potentially not safe The reason that fts_accpath contains a leading ``./'' in this case is that fts, even without FTS_NOCHDIR, does not chdir into the parent directory of depth 0 directories on the first pass, fts_accpath will always equal fts_pathname on depth 0 FTSENTs. > > I suggest that this remark be deleted from the man page. > >>How-To-Repeat: > >>Fix: > > >>Release-Note: >>Audit-Trail: >>Unformatted: > _______________________________________________ > freebsd-bugs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-bugs > To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org" --=20 regards, matt