From owner-freebsd-bugs@FreeBSD.ORG Mon Mar 11 19:20:01 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5EB0CD99 for ; Mon, 11 Mar 2013 19:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 38FEBA43 for ; Mon, 11 Mar 2013 19:20:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r2BJK1E0085690 for ; Mon, 11 Mar 2013 19:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r2BJK1Zi085689; Mon, 11 Mar 2013 19:20:01 GMT (envelope-from gnats) Date: Mon, 11 Mar 2013 19:20:01 GMT Message-Id: <201303111920.r2BJK1Zi085689@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Subject: Re: bin/172801: /usr/libexec/locate.updatedb (and therefore locate(1)) does not work inside a jail X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: dteske@freebsd.org List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2013 19:20:01 -0000 The following reply was made to PR bin/172801; it has been noted by GNATS. From: To: , Cc: Subject: Re: bin/172801: /usr/libexec/locate.updatedb (and therefore locate(1)) does not work inside a jail Date: Mon, 11 Mar 2013 12:17:01 -0700 ------=_NextPart_000_05F7_01CE1E52.568DD3D0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit The previously attached patch didn't work for me on a virgin jail setup. I've revised/updated it. Could still use a formal looking at by the respective authors however (read: not intended for commit yet) _____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. ------=_NextPart_000_05F7_01CE1E52.568DD3D0 Content-Type: text/plain; name="patch.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="patch.txt" --- /usr/libexec/locate.updatedb.orig 2010-07-18 19:24:42.000000000 -0700=0A= +++ /usr/libexec/locate.updatedb 2013-03-11 12:12:56.054787039 -0700=0A= @@ -59,6 +59,7 @@ PATH=3D$LIBEXECDIR:/bin:/usr/bin:$PATH; ex=0A= =0A= case X"$SEARCHPATHS" in =0A= X) echo "$0: empty variable SEARCHPATHS"; exit 1;; esac=0A= +if [ "$(sysctl -n security.jail.jailed)" =3D "0" ]; then=0A= case X"$FILESYSTEMS" in =0A= X) echo "$0: empty variable FILESYSTEMS"; exit 1;; esac=0A= =0A= @@ -70,12 +71,14 @@ do=0A= or=3D"-or"=0A= done=0A= excludes=3D"$excludes ) -prune"=0A= +fi=0A= =0A= case X"$PRUNEPATHS" in=0A= X) ;;=0A= *) for path in $PRUNEPATHS=0A= do =0A= - excludes=3D"$excludes -or -path $path -prune"=0A= + excludes=3D"$excludes $or -path $path -prune"=0A= + or=3D"-or"=0A= done;;=0A= esac=0A= =0A= ------=_NextPart_000_05F7_01CE1E52.568DD3D0--