bin/172801: /usr/libexec/locate.updatedb (and therefore locate(1)) does not work inside a jail

dteske at freebsd.org dteske at freebsd.org
Mon Mar 11 19:20:01 UTC 2013


The following reply was made to PR bin/172801; it has been noted by GNATS.

From: <dteske at freebsd.org>
To: <bug-followup at FreeBSD.org>, <dteske at FreeBSD.org>
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--


More information about the freebsd-bugs mailing list