Subject: bin/8454: locate shouldn't search procfs or cd9660 file systems
To: None <gnats-bugs@gnats.netbsd.org>
From: Michael Eriksson <eramore@era-t.ericsson.se>
List: netbsd-bugs
Date: 09/20/1999 14:35:48
>Number: 8454
>Category: bin
>Synopsis: locate shouldn't search procfs or cd9660 file systems
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Sep 20 14:35:00 1999
>Last-Modified:
>Originator: Michael Eriksson
>Organization:
Ericsson Radio Systems AB
>Release: NetBSD-release as of early September 1999 or so
>Environment:
System: NetBSD burken 1.4.1 NetBSD 1.4.1 (EMT) #0: Mon Sep 13 09:41:04 CEST 1999 eramore@burken:/var/home/eramore/wrk/maestro2/sys/arch/i386/compile/EMT i386
>Description:
The locate script, locate.updatedb, shouldn't search procfs or cd9660
file systems (the latter is somewhat questionable, but CDs are
frequently removed, leaving bogus entries in the locate database).
>How-To-Repeat:
Run current locate.updatedb and check the created /var/db/locate.database .
>Fix:
Index: updatedb.csh
===================================================================
RCS file: /cvsroot/basesrc/usr.bin/locate/locate/updatedb.csh,v
retrieving revision 1.7
diff -u -r1.7 updatedb.csh
--- updatedb.csh 1995/08/31 22:36:35 1.7
+++ updatedb.csh 1999/09/20 21:20:36
@@ -59,8 +59,8 @@
# search locally or everything
# find ${SRCHPATHS} -print | \
-find ${SRCHPATHS} \( ! -fstype local -o -fstype fdesc -o -fstype kernfs \) -a \
- -prune -o -print | \
+find ${SRCHPATHS} \( ! -fstype local -o -fstype fdesc -o -fstype kernfs \
+ -o -fstype procfs -o -fstype cd9660 \) -a -prune -o -print | \
tr '/' '\001' | \
(sort -T "$TMPDIR" -f; echo $status > $errs) | tr '\001' '/' > $filelist
>Audit-Trail:
>Unformatted: