summaryrefslogtreecommitdiffstats
path: root/lib/libutil (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Wrap long line.jsing2014-01-181-3/+3
|
* constify data parameter in imsg_add() and imsg_compose()eric2013-12-263-10/+10
| | | | ok deraadt@
* tweak commenttedu2013-12-221-3/+3
|
* fairly simple unsigned char casts for ctypederaadt2013-11-291-5/+6
| | | | ok krw
* document that ibuf_write() and msgbuf_write() can now return EAGAINbenno2013-11-131-3/+9
| | | | from and with deraadt@
* original bug diagnosed by sthen: automatic retry in msgbuf_write onbenno2013-11-131-3/+3
| | | | | | | | | | | EAGAIN causes spinning. fix from claudio: "Let msgbuf_write return -1 with errno EAGAIN. The users then must check if this was the case and readd the event or poll again. The current handling in the imsg code is wrong for sure." ok gilles
* Fix FILE * leak in error path if fprintf fails. Found by and OK gilles@millert2013-10-011-2/+4
|
* Use %lld and cast to (long long) when printing time_t values and atoll()guenther2013-08-171-9/+10
| | | | | | | when parsing them. Add a couple [ug]id_t --> u_int casts for consistency with rest of code. Based on a diff from Nathanael Rensen (nathanael (at) polymorpheus.com)
* some Bx/Ox conversion;jmc2013-08-141-3/+5
| | | | From: Jan Stary
* Switch time_t, ino_t, clock_t, and struct kevent's ident and dataguenther2013-08-131-2/+2
| | | | | | | | | | | | | | | | | | | | 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@
* When writing a new record in pw_copy() print the uid and gid asmillert2013-08-061-2/+2
| | | | unsigned, just like we do the existing records. OK deraadt@
* fix a colossal cockup due to pointer/array confusion.tedu2013-07-291-7/+6
| | | | | code isn't used yet, thankfully. first observed by djm running regress. ok deraadt djm
* i copied .Fd just like everybody else. use .Intedu2013-06-051-3/+3
|
* use fancy .In macro for includes. from Jan Klemkow. ok jmc schwarzetedu2013-06-0518-65/+65
|
* revert. check is < 1, not < 0.tedu2013-06-041-1/+3
|
* oops, rounds is unsigned nowtedu2013-06-041-3/+1
|
* \-1;jmc2013-06-041-3/+3
|
* not much use for sha1 .Xrtedu2013-06-031-2/+1
|
* Add bcrypt_pbkdf, a password based key derivation function using bcrypt.tedu2013-06-037-15/+251
| | | | | | | 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.)
* Fix pty descriptor leak if fork() fails.matthew2013-05-211-1/+3
| | | | ok millert
* use FD_CLOEXEC instead of 1; from David Hillokan2013-04-291-2/+2
| | | | ok otto
* use O_CLOEXEC with open() instead of open/fcntl; from David Hillokan2013-04-291-3/+3
| | | | ok otto
* fix memleak in imsg_read() when hitting the fd reserve checkgilles2013-02-011-1/+2
| | | | ok millert@, mikeb@, lteo@
* Fix a purely theoretical NULL-pointer dereference in the case that wereyk2012-12-191-2/+2
| | | | | | would be able to receive multiple SCM_RIGHTS messages. ok claudio@ gilles@
* Remove excessive sys/cdefs.h inclusionderaadt2012-12-054-9/+4
| | | | ok guenther millert kettenis
* imsg_get() returns ssize_t, not size_t.krw2012-11-151-3/+3
|
* make scan_scaled set errno to EINVAL rather than ERANGE if it encountershalex2012-11-121-2/+4
| | | | | | an invalid multiplier, like the man page says it should "looks sensible" deraadt@, ok ian@
* struct buf -> ibuf; from Sunil Nimmagaddajmc2012-10-221-4/+4
|
* Use "unsigned int" instead of BSD "u_int" in <util.h> so that it canmatthew2012-09-092-6/+6
| | | | | | | | be included in source files that specify POSIX source. libutil isn't a standard POSIX library, but no need to be gratuitously incompatible. Fixes x11/st. ok tedu, guenther, kettenis
* various fixes;jmc2012-09-071-7/+12
|
* Move the commented out test program in pkcs5_pbkdf2.c into a propermatthew2012-09-061-133/+1
| | | | regress test.
* some better phrasing, mostly via jsingtedu2012-09-061-4/+6
|
* move pkcs5_pbkdf5 function to libutil so everybody can play with ittedu2012-09-065-5/+317
| | | | ok deraadt jsing matthew
* remove leftover NOLINT, WANTLINT, LINTFLAGS, LOBJ vars and lint targets.okan2012-08-021-2/+1
| | | | ok guenther@
* ANSIfy forkpty, add missing $OpenBSD$ in duid.c, style (no arg names) innicm2012-07-093-16/+13
| | | | | | util.h. ok guenther
* update return values for ibuf_write and msgbuf_writejmatthew2012-06-151-4/+4
| | | | ok gilles@
* crank minor, since a symbol was addedderaadt2012-06-041-1/+1
|
* in imsg_read() avoid calling recvmsg() if we detect that we will be shortgilles2012-06-022-28/+60
| | | | | | | | | | | | | on descriptors, this can be achieved thanks to the new getdtablecount() system call. application may provide a reserve count to ensure that the recvmsg() call is not called when they don't have enough descriptors to work properly. change the API so that transient errors that can be retried immediately are retried within the function right away, whereas transient errors for which the application may want to take action will set errno to EAGAIN. ok deraadt@ and henning@
* Drop support from openpty() for 8+ year old kernels that don't supportmatthew2012-04-261-59/+5
| | | | | | | /dev/ptm. Users are strongly encouraged to upgrade to a more recent release if they haven't already. ok deraadt
* Do not mask errno if we fail to open /dev/diskmap. Also, fall throughjsing2011-06-301-4/+1
| | | | | | rather than returning so that realname still gets assigned. ok millert@ deraadt@ thib@
* s/ands/and/, from Tobias Ulmersthen2011-06-231-3/+3
|
* Correct msgbuf_write() example. OK jmc@ and nicm@claudio2011-03-051-3/+3
|
* Update to better describe reality, i.e. disklabel(8) UID usage.krw2011-01-031-10/+24
| | | | ok jmc@ jsing@
* Do not attempt to prepend /dev/ to path if it already contains a slash.millert2010-12-221-17/+19
| | | | OK jsing@
* Always return a pointer to the static buffer in realpath, even ifmillert2010-12-211-13/+10
| | | | | path and realpath are the same. This matches the manual and avoids a bogus cast to non-const. OK jsing@, previous version OK kettenis@
* opendev() path argument should be const. OK deraadt@millert2010-12-173-8/+8
|
* Document isduid(3).jsing2010-11-172-3/+64
| | | | | | Tweaks from jmc@ ok jmc@ krw@
* Crank minor due to the addition of isduid().jsing2010-11-161-1/+1
|
* Teach readlabelfs() how to handle DUIDs.jsing2010-11-151-4/+24
| | | | ok krw@
* Factor out DUID identification code so that it can easily be reused.jsing2010-11-154-29/+48
| | | | ok krw@