summaryrefslogtreecommitdiff
path: root/lib/libutil
AgeCommit message (Collapse)Author
2015-07-03bzero cmsgbuf before using it, silences valgrind warnings.Bryan Steele
henning@ "sure"
2015-06-11The correct semantic is to check msgbuf_write() for <= 0, not just < 0.Reyk Floeter
Fix one occurence in imsg_flush() and clarify it the man page. Discussed with at least blambert@ jsg@ yasuoka@. OK gilles@
2015-06-03Do not assume that asprintf() clears the pointer on failure, whichTodd C. Miller
is non-portable. Also add missing asprintf() return value checks. OK deraadt@ guenther@ doug@
2015-04-24Use strtonum() instead of strtoul() when parsing uid/gid so we getTodd C. Miller
consistent handling of negative ids on 32bit/64bit systems. The only negative uid/gid allowed is -1 which is special-cased so it can be preserved when writing the new master.passwd file instead of being written as an unsigned number. OK deraadt@
2015-03-15tzfile.h is an internal header that should never have been installed.Todd C. Miller
What's worse, the tzfile.h that gets installed is over 20 years old and doesn't match the real tzfile.h in libc/time. This makes the tree safe for /usr/include/tzfile.h removal. The TM_YEAR_BASE define has been moved to time.h temporarily until its usage is replaced by 1900 in the tree. Actual removal of tzfile.h is pending a ports build. Based on a diff from deraadt@
2015-02-05Include stdint.h, not limits.h to get SIZE_MAX. OK guenther@Todd C. Miller
2015-01-16Move to the <limits.h> universe.Theo de Raadt
review by millert, binary checking process with doug, concept with guenther
2015-01-15remove .Tn; from Jan Stary <hans at stare dot cz>Ingo Schwarze
2015-01-12rename blocks to words. bcrypt "blocks" are unrelated to blowfish blocks,Ted Unangst
nor are they the same size.
2015-01-08declare a local version of MIN(), call it MINIMUM()Theo de Raadt
(sorry, my other changes were accidentally premature)
2015-01-08declare a local version of MIN(), call it MINIMUM()Theo de Raadt
2015-01-07Do not need sys/param.hTheo de Raadt
2014-12-30typo in comment: ouput => outputDamien Miller
2014-12-25return ERANGE instead of ENOMEM, so callers can differentiate real oomSebastian Benoit
from this case where we have a static buffer and cant realloc. ok phessler, claudio, reyk
2014-12-04use the actual function name in .Dt and NAME .Nm, not an alias;Ingo Schwarze
found with mandoc.db(5)
2014-11-25no first person in man pages.Ted Unangst
2014-09-27Explain why we deviate slightly from the PBKDF2 standard.Doug Hogan
This explanation is based off of Ted's site. Also, fix a comment from the SHA-1 version. ok tedu@
2014-09-08obvious cases of missing .An;Ingo Schwarze
found with the new mandoc(1) MANDOCERR_AN_MISSING warning; no text changes
2014-08-25Delete secret or secret-derived data with explicit_bzero.Doug Hogan
concept ok deraadt@ diff looks ok tedu@
2014-08-15Use O_CLOEXEC wherever we open a file and then call fcntl(F_SETFD, FD_CLOEXEC)Philip Guenther
on it, simplifying error checking, reducing system calls, and improving thread-safety for libraries. ok miod@
2014-07-13include stdint.h for standard ints. from Jean-Philippe OuelletTed Unangst
2014-06-30sys/types.h rather than sys/param.h, where applicable. avoid overreach.Theo de Raadt
2014-06-30sort includes much more sensiblyTheo de Raadt
2014-06-30limits.h rather than sys/param.hTheo de Raadt
2014-06-02merge ohash into 1 source file, then we can revisit next roadmap items.Theo de Raadt
ok espie
2014-05-13zap trailing whitespace;Jason McIntyre
2014-05-12move the ohash functions into libutil by popular demand.Marc Espie
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.
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