summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
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
2015-04-19Update sqlite3 to 3.8.9. Changes available here:James Turner
http://sqlite.org/releaselog/3_8_9.html Tested in bulk and ok landry@
2015-04-19Make SNDCLT_DSP_* ioctls return ENOTTY, and remove the correspondingAlexandre Ratchov
code. No ABI change. ok armani@, guenther@, sthen@
2015-04-18Convert many atoi() calls to strtonum(), adding range checks and failureTheo de Raadt
handling along the way. Reviews by Brendan MacDonell, Jeremy Devenport, florian, doug, millert
2015-04-17Tweaks utimensat/futimens handling to always update ctime, even when bothPhilip Guenther
atime and mtime are UTIME_OMIT (at least for ufs, tmpfs, and ext2fs), and to correctly handle a timestamp of -1. ok millert@
2015-04-15Clean up the ssl_bytes_to_cipher_list() API - rather than having theJoel Sing
ability to pass or not pass a STACK_OF(SSL_CIPHER) *, which is then either zeroed or if NULL a new one is allocated, always allocate one and return it directly. Inspired by simliar changes in BoringSSL. ok beck@ doug@
2015-04-15Treat SSL_ERROR_ZERO_RETURN as a success, rather than a failure. AlsoJoel Sing
ensure that outlen is set to zero so that tls_read() has read(2) like semantics for EOF. Spotted by doug@
2015-04-15Make tls_close() more robust - do not rely on a close notify being receivedJoel Sing
from the other side and only return TLS_READ_AGAIN/TLS_WRITE_AGAIN if we failed to send a close notify on a non-blocking socket. Otherwise be more forceful and always shutdown/close the socket regardless of other failures. Also do not consider ENOTCONN or ECONNRESET to be a shutdown failure, since there are various situations where this can occur. ok doug@ guenther@
2015-04-14Another couple of commas in the wrong place, ok jmcNicholas Marriott
2015-04-14Remove an extra comma pointed out by jmc@.Nicholas Marriott
2015-04-14Reorder prototypes to better match manpage layout and add some missingNicholas Marriott
argument names, from Fabian Raetz. ok deraadt
2015-04-14Fix sa_sigaction() handler example. The third argument is void * andTodd C. Miller
should be cast to ucontext_t * to actually use it. OK deraadt@
2015-04-12Let nl_langinfo(CODESET) return "US-ASCII" as the name of theChristian Weisgerber
character codeset for the POSIX/C default locale. This is the preferred IANA name and also used by FreeBSD. The previous value "646" was an obscure reference to ISO 646 (= ASCII) and was not recognized by GNU iconv out of the box. ok millert@, stsp@
2015-04-12Remove d2i_X509_PKEY and i2d_X509_PKEY from the SSLeay days.Doug Hogan
i2d_X509_PKEY is a "needs to implement" and d2i_X509_PKEY is broken. Removed upstream in commit b1f3442857c1fd76e91941141bf671d19e90a79d. ok deraadt@, jsing@
2015-04-11Send OPENSSL_issetugid() straight to hell, no final cigarette.Theo de Raadt
The issetugid() API is supposed to make a strong promise where "0 means it is safe to look at the environment". Way back in the past someone on the OpenSSL team responded to the environment access danger by creating a wrapper called OPENSSL_issetugid, and went to use it a number of places. However, by default on systems lacking true issetugid(), OPENSSL_issetugid returns 0. 0 indicating safely. False safety. Which means OPENSSL_issetugid() fails to make any sort of promise about safety, in fact it is just the opposite. Can you believe the OpenSSL team? This nastiness was noticed over the years, however noone could gain traction and get it fixed in OpenSSL. Also see a paragraph about this in http://www.tedunangst.com/flak/post/worst-common-denominator-programming ok jsing
2015-04-11Remove all getenv() calls, especially those wrapped by issetugid().Theo de Raadt
getenv()'s wrapped by issetugid() are safe, but issetugid() is correct difficult to impliment on many operating systems. By accident, a grand experiment was run over the last year, where issetugid() returned 1 (the safe value) on a few operating systems. Noone noticed & complained that certain environment variables were not working....... ok doug beck jsing, discussion with others
2015-04-07Teach libkvm a bit about PAE, making it independent of the kernel definesPhilip Guenther
and doing runtime detection of what the target kernel is using. Getting this is now to avoid breakage when kernel bits come. ok deraadt@
2015-04-07Fix miscellaneous factual, grammar, and markup errors.Lawrence Teo
From Jan Stary.
2015-04-07Add support for setting tm_zone now that we have the timezone symbol.Todd C. Miller
2015-04-07Remove obsolete timezone() function.Todd C. Miller
Add timezone and daylight symbols for XSI compatibility.
2015-04-07Make pthread_atfork() track the DSO that called it like atexit() does,Philip Guenther
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@
2015-04-06bludgeon DES support out of crypt. long live the bcrypt.Ted Unangst
2015-04-06improve realloc. when expanding a region, actually use the free page cacheTed Unangst
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.
2015-04-06tidy up by inlining next level included makefilesTed Unangst
ok deraadt guenther
2015-04-06readdir() is thread-safe when DIR handles aren't shared, so delete the lock.Philip Guenther
(POSIX is fixing its description: readdir_r() was a botch) Patch from Carlos Martín Nieto (cmn (at) dwim.me) no -portable concerns bcook@
2015-04-05seems unlikely that a new release will be made available for us to importTed Unangst
2015-04-04Bump major to 30, regen .pc and headerJames Turner
2015-04-04Merge conflictsJames Turner
2015-04-04Update sqlite3 to 3.8.8.3. Changes available here:James Turner
http://sqlite.org/releaselog/3_8_8_3.html Tested in bulk and ok landry@
2015-04-04The swapfile argument is also const char *.Jeremie Courreges-Anglas
Found a while ago when porting cpulimit. ok deraadt@
2015-04-04gcc 2.x is deadPhilip Guenther
ok millert@
2015-04-03comma fix;Jason McIntyre
2015-04-02Handle the case where multiple calls to SSL_shutdown() are required toJoel Sing
close the connection. Also correctly handle the error on failure. Diff from cookieandscream via github.
2015-04-02Correct man page title.Joel Sing
Diff from Tim van der Molen. ok jmc@
2015-04-02Document the fact that the tls_accept_*() functions can returnJoel Sing
TLS_READ_AGAIN and TLS_WRITE_AGAIN. Based on a diff from Tim van der Molen.
2015-03-31Bump libtls minor due to API addition.Joel Sing
2015-03-31Provide a tls_accept_fds() function, which allows a TLS connection to beJoel Sing
accepted via an existing pair of file descriptors. Based on a diff from Jan Klemkow.
2015-03-31Nuke the OPENSSL_MAX_TLS1_2_CIPHER_LENGTH hack - this has to be enabled atJoel Sing
compile time, which we do not do and are unlikely to ever do. Additionally, there are two runtime configurable alternatives that exist. ok bcook@ doug@
2015-03-31Stop encoding the syscall number in the swi instruction - this has beenJoel Sing
unused for around 8 years, when the kernel ABI was changed to use the syscall number specified in r12. ok miod@ jsg@
2015-03-31Store errors that occur during a tls_accept_socket() call on the contextJoel Sing
for the server, rather than on the context for the connection. This makes more sense than the current behaviour does. Issue reported by Tim van der Molen.
2015-03-31Simplify fork/vfork logic: the kernel has handled returning zero in the childPhilip Guenther
for a long time, so there's no need to test the second return register here in the asm stub. ok and testing of many archs by krw@ miod@
2006-10-10Preliminary userland bits for OpenBSD/landisk, many things coming fromMiod Vallat
NetBSD.
2015-03-30add initial AIX getentropy/arc4random files. Thanks to Michael Felt.Brent Cook
2015-03-30Do not include <machine/autoconf.h>, for it is a kernel-only header and libkvmMiod Vallat
doesn't need anything from it. While there, fix format strings and remove unused local variable declarations.
2015-03-28Replace the hand-crafted list of datagram unix domain sockets withAlexander Bluhm
a SLIST. OK mpi@ benno@
2015-03-27Factor out the init_buf initialisation code, rather than duplicating itJoel Sing
in four different places. ok doug@ guenther@
2015-03-27BUF_MEM_free() has its own explicit NULL check.Joel Sing