summaryrefslogtreecommitdiffstats
path: root/lib/libutil (follow)
Commit message (Collapse)AuthorAgeFilesLines
* uucplock(3) is incorrectly named in some places, it is actually uu_lock(3)deraadt2019-08-303-6/+6
| | | | (more unclear is if anything in ports uses this, as our base no longer does)
* Revert previous. There were some users of the quirky behaviour that weremartijn2019-08-151-2/+2
| | | | missed during code scan.
* Fix argument list for ber_set_writecallbackmartijn2019-08-141-3/+5
| | | | OK claudio@
* wonky comma;jmc2019-08-141-3/+3
|
* Document that ber_scanf_elements' 'p' and 't' attribute don't eat themartijn2019-08-141-2/+7
| | | | | | | current ber element. OK claudio@ Seems sensible to deraadt@
* Make ber_scanf_elements's 'e' attribute eat the element.martijn2019-08-141-2/+2
| | | | | | | | Right now all consumers use 'e' at the end of the list, so no regressions should be introduced. OK claudio@ Seems sensible to deraadt@
* Make sure that ber in ber_scanf_elements is not NULL before parsing formatmartijn2019-08-141-3/+3
| | | | | | | | | where ber is utilized. This also allows us to remove the ber->be_next check, which can cause weird behaviour, because a NULL be_next would result in parsing the last element twice. OK claudio@ on previous version OK rob@
* Don't use a 0 element to determine the end of an OID when comparing twomartijn2019-08-051-17/+17
| | | | | | OIDS. This can result in false equality matches. OK claudio@
* There's no reason why the first digit of an OID can't be 0.martijn2019-08-051-4/+1
| | | | | OK claudio@ "Good find" deraadt@
* snprintf/vsnprintf return < 0 on error, rather than -1.deraadt2019-07-031-7/+9
|
* Actually, the C standard only guarantees that atexit(3) returns non-zeroschwarze2019-06-281-2/+2
| | | | | on error, so tweak previous to test "atexit(...) != 0" for portability. "OK ok ok sorry backwards" deraadt@
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-288-24/+24
| | | | | | value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
* atexit() returns -1 on failurederaadt2019-06-281-2/+2
|
* Limit maximum number of length octets to platform independent sizeof(int32_t).rob2019-06-011-2/+5
| | | | | | Problem noticed by bluhm@. Discussed on hackers. ok claudio@
* whitespacerob2019-05-211-2/+2
|
* Cleanup some residual markup from the ber.3 days.rob2019-05-215-29/+17
| | | | ok jmc@, schwarze@
* add various missing informationschwarze2019-05-171-29/+75
| | | | | and remove the lie that these functions would set errno; tweaks and OK jmc@; OK rob@ on the previous version
* Add XXX to a comment.rob2019-05-161-2/+2
|
* Correct errno markup. Noticed by schwarze.rob2019-05-162-6/+6
| | | | Discussed with schwarze and jmc. ok schwarze
* sort SEE ALSO;jmc2019-05-152-8/+8
|
* add substantial amounts of missing information;schwarze2019-05-151-24/+96
| | | | OK rob@
* Consistently make errno a .Vtrob2019-05-152-6/+8
|
* delete some duplicate wordsschwarze2019-05-151-4/+2
|
* Split ber.3 into logical parts. Further tweaking will be done in tree.rob2019-05-157-456/+769
| | | | Discussed with and ok jmc@, schwarze@, claudio@
* Enable support for the writting of BITSTRING by treating it as an OCTETSTRING.rob2019-05-121-2/+1
| | | | ok claudio@
* Enforce smallest number of contents octets for int (and enum).rob2019-05-121-2/+9
| | | | ok claudio@
* Mention #include of <sys/types.h> in synopsis.rob2019-05-121-2/+3
| | | | Discussed with claudio@ and tedu@.
* Fail early if a (universal) primitive type identifies as constructed, or if arob2019-05-121-1/+17
| | | | | | boolean has a contents length other than 1. ok claudio@
* Enforce minimal number of octets for tag > 30.rob2019-05-121-1/+8
| | | | "sure" claudio@
* In long form encoding, explicitly prohibit an initial length octet of 0xffrob2019-05-121-1/+7
| | | | | | which is reserved for future use. ok claudio@
* The BER API is currently used by ldap, ldapd, ldapctl, ypldap, snmpd, androb2019-05-116-5/+1984
| | | | | | | | | | | | snmpctl. Separate copies of ber.[ch] have existed and been maintained in sync in ldap, ldapd, ypldap and snmpd. This commit moves the BER API into /usr/lib/libutil. All current consumers already link libutil. ldapd and snmpd regress passes, and release builds. With help from tb@ and guenther@. ok deraadt@, tb@
* missing dots after ".%P pp"; the case of btree(3) wasschwarze2019-04-231-3/+3
| | | | | reported by Fabio Scotoni <fabio at esse dot ch>; also garbage collect one .Tn while here
* I am retiring my old email address; replace it with my OpenBSD one.millert2019-01-251-3/+3
|
* Change imsg header definitions to use standard types.bcook2019-01-203-9/+11
| | | | ok deraadt@ claudio@
* Calling llabs(LLONG_MIN) is undefined behavior, llvm 7.0.1 does notbluhm2019-01-141-5/+9
| | | | | | 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@
* explicitly mention local processes; from geoff hilljmc2018-09-261-3/+3
| | | | ok nicm
* delete volatile intended to silence whiny old compilers around vfork.deraadt2018-08-101-2/+2
| | | | | This variable is only used in the parent context so there is no issue. ok kettenis
* constrain fractional part to [0-9] (less confusing to static analysis); ok ian@djm2018-05-141-2/+5
|
* Fix function argument names, from Abel Abraham Camarillo Ojeda via jmc@.nicm2018-02-161-9/+9
|
* Adjust references for sysctl(3) to sysctl(2)deraadt2018-01-122-6/+6
|
* Make a few internal symbols static and add a Symbols.map version scriptkettenis2017-12-145-13/+107
| | | | | | to control which symbols are exported from the shared library. ok guenther@, deraadt@, jca@
* It's the imsg_compose(3) who accepts 'fd' argument, not imsg_create(3).zhuk2017-12-061-9/+9
|
* spacing (in EXAMPLES code)reyk2017-05-031-3/+3
|
* add previous to NAME;jmc2017-04-201-2/+5
|
* Add getptmfd(), fdopenpty(), fdforkpty() functions. These allow programsnicm2017-04-204-19/+96
| | | | | | | | | to separate the open(/dev/ptm) from the ioctl(PTMGET) for privilege separation or pledge(). Based on a diff from reyk@. ok deraadt millert
* use freezero() instead of explicit_bzero+freederaadt2017-04-181-3/+2
|
* Use freezero(3) for the imsg framework in imsg_free(3) and ibuf_free(3).reyk2017-04-112-4/+4
| | | | | | | | | | 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@
* Use C99 types (uint32_t) instead of BSD (u_int32_t) - the former arenicm2017-03-243-37/+37
| | | | | | more portable. Add stdint.h to the headers in imsg_init(3). No objections from millert@.
* Grow buffers using recallocarray, to avoid the potential dribble thatderaadt2017-03-171-2/+2
| | | | | | | 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.
* Fix overly-conservative overflow checks on mulitplications and add checksdtucker2017-03-161-3/+11
| | | | | on additions. This allows scan_scaled to work up to +/-LLONG_MAX (LLONG_MIN will still be flagged as a range error). ok millert@