docs/166553: find(1): find -delete documentation is misleading
jilles at stack.nl
Sun Mar 2 22:40:02 UTC 2014
The following reply was made to PR docs/166553; it has been noted by GNATS.
From: Jilles Tjoelker <jilles at stack.nl>
To: bug-followup at FreeBSD.org, rjk at greenend.org.uk
Cc: Matthew Story <matthewstory at 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.
More information about the freebsd-doc