From owner-cvs-all@FreeBSD.ORG Wed Oct 17 18:41:59 2007 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2BC3F16A417; Wed, 17 Oct 2007 18:41:59 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id DBA4C13C4B6; Wed, 17 Oct 2007 18:41:58 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 88A5846EDD; Wed, 17 Oct 2007 14:41:58 -0400 (EDT) Date: Wed, 17 Oct 2007 19:41:58 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Stefan Esser In-Reply-To: <4716350B.90004@FreeBSD.org> Message-ID: <20071017193822.Y60783@fledge.watson.org> References: <200710152209.l9FM9Jv3017150@repoman.freebsd.org> <20071016102013.GE23043@submonkey.net> <4714F06B.7070702@FreeBSD.org> <20071016225906.GK23043@submonkey.net> <20071017122837.GM31826@elvis.mu.org> <4716350B.90004@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Ceri Davies , cvs-src@FreeBSD.org, Alfred Perlstein , cvs-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/locate/locate updatedb.sh X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Oct 2007 18:41:59 -0000 On Wed, 17 Oct 2007, Stefan Esser wrote: > Alfred Perlstein wrote: >> * Ceri Davies [071016 15:59] wrote: >>> While userland can tell if a filesystem is pseudo or not, (see lsvfs), I'm >>> not sure that we can reliably tell whether a device is removable or not >>> (cf. my camera, USB key, iPod, etc.). >> >> fstab(5) gives some hints, "noauto" would be a giveaway as well as value of >> 0 for 'fs_passno' is also a hint. > > Hmmm, file systems with noauto could be added to $PRUNEPATHS, I guess. But > I'm against too much magic behind the scenes, since that may lead to > violation of the POLA. I'll give it a try, anyway ... > > Other sub-directories exist that should be kept out of the locate db like > /var/spool for example. Probably there are many more ... Another possibility here is to add a noindex flag to fstab/mount options and to explicitly mark things that locate (and things that might follow locate) shouldn't index in addition to network file systems. Desktop auto-mounters could set the flag automatically. I also find myself a bit nervous about heuristics that think certain file systems might be removable devices implicitly, or certain types of drives, etc. Robert N M Watson Computer Laboratory University of Cambridge