summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2015-05-20No need to check the return value of memcpy() if you actually checked thisMiod Vallat
pointer for NULL the line above; ok doug@
2015-05-19Instead of testing for __ELF__ and/or vax, leave out the bits for interfacingPhilip Guenther
with ld.so locking whenever building NOPIC pointless use of __ELF__ noted by brad@ ok miod@
2015-05-18swap calloc() arguments for clarityTheo de Raadt
2015-05-17*** empty log message ***Mark Kettenis
2015-05-17Of course, fcntl errno case returns -1, which must be converted to 0Theo de Raadt
with guenther
2015-05-17isatty() is used by stdio to determine the buffering mode. Add a F_ISATTYTheo de Raadt
option to fcntl(), so that isatty() can use this rather than than the bloated ioctl() interface. Reducing uses of ioctl() by libc makes it easier to constrain programs with various kinds of systrace sandboxes. ok guenther, previously discussed as a concept with nicm
2015-05-17Use fcntl() to set non-blocking-mode, rather ioctl(). This has a betterTheo de Raadt
chance of working in systrace restricted environments. ok guenther
2015-05-15Make index/rindex weak aliases of strchr/strrchr since they are notTodd C. Miller
part of the ISO C standard and have also been dropped from POSIX. OK guenther@ kettenis@
2015-05-15trailing whitespace;Jason McIntyre
2015-05-15Fix return paths with missing EVP_CIPHER_CTX_cleanup() calls.Jonathan Gray
ok doug@
2015-05-14Use STRONG_ALIAS instead of ALTENTRY.Mark Kettenis
ok millert@
2015-05-14rev 1.3 introduced a check to an if statement without adding braces.Jonathan Gray
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.
2015-05-13If crypt(3) is called with an unknown setting, return NULL insteadAlexander Bluhm
of some undefined value. OK tedu@
2015-05-12Add dlclose(3) to SEE ALSOPhilip Guenther
ok millert@ jmc@ schwarze@
2015-05-12Document pthread_atfork(3)'s interaction with dlclose(3)Philip Guenther
Use Xr instead of Fn for functions documented on other manpages ok millert@ jmc@ schwarze@
2015-05-12Put the right number of leading underscores in ___cerror and __cerror, forMiod Vallat
the sake of libpthread. Probably missed during the a.out->ELF switch, I can't believe this went unnoticed for so long.
2015-05-12chflagsat() is also async-signal-safePhilip Guenther
2015-05-11Whoops, need to pass through O_ACCMODE flags to the underlying __*_open()Philip Guenther
problem pointed out by Mark Patruck (mark (at) wrapped.cx)
2015-05-11When checking flags that will be passed to open(), test the O_ACCMODE portionPhilip Guenther
separately to avoid false negatives. ok miod@ millert@
2015-05-10In the child after fork, the dl lock has to be forced as its inner spinlockPhilip Guenther
may have been grabbed by another thread in the parent before the fork problem report from dcoppa@, ok kettenis@
2015-05-06fix a fd leak in an error path in code under #ifdef DEBUGJonathan Gray
2015-05-05AI_ADDRCONFIG: skip loopback addresses, not loopback interfaces.Jeremie Courreges-Anglas
This is what RFC3493 suggests. Fixes AI_ADDRCONFIG on setups where global addresses are configured only on loopback interfaces. Discussed with and ok eric@ gilles@
2015-05-05Move the AI_ADDRCONFIG setup to its own function.Jeremie Courreges-Anglas
Input from and ok gilles@ eric@
2015-05-05Make argument name consistent and use .Fn rather than .Nm in section 3.Ingo Schwarze
Patch from <Kaspars at Bankovskis dot net>.
2015-05-05add missing braces in _aucat_wmsg()Jonathan Gray
As ratchov@ notes: "all _aucat_wmsg() callers set hdl->wtodo, so your diff can't break things that used to work by accident." ok ratchov@
2015-05-05Document that shm_open() accepts O_CLOEXEC and O_NOFOLLOW as extensionsPhilip Guenther
ok miod@
2015-05-04Add SwissSign CA root certificates. Requested by robert@, ok dcoppa@ aja@ miod@Stuart Henderson
2015-05-04Use the size of the buffer not the pointer in a call to mem_free().Jonathan Gray
ok miod@ and guenther@ who both pointed out this argument is unused.
2015-04-30use strdup() to init stringTheo de Raadt
ok doug millert
2015-04-29Delete the duplicated sched_{policy,param} members from the internal structPhilip Guenther
pthread and instead use the values from the embedded struct pthread_attr. For bonus points, pay attention to the sched_inherit attribute and possibly set the values from the parent thread. Problem noted by natano of bitrig.
2015-04-29Add whitespace and replace OPENSSL_free with free in documentation.Doug Hogan
ok jsing@
2015-04-29Call CBB_add_space() rather than reimplementing it.Doug Hogan
ok jsing@
2015-04-29Rename cbb_buffer_add_u to cbb_add_u and remove redundant code.Doug Hogan
All of cbb_buffer_add_u's callers first call CBB_flush and send cbb->base. cbb_add_u() now has that common code in one place. ok jsing@
2015-04-29Added len_len error checking for internal cbb_buffer_add_u().Doug Hogan
ok jsing@
2015-04-29Call CBS_mem_equal() rather than reimplementing it.Doug Hogan
ok jsing@
2015-04-29Avoid NULL deref in CBS_get_any_asn1_element().Doug Hogan
This function is documented as allowing NULL for out_header_len. ok jsing@
2015-04-29Added error checking for len argument in cbs_get_u().Doug Hogan
tweak + ok jsing@
2015-04-29free() can handle NULL.Doug Hogan
ok jsing@
2015-04-29Reject dNSName of " " for subjectAltName extension.Doug Hogan
RFC 5280 says " " must not be used as a dNSName. ok jsing@ jca@
2015-04-29Add missing BN_CTX_end() calls.Doug Hogan
After calling BN_CTX_start(), there must be a BN_CTX_end() before returning. There were missing BN_CTX_end() calls in error paths. One diff chunk was simply removing redundant code related to this. ok deraadt@
2015-04-27Not all Linux libc's include linux/sysctl.h in sys/sysctl.h.Brent Cook
Include it if we have the sysctl syscall.
2015-04-27Support AIX versions without WPAR support.Brent Cook
From Michael Felt.
2015-04-25Cut the aliases part of /etc/rpc lines before feeding them to strtonum(), forMiod Vallat
it will fail otherwise; ok deraadt@ millert@
2015-04-25Don't ignore the reference count in X509_STORE_free.Doug Hogan
Based on this upstream commit: bff9ce4db38b297c72a6d84617d71ae2934450f7 which didn't make it into a release until 1.0.2. Thanks to william at 25thandclement dot com for reporting this! ok deraadt@ jsing@ beck@
2015-04-25Check for invalid leading zeros in CBS_get_asn1_uint64.Doug Hogan
ASN.1 integers cannot have all zeros or all ones for the first 9 bits. This rule ensures the numbers are encoded with the smallest number of content octets (see ITU-T Rec X.690 section 8.3.2). Based on BoringSSL commit 5933723b7b592e9914f703d630b596e140c93e16 ok deraadt@ jsing@
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-04-23Do not need to buf[0] = 0 before strlcpy(buf, ...Theo de Raadt
2015-04-21Eliminate the last uses of *fork's second syscall return register; the pidPhilip Guenther
is zero in the child ok deraadt@ miod@
2015-04-19Bump minor, regen .pc and headerJames Turner
2015-04-19Merge conflictsJames Turner