From owner-freebsd-doc@FreeBSD.ORG Tue Apr 24 20:10:11 2012 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9AA68106566B for ; Tue, 24 Apr 2012 20:10:11 +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 8622E8FC08 for ; Tue, 24 Apr 2012 20:10:11 +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 q3OKAB5m025393 for ; Tue, 24 Apr 2012 20:10:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q3OKABsk025392; Tue, 24 Apr 2012 20:10:11 GMT (envelope-from gnats) Date: Tue, 24 Apr 2012 20:10:11 GMT Message-Id: <201204242010.q3OKABsk025392@freefall.freebsd.org> To: freebsd-doc@FreeBSD.org From: Jim Riggs Cc: Subject: Re: docs/166553: find(1): find -delete documentation is misleading X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jim Riggs List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 20:10:11 -0000 The following reply was made to PR docs/166553; it has been noted by GNATS. From: Jim Riggs To: bug-followup@FreeBSD.org, rjk@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.