summaryrefslogtreecommitdiffstats
path: root/lib/libutil
AgeCommit message (Collapse)AuthorFilesLines
2019-12-31Increase BER_MAX_OID_LEN from 32 to 64. Not every snmp OID found in themartijn3-6/+6
wild fits inside 32 elements, like UsmUserEntry objects. OK rob@, claudio@
2019-11-21zero tmpout too. reminded by related diff from timtedu1-1/+2
2019-11-21overwrite the key in failure modes in case the caller doesn't check.tedu2-7/+17
ok deraadt
2019-10-25Adjust whitespace, so Ta macros are aligned vertically as already done intb1-7/+7
ober_add_string.3 and as it was before the ber -> ober rename.
2019-10-24The ber_* namespace is used by liblber since time immemorial,tb10-438/+439
so move our BER API to the unused ober_* prefix to avoid some breakage in ports. Problem diagnosed by jmatthew with ber_free() in samba, but there are many others as pointed out by sthen. tests & ok rob ok sthen (who had an almost identical diff for libutil) "go head hit it" deraadt
2019-08-30uucplock(3) is incorrectly named in some places, it is actually uu_lock(3)deraadt3-6/+6
(more unclear is if anything in ports uses this, as our base no longer does)
2019-08-15Revert previous. There were some users of the quirky behaviour that weremartijn1-2/+2
missed during code scan.
2019-08-14Fix argument list for ber_set_writecallbackmartijn1-3/+5
OK claudio@
2019-08-14wonky comma;jmc1-3/+3
2019-08-14Document that ber_scanf_elements' 'p' and 't' attribute don't eat themartijn1-2/+7
current ber element. OK claudio@ Seems sensible to deraadt@
2019-08-14Make ber_scanf_elements's 'e' attribute eat the element.martijn1-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@
2019-08-14Make sure that ber in ber_scanf_elements is not NULL before parsing formatmartijn1-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@
2019-08-05Don't use a 0 element to determine the end of an OID when comparing twomartijn1-17/+17
OIDS. This can result in false equality matches. OK claudio@
2019-08-05There's no reason why the first digit of an OID can't be 0.martijn1-4/+1
OK claudio@ "Good find" deraadt@
2019-07-03snprintf/vsnprintf return < 0 on error, rather than -1.deraadt1-7/+9
2019-06-28Actually, the C standard only guarantees that atexit(3) returns non-zeroschwarze1-2/+2
on error, so tweak previous to test "atexit(...) != 0" for portability. "OK ok ok sorry backwards" deraadt@
2019-06-28When system calls indicate an error they return -1, not some arbitraryderaadt8-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.
2019-06-28atexit() returns -1 on failurederaadt1-2/+2
2019-06-01Limit maximum number of length octets to platform independent sizeof(int32_t).rob1-2/+5
Problem noticed by bluhm@. Discussed on hackers. ok claudio@
2019-05-21whitespacerob1-2/+2
2019-05-21Cleanup some residual markup from the ber.3 days.rob5-29/+17
ok jmc@, schwarze@
2019-05-17add various missing informationschwarze1-29/+75
and remove the lie that these functions would set errno; tweaks and OK jmc@; OK rob@ on the previous version
2019-05-16Add XXX to a comment.rob1-2/+2
2019-05-16Correct errno markup. Noticed by schwarze.rob2-6/+6
Discussed with schwarze and jmc. ok schwarze
2019-05-15sort SEE ALSO;jmc2-8/+8
2019-05-15add substantial amounts of missing information;schwarze1-24/+96
OK rob@
2019-05-15Consistently make errno a .Vtrob2-6/+8
2019-05-15delete some duplicate wordsschwarze1-4/+2
2019-05-15Split ber.3 into logical parts. Further tweaking will be done in tree.rob7-456/+769
Discussed with and ok jmc@, schwarze@, claudio@
2019-05-12Enable support for the writting of BITSTRING by treating it as an OCTETSTRING.rob1-2/+1
ok claudio@
2019-05-12Enforce smallest number of contents octets for int (and enum).rob1-2/+9
ok claudio@
2019-05-12Mention #include of <sys/types.h> in synopsis.rob1-2/+3
Discussed with claudio@ and tedu@.
2019-05-12Fail early if a (universal) primitive type identifies as constructed, or if arob1-1/+17
boolean has a contents length other than 1. ok claudio@
2019-05-12Enforce minimal number of octets for tag > 30.rob1-1/+8
"sure" claudio@
2019-05-12In long form encoding, explicitly prohibit an initial length octet of 0xffrob1-1/+7
which is reserved for future use. ok claudio@
2019-05-11The BER API is currently used by ldap, ldapd, ldapctl, ypldap, snmpd, androb6-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@
2019-04-23missing dots after ".%P pp"; the case of btree(3) wasschwarze1-3/+3
reported by Fabio Scotoni <fabio at esse dot ch>; also garbage collect one .Tn while here
2019-01-25I am retiring my old email address; replace it with my OpenBSD one.millert1-3/+3
2019-01-20Change imsg header definitions to use standard types.bcook3-9/+11
ok deraadt@ claudio@
2019-01-14Calling llabs(LLONG_MIN) is undefined behavior, llvm 7.0.1 does notbluhm1-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@
2018-09-26explicitly mention local processes; from geoff hilljmc1-3/+3
ok nicm
2018-08-10delete volatile intended to silence whiny old compilers around vfork.deraadt1-2/+2
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@djm1-2/+5
2018-02-16Fix function argument names, from Abel Abraham Camarillo Ojeda via jmc@.nicm1-9/+9
2018-01-12Adjust references for sysctl(3) to sysctl(2)deraadt2-6/+6
2017-12-14Make a few internal symbols static and add a Symbols.map version scriptkettenis5-13/+107
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).zhuk1-9/+9
2017-05-03spacing (in EXAMPLES code)reyk1-3/+3
2017-04-20add previous to NAME;jmc1-2/+5
2017-04-20Add getptmfd(), fdopenpty(), fdforkpty() functions. These allow programsnicm4-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