| #
ff59764d |
| 26-Nov-2024 |
claudio <claudio@openbsd.org> |
Adjust the reader callback API to return an ibuf and to also claim the fd which is passed as argument.
This is needed because on Linux the control messages used to pass fds are not acting as a barri
Adjust the reader callback API to return an ibuf and to also claim the fd which is passed as argument.
This is needed because on Linux the control messages used to pass fds are not acting as a barrier and ensuring that the fd is passed with the first byte of the read call. Instead we need to mark the message that holds to fd and the scan for that message in the stream.
While there also adjust imsgbuf_set_maxsize() to return an int to indicate an error if the requested size is out of range.
Problem reported and fix tested by nicm@ on a linux system. OK tb@
show more ...
|
| #
728ad841 |
| 21-Nov-2024 |
claudio <claudio@openbsd.org> |
Bump libutil major
OK tb@
|
| #
4658a150 |
| 12-Dec-2023 |
claudio <claudio@openbsd.org> |
Extend imsg and ibuf API with useful getter methods
For ibufs: - various getters for ibufs (ibuf_get* and ibuf_skip) - additional ibuf set/add functions that don't alter byte order - ibuf_truncate a
Extend imsg and ibuf API with useful getter methods
For ibufs: - various getters for ibufs (ibuf_get* and ibuf_skip) - additional ibuf set/add functions that don't alter byte order - ibuf_truncate and ibuf_rewind - ibuf_from_buffer and ibuf_from_ibuf to populate a reader ibuf - a getter for the msgbuf queuelen
For imsg: - various getters for imsg (especially imsg_get_data() which can be used in most cases as a simple one call api with all error checks). All the imsg.hdr fields can also be accessed by getters. - The imsg data is now actually an ibuf but the old imsg.data pointer is kept for now to not break every imsg application. - Introduce imsg_forward to simply forward a message from one channel to an other (used in the control socket code).
Since this requires a major bump take the oportunity to also cleanup some function signatures to use size_t for length fields. Also internal data structures are removed from the public header.
With and OK tb@
show more ...
|
| #
19778535 |
| 19-Jun-2023 |
claudio <claudio@openbsd.org> |
Improve the ibuf API by adding these functions: Functions extending ibuf_add to work with more specific data types ibuf_add_buf, ibuf_add_zero, ibuf_add_n8, ibuf_add_n16, ibuf_add_n32, ibuf_add_n
Improve the ibuf API by adding these functions: Functions extending ibuf_add to work with more specific data types ibuf_add_buf, ibuf_add_zero, ibuf_add_n8, ibuf_add_n16, ibuf_add_n32, ibuf_add_n64 Functions replacing ibuf_seek where data at a specific offset is modified ibuf_set, ibuf_set_n8, ibuf_set_n16, ibuf_set_n32, ibuf_set_n64 Functions to check, get and set the filedescriptor stored on the ibuf ibuf_fd_avail, ibuf_fd_get, ibuf_fd_set and ibuf_data() to access the data buffer, to be used together with ibuf_size()
On top of this add an optimized imsg_compose_ibuf() where an ibuf is wrapped into an imsg in an efficent way.
Finally remove msgbuf_drain since it is not used by anything outside of the ibuf code. Because of this removal bump the major of libutil.
Remove ibuf_data() in iked since the same function is now provided by libutil. OK tb@
show more ...
|
| #
8455d632 |
| 31-Oct-2021 |
tb <tb@openbsd.org> |
bump major after struct size change
|
| #
63beb567 |
| 29-Aug-2021 |
martijn <martijn@openbsd.org> |
Add ober_dup. Needed for upcoming SNMPv3 support for trap receiver in snmpd(8).
OK jmatthew@ OK deraadt@ for bumping libutil now.
|
| #
f8994d87 |
| 31-Dec-2019 |
martijn <martijn@openbsd.org> |
Increase BER_MAX_OID_LEN from 32 to 64. Not every snmp OID found in the wild fits inside 32 elements, like UsmUserEntry objects.
OK rob@, claudio@
|
| #
696b5899 |
| 24-Oct-2019 |
tb <tb@openbsd.org> |
The ber_* namespace is used by liblber since time immemorial, 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,
The ber_* namespace is used by liblber since time immemorial, 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
show more ...
|
| #
d4b95dc4 |
| 11-May-2019 |
rob <rob@openbsd.org> |
The BER API is currently used by ldap, ldapd, ldapctl, ypldap, snmpd, and snmpctl. Separate copies of ber.[ch] have existed and been maintained in sync in ldap, ldapd, ypldap and snmpd.
This commit
The BER API is currently used by ldap, ldapd, ldapctl, ypldap, snmpd, and 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@
show more ...
|
| #
8c897735 |
| 14-Dec-2017 |
kettenis <kettenis@openbsd.org> |
Make a few internal symbols static and add a Symbols.map version script to control which symbols are exported from the shared library.
ok guenther@, deraadt@, jca@
|
| #
c2a62bf3 |
| 20-Apr-2017 |
nicm <nicm@openbsd.org> |
Add getptmfd(), fdopenpty(), fdforkpty() functions. These allow programs to separate the open(/dev/ptm) from the ioctl(PTMGET) for privilege separation or pledge().
Based on a diff from reyk@.
ok d
Add getptmfd(), fdopenpty(), fdforkpty() functions. These allow programs to separate the open(/dev/ptm) from the ioctl(PTMGET) for privilege separation or pledge().
Based on a diff from reyk@.
ok deraadt millert
show more ...
|
| #
42dcb487 |
| 12-May-2014 |
espie <espie@openbsd.org> |
move the ohash functions into libutil by popular demand. It's not a standard interface, so it doesn't belong in libc. I hate duplicating the code in client programs, so do beck@, kettenis@, schwarze@
move the ohash functions into libutil by popular demand. It's not a standard interface, so it doesn't belong in libc. I hate duplicating the code in client programs, so do beck@, kettenis@, schwarze@, millert@, miod@... and they agree with libutil.
show more ...
|
| #
91a535ff |
| 13-Aug-2013 |
guenther <guenther@openbsd.org> |
Switch time_t, ino_t, clock_t, and struct kevent's ident and data members to 64bit types. Assign new syscall numbers for (almost all) the syscalls that involve the affected types, including anything
Switch time_t, ino_t, clock_t, and struct kevent's ident and data members to 64bit types. Assign new syscall numbers for (almost all) the syscalls that involve the affected types, including anything with time_t, timeval, itimerval, timespec, rusage, dirent, stat, or kevent arguments. Add a d_off member to struct dirent and replace getdirentries() with getdents(), thus immensely simplifying and accelerating telldir/seekdir. Build perl with -DBIG_TIME.
Bump the major on every single base library: the compat bits included here are only good enough to make the transition; the T32 compat option will be burned as soon as we've reached the new world are are happy with the snapshots for all architectures.
DANGER: ABI incompatibility. Updating to this kernel requires extra work or you won't be able to login: install a snapshot instead.
Much assistance in fixing userland issues from deraadt@ and tedu@ and build assistance from todd@ and otto@
show more ...
|
| #
410ca83d |
| 03-Jun-2013 |
tedu <tedu@openbsd.org> |
Add bcrypt_pbkdf, a password based key derivation function using bcrypt. Technically, it's a slight variant of bcrypt better suited for use as a pluggable hash with PKCS #5 PBKDF2. ok djm (also tweak
Add bcrypt_pbkdf, a password based key derivation function using bcrypt. Technically, it's a slight variant of bcrypt better suited for use as a pluggable hash with PKCS #5 PBKDF2. ok djm (also tweak pkcs5_pbkdf2() prototype to have consistent types.)
show more ...
|
| #
11dbc5f7 |
| 06-Sep-2012 |
tedu <tedu@openbsd.org> |
move pkcs5_pbkdf5 function to libutil so everybody can play with it ok deraadt jsing matthew
|
| #
8fdcf45f |
| 04-Jun-2012 |
deraadt <deraadt@openbsd.org> |
crank minor, since a symbol was added
|
| #
b498526d |
| 16-Nov-2010 |
jsing <jsing@openbsd.org> |
Crank minor due to the addition of isduid().
|
| #
dfaf6462 |
| 26-May-2010 |
nicm <nicm@openbsd.org> |
Move imsg into libutil and add a man page.
Minor bump for libutil.
Previous versions of this diff and man page looked at by various people.
"you should just commit" deraadt
|
| #
0ede50fc |
| 13-Jul-2004 |
marc <marc@openbsd.org> |
errno changes, lib major version bumps, and general flag day To build you must: cd /usr/src && make obj && make includes cd lib/libc && make depend && make && NOMAN=1 sudo make install cd /usr/src &&
errno changes, lib major version bumps, and general flag day To build you must: cd /usr/src && make obj && make includes cd lib/libc && make depend && make && NOMAN=1 sudo make install cd /usr/src && make build
show more ...
|
| #
46bc4394 |
| 20-Apr-2004 |
millert <millert@openbsd.org> |
Change pw_copy(3) to take a 3rd arguement, the existing passwd entry. This allows an application to only update a password entry if it is in the state it expects. Additionally, if the old passwd str
Change pw_copy(3) to take a 3rd arguement, the existing passwd entry. This allows an application to only update a password entry if it is in the state it expects. Additionally, if the old passwd struct is specified the new one may have a different pw_name field since matching is done on the original. Adapted from FreeBSD.
show more ...
|
| #
a6669909 |
| 23-Jul-2003 |
deraadt <deraadt@openbsd.org> |
move junk (bad code, terrible APIs) to the only program that uses it; millert ok
|
| #
f353b857 |
| 15-May-2003 |
ian <ian@openbsd.org> |
New: fmt_scaled() and scan_scaled() convert to and from "human readable" or scaled numbers. fmt_scaled, and the format, based on Ken Stailey's code for "df -h"; scan_scaled is new. Significantly comm
New: fmt_scaled() and scan_scaled() convert to and from "human readable" or scaled numbers. fmt_scaled, and the format, based on Ken Stailey's code for "df -h"; scan_scaled is new. Significantly commented on and reworked by pjanzen@; other comments from millert@. OK pjanzen@.
show more ...
|
| #
3b5f5f03 |
| 03-Dec-2002 |
millert <millert@openbsd.org> |
Crank all library major numbers. Needed due to the fact that we now build libraries with propolice enabled. Without this, existing binaries (such as ports/packages) that link with any system librar
Crank all library major numbers. Needed due to the fact that we now build libraries with propolice enabled. Without this, existing binaries (such as ports/packages) that link with any system library other than libc will fail with an undefined symbol of "___guard" (__guard on ELF). Pointed out by markus@ and discussed with deraadt@
show more ...
|
| #
b7296409 |
| 29-Sep-2001 |
jakob <jakob@openbsd.org> |
re-enable pidfile(3). ok millert@
|
| #
c363923c |
| 29-Sep-2001 |
deraadt <deraadt@openbsd.org> |
jakob did not even do a make build, sigh
|