NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/45130 (/etc/locate.conf cannot deal with pathnames containing spaces)

At Sun, 10 Jul 2011 13:46:24 +0000 (UTC), wrote:
Subject: Re: bin/45130 (/etc/locate.conf cannot deal with pathnames containing 
> Synopsis: /etc/locate.conf cannot deal with pathnames containing spaces
> State-Changed-From-To: open->feedback
> State-Changed-By:
> State-Changed-When: Sun, 10 Jul 2011 13:46:22 +0000
> State-Changed-Why:
> Does revision 1.12 of src/usr.bin/locate/locate/ fix this?

I think so -- I haven't tested it yet, but conceptually it looks right,
and I assume you've tested it some!

Thanks for reminding me about using 'read -r', 'set', and "$@" -- I
forgot about how the latter could work with a "for" statement to keep
quoting in place!

I see you caught some other minor bugs too!  :-)

The appearance of shell_quote() reminds me of this:

or at least adding "%q" or similar to printf(1) using shquote(3).  :-)
(and maybe "%v" with several option flag using strvis(3))

Now if we could just get every other *BSD and derivative to adopt this
version of locate.conf(5) verbatim.  (OS X is of course where I first
ran into the problem, and they're still using the hokey shell variables
mechanism from FreeBSD for their /etc/locate.rc.)

Next, on to maybe adopting some of FreeBSD's fixes for managing the size
during processing of large locate lists.  I have 110 million files on my
desktop machine, apparently, and that's on a less than half-full 1TB
drive.  The find will probably run for more than 72 hours (at nice -10).

                                                Greg A. Woods

+1 250 762-7675                                RoboHack 
Planix, Inc. <>      Secrets of the Weird 

Attachment: pgpRE7IDfv7YG.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index