docs/166553: find(1): find -delete documentation is misleading
Jim Riggs
ports at christianserving.org
Tue Apr 24 20:10:11 UTC 2012
The following reply was made to PR docs/166553; it has been noted by GNATS.
From: Jim Riggs <ports at christianserving.org>
To: bug-followup at FreeBSD.org,
rjk at greenend.org.uk
Cc:
Subject: Re: docs/166553: find(1): find -delete documentation is misleading
Date: Tue, 24 Apr 2012 14:57:37 -0500
I'm not sure that I would classify this as a documentation bug. It seems =
to be a code bug unless the documentation is just completely unclear as =
to how this is to behave. It seems that the intent is that you can't use =
-delete with ./ or ../ in the path; however, it completely blocks =
anything with / anywhere in the path. For example, this will fail (see =
bin/48271):
# cd /
# mkdir testdir
# mkdir testdir/testdir2
# find /testdir -delete
find: -delete: /testdir: relative path potentially not safe
Now, what is "relative" in the path '/testdir'? So, the question is, =
what is the code trying to stop? Is there a security issue with an =
_absolute_ path, a _relative_ path, or both? Right now, it is blocking =
both. Is -delete only supposed to be used in cwd (i.e. '.')? If so, why =
the restriction? I am just trying to understand what is "potentially not =
safe."
This issue is also hosing my `make release' on 9.0-RELEASE with =
WITHOUT_GAMES defined in src.conf:
...
install -o root -g wheel -m 444 =
/usr/src/etc/../sys/amd64/conf/GENERIC.hints =
/usr/obj/release/dist/base/boot/device.hints
find //usr/obj/release/dist/doc -empty -delete
find //usr/obj/release/dist/games -empty -delete
find: -delete: //usr/obj/release/dist/games: relative path potentially =
not safe
*** Error code 1
Stop in /usr/src.
*** Error code 1
Stop in /usr/src.
*** Error code 1
Stop in /usr/src/release.
*** Error code 1
Stop in /usr/src/release.
More information about the freebsd-doc
mailing list