cvs commit: src/usr.bin/locate/locate updatedb.sh

Robert Watson rwatson at FreeBSD.org
Wed Oct 17 11:41:59 PDT 2007


On Wed, 17 Oct 2007, Stefan Esser wrote:

> Alfred Perlstein wrote:
>> * Ceri Davies <ceri at submonkey.net> [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


More information about the cvs-src mailing list