summaryrefslogtreecommitdiff
path: root/lib/libutil
AgeCommit message (Collapse)Author
2014-04-08fix an error in the stride calculations. the math only works for multiplesTed Unangst
of the stride. don't overwrite past the end of the buffer, and also save that amount for later so the array is completely filled. ok deraadt djm reported by Dmitry Chestnykh (dchest)
2014-01-31explicit_bzero where usefulTed Unangst
2014-01-21obvious .Pa fixes; found with mandocdb(8)Ingo Schwarze
2014-01-18Wrap long line.Joel Sing
2013-12-26constify data parameter in imsg_add() and imsg_compose()Eric Faurot
ok deraadt@
2013-12-22tweak commentTed Unangst
2013-11-29fairly simple unsigned char casts for ctypeTheo de Raadt
ok krw
2013-11-13document that ibuf_write() and msgbuf_write() can now return EAGAINSebastian Benoit
from and with deraadt@
2013-11-13original bug diagnosed by sthen: automatic retry in msgbuf_write onSebastian Benoit
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
2013-10-01Fix FILE * leak in error path if fprintf fails. Found by and OK gilles@Todd C. Miller
2013-08-17Use %lld and cast to (long long) when printing time_t values and atoll()Philip Guenther
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)
2013-08-14some Bx/Ox conversion;Jason McIntyre
From: Jan Stary
2013-08-13Switch time_t, ino_t, clock_t, and struct kevent's ident and dataPhilip Guenther
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@
2013-08-06When writing a new record in pw_copy() print the uid and gid asTodd C. Miller
unsigned, just like we do the existing records. OK deraadt@
2013-07-29fix a colossal cockup due to pointer/array confusion.Ted Unangst
code isn't used yet, thankfully. first observed by djm running regress. ok deraadt djm
2013-06-05i copied .Fd just like everybody else. use .InTed Unangst
2013-06-05use fancy .In macro for includes. from Jan Klemkow. ok jmc schwarzeTed Unangst
2013-06-04revert. check is < 1, not < 0.Ted Unangst
2013-06-04oops, rounds is unsigned nowTed Unangst
2013-06-04\-1;Jason McIntyre
2013-06-03not much use for sha1 .XrTed Unangst
2013-06-03Add bcrypt_pbkdf, a password based key derivation function using bcrypt.Ted Unangst
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.)
2013-05-21Fix pty descriptor leak if fork() fails.Matthew Dempsky
ok millert
2013-04-29use FD_CLOEXEC instead of 1; from David HillOkan Demirmen
ok otto
2013-04-29use O_CLOEXEC with open() instead of open/fcntl; from David HillOkan Demirmen
ok otto
2013-02-01fix memleak in imsg_read() when hitting the fd reserve checkGilles Chehade
ok millert@, mikeb@, lteo@
2012-12-19Fix a purely theoretical NULL-pointer dereference in the case that weReyk Floeter
would be able to receive multiple SCM_RIGHTS messages. ok claudio@ gilles@
2012-12-05Remove excessive sys/cdefs.h inclusionTheo de Raadt
ok guenther millert kettenis
2012-11-15imsg_get() returns ssize_t, not size_t.Kenneth R Westerback
2012-11-12make scan_scaled set errno to EINVAL rather than ERANGE if it encountersAlexander Hall
an invalid multiplier, like the man page says it should "looks sensible" deraadt@, ok ian@
2012-10-22struct buf -> ibuf; from Sunil NimmagaddaJason McIntyre
2012-09-09Use "unsigned int" instead of BSD "u_int" in <util.h> so that it canMatthew Dempsky
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
2012-09-07various fixes;Jason McIntyre
2012-09-06Move the commented out test program in pkcs5_pbkdf2.c into a properMatthew Dempsky
regress test.
2012-09-06some better phrasing, mostly via jsingTed Unangst
2012-09-06move pkcs5_pbkdf5 function to libutil so everybody can play with itTed Unangst
ok deraadt jsing matthew
2012-08-02remove leftover NOLINT, WANTLINT, LINTFLAGS, LOBJ vars and lint targets.Okan Demirmen
ok guenther@
2012-07-09ANSIfy forkpty, add missing $OpenBSD$ in duid.c, style (no arg names) inNicholas Marriott
util.h. ok guenther
2012-06-15update return values for ibuf_write and msgbuf_writeJonathan Matthew
ok gilles@
2012-06-04crank minor, since a symbol was addedTheo de Raadt
2012-06-02in imsg_read() avoid calling recvmsg() if we detect that we will be shortGilles Chehade
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@
2012-04-26Drop support from openpty() for 8+ year old kernels that don't supportMatthew Dempsky
/dev/ptm. Users are strongly encouraged to upgrade to a more recent release if they haven't already. ok deraadt
2011-06-30Do not mask errno if we fail to open /dev/diskmap. Also, fall throughJoel Sing
rather than returning so that realname still gets assigned. ok millert@ deraadt@ thib@
2011-06-23s/ands/and/, from Tobias UlmerStuart Henderson
2011-03-05Correct msgbuf_write() example. OK jmc@ and nicm@Claudio Jeker
2011-01-03Update to better describe reality, i.e. disklabel(8) UID usage.Kenneth R Westerback
ok jmc@ jsing@
2010-12-22Do not attempt to prepend /dev/ to path if it already contains a slash.Todd C. Miller
OK jsing@
2010-12-21Always return a pointer to the static buffer in realpath, even ifTodd C. Miller
path and realpath are the same. This matches the manual and avoids a bogus cast to non-const. OK jsing@, previous version OK kettenis@
2010-12-17opendev() path argument should be const. OK deraadt@Todd C. Miller
2010-11-17Document isduid(3).Joel Sing
Tweaks from jmc@ ok jmc@ krw@