summaryrefslogtreecommitdiff
path: root/lib/libutil
AgeCommit message (Collapse)Author
2019-01-25I am retiring my old email address; replace it with my OpenBSD one.Todd C. Miller
2019-01-20Change imsg header definitions to use standard types.Brent Cook
ok deraadt@ claudio@
2019-01-14Calling llabs(LLONG_MIN) is undefined behavior, llvm 7.0.1 does notAlexander Bluhm
work with our old code. In fmt_scaled() move the check before calling llabs(). found by regress/lib/libutil/fmt_scaled; OK deraadt@ millert@ tedu@
2018-09-26explicitly mention local processes; from geoff hillJason McIntyre
ok nicm
2018-08-10delete volatile intended to silence whiny old compilers around vfork.Theo de Raadt
This variable is only used in the parent context so there is no issue. ok kettenis
2018-05-14constrain fractional part to [0-9] (less confusing to static analysis); ok ian@Damien Miller
2018-02-16Fix function argument names, from Abel Abraham Camarillo Ojeda via jmc@.Nicholas Marriott
2018-01-12Adjust references for sysctl(3) to sysctl(2)Theo de Raadt
2017-12-14Make a few internal symbols static and add a Symbols.map version scriptMark Kettenis
to control which symbols are exported from the shared library. ok guenther@, deraadt@, jca@
2017-12-06It's the imsg_compose(3) who accepts 'fd' argument, not imsg_create(3).Vadim Zhukov
2017-05-03spacing (in EXAMPLES code)Reyk Floeter
2017-04-20add previous to NAME;Jason McIntyre
2017-04-20Add getptmfd(), fdopenpty(), fdforkpty() functions. These allow programsNicholas Marriott
to separate the open(/dev/ptm) from the ioctl(PTMGET) for privilege separation or pledge(). Based on a diff from reyk@. ok deraadt millert
2017-04-18use freezero() instead of explicit_bzero+freeTheo de Raadt
2017-04-11Use freezero(3) for the imsg framework in imsg_free(3) and ibuf_free(3).Reyk Floeter
In our privsep model, imsg is often used to transport sensitive information between processes. But a process might free an imsg, and reuse the memory for a different thing. iked uses some explicit_bzero() to clean imsg-buffer but doing it in the library with the freezero() is less error-prone and also benefits other daemons. OK deraadt@ jsing@ claudio@
2017-03-24Use C99 types (uint32_t) instead of BSD (u_int32_t) - the former areNicholas Marriott
more portable. Add stdint.h to the headers in imsg_init(3). No objections from millert@.
2017-03-17Grow buffers using recallocarray, to avoid the potential dribble thatTheo de Raadt
the standard realloc*() functions can leave behind. imsg buffers are sometimes used in protocol stacks which require some secrecy, and layering violations would be needed to resolve this issue otherwise. Discussed with many.
2017-03-16Fix overly-conservative overflow checks on mulitplications and add checksDarren Tucker
on additions. This allows scan_scaled to work up to +/-LLONG_MAX (LLONG_MIN will still be flagged as a range error). ok millert@
2017-03-15Collapse underflow and overflow checks into a single block.Darren Tucker
ok djm@ millert@
2017-03-15Catch integer underflow in scan_scaled reported by Nicolas Iooss.Darren Tucker
ok deraadt@ djm@
2017-03-11fix signed integer overflow in scan_scaled. Found by Nicolas IoossDamien Miller
using AFL against ssh_config. ok deraadt@ millert@
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