summaryrefslogtreecommitdiff
path: root/src/lib/libc (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* All these files include <stdlib.h>, so do not need to castderaadt2015-08-202-5/+5
| | | | malloc/calloc/realloc* returns.
* call it bcrypt in the man page tootedu2015-07-231-3/+3
|
* permit "bcrypt" as an alias for "blowfish". this is, after all, whattedu2015-07-231-11/+27
| | | | | | | 99% of the world calls it. allow just "bcrypt" without params to mean auto-tune ("bcrypt,a"). default remains 8 rounds (for now) ok deraadt
* Unbreak, add errno headerjeremy2015-07-181-1/+2
| | | | OK tedu@
* set errno in null cases, just in case.tedu2015-07-181-2/+3
|
* standards compliant error return (null). will make ruby happier, at least.tedu2015-07-181-5/+2
| | | | ok deraadt jeremy
* Just return if nmemb is 0. Avoids a NULL dereference and ismillert2015-06-211-1/+4
| | | | | consistent with the behavior of the other libc sort functions. OK deraadt@
* Remove needless casts. There's no reason to cast delim to char *millert2015-06-191-5/+4
| | | | when we can just make spanp const char * to match it. OK deraadt@
* force reseeding if pid has changed.eric2015-06-041-2/+7
| | | | ok deraadt@
* Make index/rindex weak aliases of strchr/strrchr since they are notmillert2015-05-154-90/+6
| | | | | part of the ISO C standard and have also been dropped from POSIX. OK guenther@ kettenis@
* rev 1.3 introduced a check to an if statement without adding braces.jsg2015-05-141-3/+1
| | | | | | | Claudio points out the size is checked by an earlier test so just remove it to restore the original handling of the partial octet case. Discussed with claudio and gilles.
* If crypt(3) is called with an unknown setting, return NULL insteadbluhm2015-05-131-1/+3
| | | | | of some undefined value. OK tedu@
* Add dlclose(3) to SEE ALSOguenther2015-05-121-2/+3
| | | | ok millert@ jmc@ schwarze@
* When checking flags that will be passed to open(), test the O_ACCMODE portionguenther2015-05-111-2/+3
| | | | | | separately to avoid false negatives. ok miod@ millert@
* Another couple of commas in the wrong place, ok jmcnicm2015-04-141-3/+3
|
* Make pthread_atfork() track the DSO that called it like atexit() does,guenther2015-04-073-2/+81
| | | | | | | | | | unregistering callbacks if the DSO is unloaded. Move the callback handling from libpthread to libc, though libpthread still overrides the inner call to handle locking and thread-library reinitialization. Major version bump for both libc and libpthread. verification that this fixes various ports ajacoutot@ asm assistance miod@; ok millert@ deraadt@
* bludgeon DES support out of crypt. long live the bcrypt.tedu2015-04-062-761/+9
|
* improve realloc. when expanding a region, actually use the free page cachetedu2015-04-061-7/+16
| | | | | instead of simply zapping it. this can save many syscalls in a program that repeatedly grows and shrinks a buffer, as observed in the wild.
* Make rcmdsh(3) not fail if it is passed a non resolvable hostname.halex2015-03-233-20/+16
| | | | | | | Instead, silently ignore the fact and instead let the underlying ssh (or $RSH) command handle it. ok millert@
* differentiate between a failed read, returning -1, and encounteringhalex2015-03-221-2/+4
| | | | | | | end-of-file, returning 0, in order not to print an unrelated strerror(errno) in the latter case ok millert@
* unmute rcmd hostname lookup failurehalex2015-03-221-3/+2
| | | | ok millert@ jung@
* zap #if 0'd code that's been dead since '96halex2015-03-191-7/+0
| | | | ok todd@
* remove incorrect statement. the standard *does* require calloc to checktedu2015-03-141-7/+2
| | | | | for overflow. stop talking about old broken systems, there's little use for such info.
* Update comment to match code; Caspar Schutijserlibressl-v2.1.4millert2015-03-021-2/+2
|
* we don't let strtonum errors bleed through now.tedu2015-02-241-4/+2
|
* Set errno to EINVAL, instead of letting ERANGE escape out.tedu2015-02-241-2/+4
| | | | | | Printing strerror() in that case will say result too large, even if rounds is actually too small. invalid is less specific, but less incorrect. ok millert
* Amend documentation for AI_ADDRCONFIGjca2015-02-161-2/+4
| | | | ok jmc@
* lsearch and lfind return void *tedu2015-02-151-4/+4
|
* use a width specifier for lists, and Sq rather than Dq for single lettersjmc2015-02-111-3/+3
| | | | to avoid swamping it;
* the possible algos for pref should be documented heretedu2015-02-111-4/+11
|
* Use .Rv where appropriate, and move it to RETURN VALUES;schwarze2015-01-293-27/+13
| | | | | remove .Tn, and a few minor macro adjustments. Patch from Kaspars at Bankovskis dot net.
* dial the time back to about 0.1s, closer to the original targets andtedu2015-01-281-4/+4
| | | | friendlier for users. requested by deraadt
* Improve wording in alloca.tedu2015-01-171-7/+5
| | | | | | | 1. it's not a bug; it's a caveat. 2. "slightly unsafe" gives me the willies. 3. one .Xr to malloc should suffice ok deraadt jmc
* Use ">", not ">=" when comparing length to HOST_NAME_MAX sincemillert2015-01-161-3/+3
| | | | | otherwise we end up needlessly replacing a NUL with a NUL. OK deraadt@
* Replace HOST_NAME_MAX+1-1 with HOST_NAME_MAX. OK deraad@millert2015-01-162-8/+8
|
* Replace check for ">= HOST_NAME_MAX+1" with "> HOST_NAME_MAX".millert2015-01-161-1/+1
| | | | OK deraadt@
* Move to the <limits.h> universe.deraadt2015-01-1623-57/+40
| | | | review by millert, binary checking process with doug, concept with guenther
* remove unused variablechl2015-01-151-2/+1
| | | | ok tedu@
* back in september I did the large abstraction refactoring to allow thesederaadt2015-01-152-2/+4
| | | | other systems to fit into the same mold, so add copyright
* Make strlcpy/strlcat slightly easier to read.millert2015-01-154-86/+82
|
* rename blocks to words. bcrypt "blocks" are unrelated to blowfish blocks,tedu2015-01-121-9/+9
| | | | nor are they the same size.
* missing , found by Dongsheng Songderaadt2015-01-081-3/+3
|
* stupid me. need errno.htedu2015-01-071-1/+2
|
* set errno = EINVAL for invalid salts and hashes in most functions.tedu2015-01-071-12/+20
| | | | | | | remember to set EACCES in bcrypt_checkpass for hash differences. the higher level crypt_checkpass function will reset errno to EACCES in all cases, which is probably the right behavior, but this change gives code working with the lower level functions the correct errno if they care.
* rename kern enter/exit macros to malloc enter/leave to better reflecttedu2015-01-051-7/+7
| | | | what's going on.
* convert clock() to clock_gettime() for improved precision (and accuracy?)tedu2015-01-051-7/+9
| | | | | guenther suggested using thread time, which actually may improve accuracy if somebody puts this in a threaded program.
* copy bcrypt autotune from encrypt(1) and expose via crypt_newhashtedu2014-12-302-5/+43
| | | | ok deraadt miod
* simplify crypt_checkpass. The API promise is that this function doesn'ttedu2014-12-241-11/+5
| | | | | | | | | use global data. The simplest fix is to only check blowfish passwords, and implicitly lock out DES passwords. crypt_checkpass is currently only used in one place, passwd, to verify the local user's password, so this is probably acceptable. Gives people a little more time to migrate away from DES before introduing checkpass into more places.
* typo; ok deraadtsthen2014-12-162-3/+3
|
* warn for correct symbolderaadt2014-12-161-2/+2
|