summaryrefslogtreecommitdiffstats
path: root/lib/libutil (follow)
Commit message (Collapse)AuthorAgeFilesLines
* zap trailing whitespace;jmc2016-10-151-3/+3
|
* Fixup the example for msgbuf_write() and imsg_read() to check thereyk2016-10-101-5/+11
| | | | | | | | 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@
* Use a constant format string and output the variable part with %sguenther2016-08-301-11/+11
| | | | ok krw@ millert@
* Use O_CLOEXEC when opening fds local to a functionguenther2016-08-304-12/+13
| | | | ok jca@ krw@
* Pull in <stdio.h> for NULLguenther2016-08-272-2/+4
| | | | ok deraadt@
* Refer to /etc/passwd consistently as the "legacy password file" andtb2016-08-142-8/+10
| | | | | | remove some references to differences between versions 6 and 7. ok jmc, millert, tedu
* Fix example: long long should be print with %lldjca2016-07-161-3/+3
|
* Remove obsolete caveat. OK deraadt@millert2016-05-181-9/+2
|
* for some time now mandoc has not required MLINKS to functionjmc2016-03-301-57/+1
| | | | | | | | | | | | 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
* mention that ibuf_free() does not need a NULL check.benno2015-12-291-2/+5
|
* check for NULL in ibuf_free().benno2015-12-291-1/+3
| | | | | ok and slight improvement, mmcco@ ok semarie@ and encouragement tedu@ krw@
* Switch login(3) from lseek+read/write to pread/pwrite and only do the pread()guenther2015-12-282-14/+15
| | | | | | | | 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@
* Add a cast to silence a compiler warning by clang on FreeBSD.tb2015-12-091-2/+2
| | | | | From Craig Rodrigues. ok tedu@
* Do not loop on EAGAIN in imsg_read(). Better to return the error to theclaudio2015-12-052-9/+7
| | | | | caller and let him do another poll loop. This fixes spinning relayd processes seen on busy TLS relays. OK benno@ henning@
* Remove three NULL-checks before free(). ok millert@mmcc2015-11-273-11/+7
|
* Use the backchannel for all error messages instead of syslog(3).millert2015-11-261-16/+15
| | | | OK deraadt@ beck@
* creat() -> open equiv; from Frederic Nowakderaadt2015-11-111-2/+2
|
* update NAME section to include all documented functions,jmc2015-11-101-3/+3
| | | | | | or otherwise change Dt to reflect the name of an existing function; feedback/ok schwarze
* Don't Xr flock, since that is not the locking method used.deraadt2015-10-151-3/+2
| | | | ok millert
* Remove useless quoting from .Fo and .Fn function names, to preventschwarze2015-09-141-3/+3
| | | | | | 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.
* in the SYNOPSIS, make void function arguments explicitschwarze2015-09-142-7/+7
|
* reduce more .Nd to one line and kill more .Tnschwarze2015-09-101-4/+3
|
* reduce .Nd to one line and kill .Tn while hereschwarze2015-09-102-10/+6
|
* Remove lies about openpty(4) searching for a free pseudo-tty by iteratingkettenis2015-08-281-12/+6
| | | | through all existing pseudo-tty devices in /dev.
* remove cast of malloc(), since stdlib.h is includedderaadt2015-08-201-2/+2
|
* Handle malloc(0) returning NULL (which can happen on some othernicm2015-07-191-2/+4
| | | | | platforms) by explicitly making imsg->data = NULL when there is no data. ok deraadt
* typo in manual page.sobrado2015-07-151-3/+3
| | | | ok jsing@
* Use memset instead of bzero for better portability.nicm2015-07-122-10/+10
| | | | ok gilles claudio doug
* typo in embedded code block; from Ben Cornettderaadt2015-07-111-3/+3
|
* bzero cmsgbuf before using it, silences valgrind warnings.brynet2015-07-032-2/+4
| | | | henning@ "sure"
* The correct semantic is to check msgbuf_write() for <= 0, not just < 0.reyk2015-06-112-9/+9
| | | | | | | | Fix one occurence in imsg_flush() and clarify it the man page. Discussed with at least blambert@ jsg@ yasuoka@. OK gilles@
* Do not assume that asprintf() clears the pointer on failure, whichmillert2015-06-031-3/+2
| | | | | is non-portable. Also add missing asprintf() return value checks. OK deraadt@ guenther@ doug@
* Use strtonum() instead of strtoul() when parsing uid/gid so we getmillert2015-04-241-49/+52
| | | | | | | 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@
* tzfile.h is an internal header that should never have been installed.millert2015-03-151-4/+5
| | | | | | | | | 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@
* Include stdint.h, not limits.h to get SIZE_MAX. OK guenther@millert2015-02-051-2/+2
|
* Move to the <limits.h> universe.deraadt2015-01-161-3/+4
| | | | review by millert, binary checking process with doug, concept with guenther
* remove .Tn; from Jan Stary <hans at stare dot cz>schwarze2015-01-153-18/+10
|
* rename blocks to words. bcrypt "blocks" are unrelated to blowfish blocks,tedu2015-01-121-6/+6
| | | | nor are they the same size.
* declare a local version of MIN(), call it MINIMUM()deraadt2015-01-081-2/+4
| | | | (sorry, my other changes were accidentally premature)
* declare a local version of MIN(), call it MINIMUM()deraadt2015-01-081-2/+4
|
* Do not need sys/param.hderaadt2015-01-072-4/+3
|
* typo in comment: ouput => outputdjm2014-12-301-2/+2
|
* return ERANGE instead of ENOMEM, so callers can differentiate real oombenno2014-12-251-2/+2
| | | | | | from this case where we have a static buffer and cant realloc. ok phessler, claudio, reyk
* use the actual function name in .Dt and NAME .Nm, not an alias;schwarze2014-12-041-4/+4
| | | | found with mandoc.db(5)
* no first person in man pages.tedu2014-11-251-3/+3
|
* Explain why we deviate slightly from the PBKDF2 standard.doug2014-09-271-3/+5
| | | | | | | This explanation is based off of Ted's site. Also, fix a comment from the SHA-1 version. ok tedu@
* obvious cases of missing .An;schwarze2014-09-082-8/+13
| | | | | found with the new mandoc(1) MANDOCERR_AN_MISSING warning; no text changes
* Delete secret or secret-derived data with explicit_bzero.doug2014-08-251-2/+2
| | | | | concept ok deraadt@ diff looks ok tedu@
* Use O_CLOEXEC wherever we open a file and then call fcntl(F_SETFD, FD_CLOEXEC)guenther2014-08-151-10/+3
| | | | | | | on it, simplifying error checking, reducing system calls, and improving thread-safety for libraries. ok miod@
* include stdint.h for standard ints. from Jean-Philippe Ouellettedu2014-07-131-1/+2
|