summaryrefslogtreecommitdiffstats
path: root/lib/libutil (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* remove cast of malloc(), since stdlib.h is includedderaadt2015-08-201-2/+2
|
* Handle malloc(0) returning NULL (which can happen on some othernicm2015-07-191-2/+4
| | | | | platforms) by explicitly making imsg->data = NULL when there is no data. ok deraadt
* typo in manual page.sobrado2015-07-151-3/+3
| | | | ok jsing@
* Use memset instead of bzero for better portability.nicm2015-07-122-10/+10
| | | | ok gilles claudio doug
* typo in embedded code block; from Ben Cornettderaadt2015-07-111-3/+3
|
* bzero cmsgbuf before using it, silences valgrind warnings.brynet2015-07-032-2/+4
| | | | henning@ "sure"
* The correct semantic is to check msgbuf_write() for <= 0, not just < 0.reyk2015-06-112-9/+9
| | | | | | | | Fix one occurence in imsg_flush() and clarify it the man page. Discussed with at least blambert@ jsg@ yasuoka@. OK gilles@
* Do not assume that asprintf() clears the pointer on failure, whichmillert2015-06-031-3/+2
| | | | | is non-portable. Also add missing asprintf() return value checks. OK deraadt@ guenther@ doug@
* Use strtonum() instead of strtoul() when parsing uid/gid so we getmillert2015-04-241-49/+52
| | | | | | | 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@
* tzfile.h is an internal header that should never have been installed.millert2015-03-151-4/+5
| | | | | | | | | 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@
* Include stdint.h, not limits.h to get SIZE_MAX. OK guenther@millert2015-02-051-2/+2
|
* Move to the <limits.h> universe.deraadt2015-01-161-3/+4
| | | | review by millert, binary checking process with doug, concept with guenther
* remove .Tn; from Jan Stary <hans at stare dot cz>schwarze2015-01-153-18/+10
|
* rename blocks to words. bcrypt "blocks" are unrelated to blowfish blocks,tedu2015-01-121-6/+6
| | | | nor are they the same size.
* declare a local version of MIN(), call it MINIMUM()deraadt2015-01-081-2/+4
| | | | (sorry, my other changes were accidentally premature)
* declare a local version of MIN(), call it MINIMUM()deraadt2015-01-081-2/+4
|
* Do not need sys/param.hderaadt2015-01-072-4/+3
|
* typo in comment: ouput => outputdjm2014-12-301-2/+2
|
* return ERANGE instead of ENOMEM, so callers can differentiate real oombenno2014-12-251-2/+2
| | | | | | from this case where we have a static buffer and cant realloc. ok phessler, claudio, reyk
* use the actual function name in .Dt and NAME .Nm, not an alias;schwarze2014-12-041-4/+4
| | | | found with mandoc.db(5)
* no first person in man pages.tedu2014-11-251-3/+3
|
* Explain why we deviate slightly from the PBKDF2 standard.doug2014-09-271-3/+5
| | | | | | | This explanation is based off of Ted's site. Also, fix a comment from the SHA-1 version. ok tedu@
* obvious cases of missing .An;schwarze2014-09-082-8/+13
| | | | | found with the new mandoc(1) MANDOCERR_AN_MISSING warning; no text changes
* Delete secret or secret-derived data with explicit_bzero.doug2014-08-251-2/+2
| | | | | concept ok deraadt@ diff looks ok tedu@
* Use O_CLOEXEC wherever we open a file and then call fcntl(F_SETFD, FD_CLOEXEC)guenther2014-08-151-10/+3
| | | | | | | on it, simplifying error checking, reducing system calls, and improving thread-safety for libraries. ok miod@
* include stdint.h for standard ints. from Jean-Philippe Ouellettedu2014-07-131-1/+2
|
* sys/types.h rather than sys/param.h, where applicable. avoid overreach.deraadt2014-06-307-14/+13
|
* sort includes much more sensiblyderaadt2014-06-301-9/+8
|
* limits.h rather than sys/param.hderaadt2014-06-301-2/+3
|
* merge ohash into 1 source file, then we can revisit next roadmap items.deraadt2014-06-0215-541/+334
| | | | ok espie
* zap trailing whitespace;jmc2014-05-131-4/+4
|
* move the ohash functions into libutil by popular demand.espie2014-05-1217-2/+991
| | | | | | 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.
* fix an error in the stride calculations. the math only works for multiplestedu2014-04-081-4/+9
| | | | | | | 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)
* explicit_bzero where usefultedu2014-01-312-11/+11
|
* obvious .Pa fixes; found with mandocdb(8)schwarze2014-01-211-8/+8
|
* 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
|