summaryrefslogtreecommitdiff
path: root/usr.bin/locate
AgeCommit message (Collapse)Author
2023-01-20locate.updatedb: Add -- to the invocation of locate.codeuwe
A bigram can start with a dash/minus, don't let getopt misinterpret it as an option. From Hakan Engvall in PR misc/57191
2020-04-25Little clean up: use getopts and don't use ``. Suggested by kre@.simonb
2020-02-06Add support for specifying an alternate locate.updatedb config file.simonb
2019-10-13fool gcc with strncpy.christos
2018-05-14locate: fix support for multiple databaseslukem
Ensure that the first database is correctly added when more than one database is provided. Fixes problem I introduced in rev 1.17 on 2009-04-12, and noticed recently by Simon.
2017-07-03Remove workaround for ancient HTML generation code.wiz
2016-09-05Drop main() prototype.sevan
2014-08-04Synchronise several shell_quote implementations, and:apb
* Elide some unnecessary pairs of quotation marks, to improve readability. For example, shell_quote "''" is now \'\' instead of ''\'''\'''. * Don't add quotes around words that contain only safe characters, to improve readability. * LC_COLLATE=C to prevent [a-zA-Z] from matching non-ASCII characters. * Use ${SED} if defined.
2011-09-04ANSIfy + static + __deadjoerg
2011-07-13Comments and white space changes, inspired by Greg Woods' remarksapb
in PR 45130, but not directly copied from the patch in the PR.
2011-07-13Fix error in previous: The first character of $i should be removedapb
only if it is '!', but it was removed in the wrong case branch.
2011-07-10Allow quoting of embedded shell metacharacters in locate.conf(5).apb
The shell_quote function here is identical to that in postinstall and etcupdate. This should fix PR 45130 from Greg Woods.
2010-05-14Reorder sections to canonical order.joerg
2009-11-17ANSIfy, sprinkle "const" in some obvious casesdrochner
2009-04-12Fix WARNS=4 issueslukem
2008-09-22sign over my copyright to TNFhubertf
2008-07-21Remove the \n and tabs from the __COPYRIGHT() strings.lukem
Tweak to use a consistent format.
2007-04-29fix typosmsaitoh
2006-04-23Redo the previous change so that we can ignore access errors from find,christos
but also tell when writing to the output file failed, by using a pipeline to cat. While here change `` to $(). Otherwise this would always fail since it is ran as nobody and therefore it cannot access some files. Reported by smb.
2006-02-26This patch removes one possible cause for a prolonged "out of disk"dyoung
condition on /tmp/: if creating the file list ($FILELIST) fails, immediately exit with a non-zero result code. This fixes a bug where, if the file list filled /tmp/, updatedb.sh would nevertheless run for several minutes before it removed the file list as it quit.
2006-02-12PR/32799: David H. Gutteridge: Apparent off-by-one error in locate(1) causeschristos
incorrect behaviour when entries with the maximum path length are encountered
2005-10-05Make it clear where this program can be found.hubertf
Requested by wiz.
2005-10-05Add locate.updatedb(8).hubertf
Discovered missing while sorting things out for BSDcertification.org. Ran through wizd(8).
2004-04-19Rework "ignorefs" behaviour:lukem
* types are added to (rather than overriding) the default list * Still use "ignorefs none" to clear the list (including the default list) * Fix argument parsing when using "none" This makes "ignorefs" much more useful if you just want to add another fstype to the default list. Simplify variable assignment.
2004-04-19xref locate.conf(5)lukem
2004-02-06Use /etc/locate.conf for configuration, per discussion at tech-userlevel.itohy
2003-08-07Move UCB-licensed code from 4-clause to 3-clause licence.agc
Patches provided by Joel Baker in PR 22365, verified by myself.
2003-04-07remove -g accidentally committedchristos
2003-04-07- stricter bad file format checkschristos
- KNF - use LIST macros
2003-04-05Replace > by \*[Gt] for HTML output.wiz
2003-04-05Move exit status information to EXIT STATUS section, and note that weperry
exit >0 if errors such as missing or corrupted database files are encountered.
2003-04-051) print an error and exit if fed a directory as a databaseperry
Patch submitted by Soren Jacobsen in PR bin/21016, but heavily edited by me. 2) error and exit out if you can't open a database instead of just warning and going on.
2003-04-03PR/13629: Rick Byers: Don't trust data from the database file.christos
2002-09-18makefile delint. use NETBSDSRCDIR as appropriatelukem
2002-05-05Quote $FILELIST and $BIGRAMS consistently. Especially the latterkim
can elicit "usage" from locate.code at runtime.
2001-12-12MKfoo=no -> NOfootv
2001-12-01Empty line -> .Pp.wiz
2001-12-01Whitespace cleanup.wiz
2001-11-07exclude cd9660 and procfs as well. fixes PRs [bin/8454] and [bin/14006]lukem
2001-06-18use mktemp(1) to safely create the temporary file.lukem
fixes [security/12915] from David Sainty.
2001-05-14Trap also SIGHUP and SIGQUIT. Suggested by Jim Bernard & Christosjdolecek
some time ago.
2001-03-12Don't exit with status 1 for successfull (non-interrupted) run.jdolecek
Reported and patch provided in bin/12372 by Jim Bernard.
2000-05-06Do not count the end of a line in the bigram table. Newlines are strippedmycroft
before coding anyway, and the bigram output was screwing up (and often pessimising) the table.
2000-05-06Adjust the previous change to not generate garbage databases.mycroft
2000-04-29Always wrap the bigram string in double quotes, in case it contains spaces.mycroft
Some other trivial cleanup.
2000-04-20Convert updatedb script from C-shell to bourne shell.jdolecek
2000-03-22Include <string.h> to get a prototype for memset(). Fixes buildsimonb
problems on alpha noted by Tim Rightnour on current-users.
2000-03-20locate.bigram does all the bigram processing itself now; store it's resultjdolecek
in local variable and pass the value to locate.code directly instead of using temporary file always remove $filelist, even if an error is encountered
2000-03-20the first args is expected to be the bigrams array, instead of name ofjdolecek
file holding it
2000-03-20Do all bigram processing here, instead of in updatedb.csh; savesjdolecek
a few cycles (it's runs like 2 seconds instead of 16) and the algorithm is hopefully a bit more clear