Date: Sun, 2 Mar 2014 22:40:01 GMT From: Jilles Tjoelker <jilles@stack.nl> To: freebsd-doc@FreeBSD.org Subject: Re: docs/166553: find(1): find -delete documentation is misleading Message-ID: <201403022240.s22Me14D053503@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR docs/166553; it has been noted by GNATS. From: Jilles Tjoelker <jilles@stack.nl> To: bug-followup@FreeBSD.org, rjk@greenend.org.uk Cc: Matthew Story <matthewstory@gmail.com> Subject: Re: docs/166553: find(1): find -delete documentation is misleading Date: Sun, 2 Mar 2014 23:38:25 +0100 In PR docs/166553, Richard Kettlewell wrote: > The documentation for 'find -delete' includes the following remark: > It will not attempt to delete a filename with a "/" character in its > pathname relative to "." 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 should never contain "/". > I suggest that this remark be deleted from the man page. In SVN r246628 and r253886 (both are in 10.0-RELEASE), I removed the two most common causes for the confusing error message about relative pathnames: if "." cannot be opened (except if find(1)'s own open succeeds but fts(3)'s open fails) and if an attempt is made to delete a pathname given as operand to find(1). The former now gives a clear error message and the latter is now allowed. -- Jilles Tjoelker
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403022240.s22Me14D053503>