summaryrefslogtreecommitdiff
path: root/lib/libutil
AgeCommit message (Collapse)Author
2015-12-29mention that ibuf_free() does not need a NULL check.Sebastian Benoit
2015-12-29check for NULL in ibuf_free().Sebastian Benoit
ok and slight improvement, mmcco@ ok semarie@ and encouragement tedu@ krw@
2015-12-28Switch login(3) from lseek+read/write to pread/pwrite and only do the pread()Philip Guenther
if the data is needed. Use O_CLOEXEC on the internal fd as MT paranoia. Fix cast in offset calculation; delete register keyword; prefer memset() over bzero() ok millert@
2015-12-09Add a cast to silence a compiler warning by clang on FreeBSD.tb
From Craig Rodrigues. ok tedu@
2015-12-05Do not loop on EAGAIN in imsg_read(). Better to return the error to theClaudio Jeker
caller and let him do another poll loop. This fixes spinning relayd processes seen on busy TLS relays. OK benno@ henning@
2015-11-27Remove three NULL-checks before free(). ok millert@mmcc
2015-11-26Use the backchannel for all error messages instead of syslog(3).Todd C. Miller
OK deraadt@ beck@
2015-11-11creat() -> open equiv; from Frederic NowakTheo de Raadt
2015-11-10update NAME section to include all documented functions,Jason McIntyre
or otherwise change Dt to reflect the name of an existing function; feedback/ok schwarze
2015-10-15Don't Xr flock, since that is not the locking method used.Theo de Raadt
ok millert
2015-09-14Remove useless quoting from .Fo and .Fn function names, to preventIngo Schwarze
development of a cargo cult in case people look at existing files for examples. This achieves a consistent .Fo and .Fn quoting style across the whole tree.
2015-09-14in the SYNOPSIS, make void function arguments explicitIngo Schwarze
2015-09-10reduce more .Nd to one line and kill more .TnIngo Schwarze
2015-09-10reduce .Nd to one line and kill .Tn while hereIngo Schwarze
2015-08-28Remove lies about openpty(4) searching for a free pseudo-tty by iteratingMark Kettenis
through all existing pseudo-tty devices in /dev.
2015-08-20remove cast of malloc(), since stdlib.h is includedTheo de Raadt
2015-07-19Handle malloc(0) returning NULL (which can happen on some otherNicholas Marriott
platforms) by explicitly making imsg->data = NULL when there is no data. ok deraadt
2015-07-15typo in manual page.Igor Sobrado
ok jsing@
2015-07-12Use memset instead of bzero for better portability.Nicholas Marriott
ok gilles claudio doug
2015-07-11typo in embedded code block; from Ben CornettTheo de Raadt
2015-07-03bzero cmsgbuf before using it, silences valgrind warnings.Bryan Steele
henning@ "sure"
2015-06-11The correct semantic is to check msgbuf_write() for <= 0, not just < 0.Reyk Floeter
Fix one occurence in imsg_flush() and clarify it the man page. Discussed with at least blambert@ jsg@ yasuoka@. OK gilles@
2015-06-03Do not assume that asprintf() clears the pointer on failure, whichTodd C. Miller
is non-portable. Also add missing asprintf() return value checks. OK deraadt@ guenther@ doug@
2015-04-24Use strtonum() instead of strtoul() when parsing uid/gid so we getTodd C. Miller
consistent handling of negative ids on 32bit/64bit systems. The only negative uid/gid allowed is -1 which is special-cased so it can be preserved when writing the new master.passwd file instead of being written as an unsigned number. OK deraadt@
2015-03-15tzfile.h is an internal header that should never have been installed.Todd C. Miller
What's worse, the tzfile.h that gets installed is over 20 years old and doesn't match the real tzfile.h in libc/time. This makes the tree safe for /usr/include/tzfile.h removal. The TM_YEAR_BASE define has been moved to time.h temporarily until its usage is replaced by 1900 in the tree. Actual removal of tzfile.h is pending a ports build. Based on a diff from deraadt@
2015-02-05Include stdint.h, not limits.h to get SIZE_MAX. OK guenther@Todd C. Miller
2015-01-16Move to the <limits.h> universe.Theo de Raadt
review by millert, binary checking process with doug, concept with guenther
2015-01-15remove .Tn; from Jan Stary <hans at stare dot cz>Ingo Schwarze
2015-01-12rename blocks to words. bcrypt "blocks" are unrelated to blowfish blocks,Ted Unangst
nor are they the same size.
2015-01-08declare a local version of MIN(), call it MINIMUM()Theo de Raadt
(sorry, my other changes were accidentally premature)
2015-01-08declare a local version of MIN(), call it MINIMUM()Theo de Raadt
2015-01-07Do not need sys/param.hTheo de Raadt
2014-12-30typo in comment: ouput => outputDamien Miller
2014-12-25return ERANGE instead of ENOMEM, so callers can differentiate real oomSebastian Benoit
from this case where we have a static buffer and cant realloc. ok phessler, claudio, reyk
2014-12-04use the actual function name in .Dt and NAME .Nm, not an alias;Ingo Schwarze
found with mandoc.db(5)
2014-11-25no first person in man pages.Ted Unangst
2014-09-27Explain why we deviate slightly from the PBKDF2 standard.Doug Hogan
This explanation is based off of Ted's site. Also, fix a comment from the SHA-1 version. ok tedu@
2014-09-08obvious cases of missing .An;Ingo Schwarze
found with the new mandoc(1) MANDOCERR_AN_MISSING warning; no text changes
2014-08-25Delete secret or secret-derived data with explicit_bzero.Doug Hogan
concept ok deraadt@ diff looks ok tedu@
2014-08-15Use O_CLOEXEC wherever we open a file and then call fcntl(F_SETFD, FD_CLOEXEC)Philip Guenther
on it, simplifying error checking, reducing system calls, and improving thread-safety for libraries. ok miod@
2014-07-13include stdint.h for standard ints. from Jean-Philippe OuelletTed Unangst
2014-06-30sys/types.h rather than sys/param.h, where applicable. avoid overreach.Theo de Raadt
2014-06-30sort includes much more sensiblyTheo de Raadt
2014-06-30limits.h rather than sys/param.hTheo de Raadt
2014-06-02merge ohash into 1 source file, then we can revisit next roadmap items.Theo de Raadt
ok espie
2014-05-13zap trailing whitespace;Jason McIntyre
2014-05-12move the ohash functions into libutil by popular demand.Marc Espie
It's not a standard interface, so it doesn't belong in libc. I hate duplicating the code in client programs, so do beck@, kettenis@, schwarze@, millert@, miod@... and they agree with libutil.
2014-04-08fix an error in the stride calculations. the math only works for multiplesTed Unangst
of the stride. don't overwrite past the end of the buffer, and also save that amount for later so the array is completely filled. ok deraadt djm reported by Dmitry Chestnykh (dchest)
2014-01-31explicit_bzero where usefulTed Unangst
2014-01-21obvious .Pa fixes; found with mandocdb(8)Ingo Schwarze