summaryrefslogtreecommitdiff
path: root/lib/libutil
AgeCommit message (Collapse)Author
2016-10-15zap trailing whitespace;Jason McIntyre
2016-10-10Fixup the example for msgbuf_write() and imsg_read() to check theReyk Floeter
error cases for -1 and 0 explicitly (it initially only checked for -1, I updated it to also check for 0, and rzalamena@ figured out that 0 has to be checked in a differently). OK millert@ rzalamena@
2016-08-30Use a constant format string and output the variable part with %sPhilip Guenther
ok krw@ millert@
2016-08-30Use O_CLOEXEC when opening fds local to a functionPhilip Guenther
ok jca@ krw@
2016-08-27Pull in <stdio.h> for NULLPhilip Guenther
ok deraadt@
2016-08-14Refer to /etc/passwd consistently as the "legacy password file" andTheo Buehler
remove some references to differences between versions 6 and 7. ok jmc, millert, tedu
2016-07-16Fix example: long long should be print with %lldJeremie Courreges-Anglas
2016-05-18Remove obsolete caveat. OK deraadt@Todd C. Miller
2016-03-30for some time now mandoc has not required MLINKS to functionJason McIntyre
correctly - logically complete that now by removing MLINKS from base; authors need only to ensure there is an entry in NAME for any function/ util being added. MLINKS will still work, and remain for perl to ease upgrades; ok nicm (curses) bcook (ssl) ok schwarze, who provided a lot of feedback and assistance ok tb natano jung
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