summaryrefslogtreecommitdiff
path: root/usr.bin/locate
AgeCommit message (Collapse)Author
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
2014-11-16correct type in sizeof by switching to sizeof(*ptr). (harmless)Ted Unangst
from Nicolas Bedos
2014-10-08userland reallocarray audit.Doug Hogan
Replace malloc() and realloc() calls that may have integer overflow in the multiplication of the size argument with reallocarray(). ok deraadt@
2013-11-17Include unistd.h as it is the standard location for getopt().Okan Demirmen
OK millert@
2012-04-13Don't try to mmap a 0-length file.Antoine Jacoutot
input/ok deraadt@
2010-10-25Add missing FNM_CASEFOLD flag to fnmatch() when locate is run in caseTodd C. Miller
insensitive mode. From Geoff Steckel. OK deraadt@
2010-07-15More delimiters that need quoting inside macros, hunted down by jmc@,Ingo Schwarze
who asked me to commit because he is just running out of the door.
2009-12-10Eliminate the confusing term "find codes database" which is used nowhere else.Ingo Schwarze
It made people miss the fact we are just talking about /var/db/locate.database. Expicitely say that output will be sent to that file. Problem noted by, feedback and OK jmc@.
2009-10-28rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andTheo de Raadt
unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
2009-06-04error out if count gets out of bounds. Happens with corrupted databases,Marc Espie
better than a buffer underflow and a segfault. okay millert@
2008-10-01in getrusage(), use RUSAGE_SELF for the current process rather than 0Kevin Lo
ok millert@
2008-07-26add -b to SYNOPSIS and usage();Jason McIntyre
2008-07-26Add -b switch for matching on the last part of the path only.Pierre-Yves Ritschard
ok landry@, otto liked the idea and the original diff, ``do it'' deraadt@
2007-09-02use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsgTheo de Raadt
2007-06-25some wording improvements for -d and -m; from Jacek MasiulaniecJason McIntyre
2007-05-31convert to new .Dd format;Jason McIntyre
2007-04-13the ellipsis in the synopsis of this command is not an optionalIgor Sobrado
argument. the argument name for -l must be the same in the synopsis and the options list. written with help by jmc@ ok by jmc@
2007-03-18It's not smart to use a space as a field separator when a space canOtto Moerbeek
be part of a bigram. So switch to tab and as a bonus detect in locate.code if the bigram array is too short. Problem seen by Han Boetes and other people with too big mps3 collections; these typically contain lots of file names with spaces in them. ok jasper@
2007-03-15simplify synopsis/usage() and sort options. also fixes documentation/5411Jason McIntyre
from han
2007-02-19- Check for fgets failure.Ray Lai
- Pass sizeof(buf) to fgets. - Only print what was read. - Simplify error checking while printing bigrams. Inspired by diff from Charles Longeau <chl at tuxfamily dot org> long ago. OK millert@ and moritz@.
2006-08-05Remove "with with" typos.Ray Lai
Fix by Tobias Stoeckmann <tobias at bugol dot de> in PR 5193.
2004-04-08sort options and sync usage();Jason McIntyre
2003-11-09Typos in comments from Jared Yanovich <jjy2+ at pitt dot edu>Otto Moerbeek
2003-11-08typos from Jonathon Gray;Jason McIntyre
2003-09-29knfTheo de Raadt
2003-09-29realloc fix; ok henning cloderTheo de Raadt
2003-09-25- indent and literal for examplesJason McIntyre
- sort FILES - .Xr weekly 8
2003-09-02escape punctuation;Jason McIntyre
ok deraadt@
2003-07-10add missing includesDavid Krause
ok deraadt@ tedu@
2003-07-07protosTheo de Raadt
2003-06-29Previous commit resulted in a zero-length locate db which I didn'tTodd C. Miller
notice since /etc/weekly doesn't install a 0-length file. So, go back to using print, not printf, but set ORS to NULL so we don't get those extra newlines.
2003-06-28Fix previous commit that broke locate. Unlike printf, print writes aTodd C. Miller
newline. So go back to using printf but use an explicit %s format to make things safe.
2003-06-24use print, not printf in awk; from ak at freeshellTodd C. Miller
2003-06-03Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2003-02-08When creating > 1 files with mktemp(1), make sure that if the creationPeter Valchev
of the n'th (n>1) file fails, the previous ones get removed before exit(1) Idea by jason; ok millert deraadt
2003-02-03typos;Jason McIntyre
ipsecadm(8): examples ho@ help and ok markus@
2003-01-02typo; jmc at prioris.mini.pw.edu.plHenning Brauer
2002-10-04Move the -H to the sort variable declaration itself since the -HTodd C. Miller
flag is non-standard. This allows people to use a different sort (like GNU sort) if they want via the sort environment variable. mickey@ OK
2002-10-04sort -H for modern large filesystems; from McikyeBSD; millert@ ok and ↵Michael Shalayeff
multiple ppl testing
2002-07-07enviroment -> environmentJan-Uwe Finck
2002-06-24prevent potential unaligned access error; ok espie@, pval@Christian Weisgerber
2002-03-14Remove \n from err/errx/warn/warnx().Mike Pechkin
millert@ ok
2002-02-17Manual cleanup of remaining userland __P use (excluding packages maintained ↵Todd C. Miller
outside the tree)
2002-02-16Part one of userland __P removal. Done with a simple regexp with some minor ↵Todd C. Miller
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
2001-11-19kill more registersMike Pechkin
millert@ ok
2001-05-11-1 -> MAP_FAILEDArtur Grabowski
2000-11-10- Section shuffling: comply to the section ordering outlined in mdoc(7).Aaron Campbell
- Some .Nm trimming. - .Sh AUTHOR -> .Sh AUTHORS - Other miscellaneous fixes here and there.
2000-11-09Change all option list specifications to ".Bl -tag -width Ds". Most manAaron Campbell
pages just needed their -width parameter tweaked to "Ds", which provides a nice width of 6 constant characters. For consistency more than anything.
2000-07-06Insert more missing .El directives. Our troff really should identify these andAaron Campbell
spit out a warning.
2000-04-18Missed a few.Aaron Campbell