summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* MFC r303393:kib2016-08-033-7/+0
| | | | | | Remove empty initializer for the once facility. Approved by: re (gjb)
* MFC 303164: Add more documentation regarding unsafe AIO requests.jhb2016-07-284-20/+16
| | | | | | | | | | | | | | | | | | | | | The asynchronous I/O changes made previously result in different behavior out of the box. Previously all AIO requests failed with ENOSYS / SIGSYS unless aio.ko was explicitly loaded. Now, some AIO requests complete and others ("unsafe" requests) fail with EOPNOTSUPP. Reword the introductory paragraph in aio(4) to add a general description of AIO before describing the vfs.aio.enable_unsafe sysctl. Remove the ENOSYS error description from aio_fsync(2), aio_read(2), and aio_write(2) and replace it with a description of EOPNOTSUPP. Remove the ENOSYS error description from aio_mlock(2). Log a message to the system log the first time a process requests an "unsafe" AIO request that fails with EOPNOTSUPP. This is modeled on the log message used for processes using the legacy pty devices. Approved by: re (gjb)
* MFC r303046:pfg2016-07-261-12/+12
| | | | | | | | | | | | | | libc: tag the rune initialization function prototypes visibility as hidden. It is good practice to export as few symbols as possible from your shared libraries, so use the GCC visibility attribute in this case, matching what Apple's libc does. Reference: https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/CppRuntimeEnv/Articles/SymbolVisibility.html Hinted by: Apple's libc 1082.20.4 Approved by: re (gjb)
* MFC 302899: Add documentation for the sigevent structure.jhb2016-07-257-22/+175
| | | | | | | | | | | | - Add a sigevent(3) manpage to give a general overview of the sigevent structure and the available notification mechanisms. - Document that AIO requests contain a nested sigevent structure that can be used to request completion notification. - Expand the sigevent details in other manuals to note details such as the extra values stored in a queued signal's information or in a posted kevent. Approved by: re (gjb)
* MFC 302860: Fix aio system call wrappers in librt.jhb2016-07-251-7/+15
| | | | | | | | | | - Update aio_return/waitcomplete wrappers for the ssize_t return type. - Fix the aio_return() wrapper to fail with EINVAL on a pending job. This matches the semantics of the in-kernel system call. Also, aio_return() returns errors via errno, not via the return value. Approved by: re (gjb) Sponsored by: Chelsio Communications
* MFC: r302916bapt2016-07-201-1/+5
| | | | | | | | | Revert 302324 and properly fix the crash with ISO-8859-5 locales PR: 211135 Reported by: jkim Tested by: jkim Approved by: re (gjb)
* fcntl(2): Document interrupt/restart for file locks.jilles2016-07-071-1/+22
| | | | | | | | | | | | | Since r302216, thread suspension causes advisory file locks to restart (instead of continuing to wait) and for a long time SA_RESTART has affected advisory file locks. These are both not compliant to POSIX.1. To clarify that restarting means something, add a paragraph about fair queuing. Note that the network lock manager does not implement fair queuing. Reviewed by: kib (previous version) Approved by: re (gjb)
* Fix a bad test resulting in a segfault with ISO-8859-5 localesbapt2016-07-031-1/+1
| | | | | Reported by: Lauri Tirkkonen from Illumos Approved by: re@ (gjb)
* libcxxrt: correct mangled "typeinfo name" symbols in Version.mapemaste2016-06-291-8/+8
| | | | | | | | | | | | | | | r260553 added missing C++ typinfos to libcxxrt's version script. It appears that a number of duplicate mangled symbols were added due to a cut and paste error. Switch the second instances to _ZTS*, typeinfo name for *. Found by lld, which produces an error or warning for duplicate symbols. Reviewed by: dim Approved by: re (gjb) MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7011
* Use on crypto.x and rpc.x from the source tree.bdrewery2016-06-282-2/+2
| | | | | | | | | This fixes the build when DESTDIR may be blank or not yet populated. It also fixes reproducibility. Submitted by: brooks Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D6455
* This commit addresses regression introduceded in r302177cy2016-06-281-0/+14
| | | | | | | | (WITH_SYSTEM_COMPILER: Enable by default) and it's prerequisite: r300354, caused i386 builds to fail when cross-built on an amd64 host. Reviewed by: bdrewery, delphij, gjb Approved by: re (gjb)
* Fix build: explicitly reference the generated magic.h as dependencydelphij2016-06-271-3/+3
| | | | | | | | | | of mkmagic and point its location. Reported by: jenkins Pointy hat to: delphij MFC after: 2 weeks X-MFC-With: 302221 Approved by: re (kib)
* MFV r302218: file 5.28.delphij2016-06-272-3/+12
| | | | | | Relnotes: yes MFC after: 2 weeks Approved by: re (gjb)
* Revert r302194, there are issues with some applications after changingkib2016-06-251-4/+1
| | | | | | | | | the return value, in particular console-kit-daemon. Reported by: Ivan Klymenko <fidaj@ukr.net> Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Approved by: re (gjb)
* For pthread_mutex_trylock() call on owned error-check or non-portablekib2016-06-251-2/+5
| | | | | | | | | | adaptive mutex, return EDEADLK as required by POSIX. The pthread_mutex_lock() is already compliant. Tested by: Guy Yur <guyyur@gmail.com> Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Approved by: re (gjb)
* Resolve issue with libusb C++ header file inclusion.hselasky2016-06-242-5/+5
| | | | | | Approved by: re (marius) PR: 210509 MFC after: 1 week
* Add support for USB streams to the LibUSB v1.0 API and update thehselasky2016-06-236-2/+83
| | | | | | | | libusb(3) manual page. Approved by: re (gjb) Requested by: swills MFC after: 1 week
* Replace use of the pipe(2) system call with pipe2(2) with a zero flagsbrooks2016-06-2220-457/+29
| | | | | | | | | | | | | | | | value. This eliminates the need for machine dependant assembly wrappers for pipe(2). It also make passing an invalid address to pipe(2) return EFAULT rather than triggering a segfault. Document this behavior (which was already true for pipe2(2), but undocumented). Reviewed by: andrew Approved by: re (gjb) Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D6815
* Implement libusb_hotplug_register_callback() andhselasky2016-06-226-1/+349
| | | | | | | | | libusb_hotplug_deregister_callback() for the LibUSB v1.0 API and update the libusb(3) manual page. Approved by: re (kib) Requested by: swills MFC after: 1 week
* MFV r302003,r302037,r302038,r302056:mm2016-06-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update libarchive to 3.2.1 (bugfix and security fix release) List of vendor fixes: - fix exploitable heap overflow vulnerability in Rar decompression (vendor issue 719, CVE-2016-4302, TALOS-2016-0154) - fix exploitable stack based buffer overflow vulnebarility in mtree parse_device functionality (vendor PR 715, CVE-2016-4301, TALOS-2016-0153) - fix exploitable heap overflow vulnerability in 7-zip read_SubStreamsInfo (vendor issue 718, CVE-2016-4300, TALOS-2016-152) - fix integer overflow when computing location of volume descriptor (vendor issue 717) - fix buffer overflow when reading a crafred rar archive (vendor issue 521) - fix possible buffer overflow when reading ISO9660 archives on machines where sizeof(int) < sizeof(size_t) (vendor issue 711) - tar and cpio should fail if an input file named on the command line is missing (vendor issue 708) - fix incorrect writing of gnutar filenames that are exactly 512 bytes long (vendor issue 682) - allow tests to be run from paths that are equal or longer than 128 characters (vendor issue 657) - add memory allocation errors in archive_entry_xattr.c (vendor PR 603) - remove dead code in archive_entry_xattr_add_entry() (vendor PR 716) - fix broken decryption of ZIP files (vendor issue 553) - manpage style, typo and description fixes Post-3.2.1 vendor fixes: - fix typo in cpio version reporting (Vendor PR 725, 726) - fix argument range of ctype functions in libarchive_fe/passphrase.c - fix ctype use and avoid empty loop bodies in WARC reader MFC after: 1 week Security: CVE-2016-4300, CVE-2016-4301, CVE-2016-4302 Approved by: re (kib)
* Add clang-format under WITH_CLANG_EXTRAS.bdrewery2016-06-175-1/+72
| | | | | | | Reviewed by: dim Approved by: re (gjb) Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D6856
* Add missing return statement.hselasky2016-06-161-0/+1
| | | | | Approved by: re (gjb) MFC after: 1 week
* Add multiple missing descriptor parsing functions to the LibUSB v1.0 API.hselasky2016-06-164-2/+290
| | | | | | Approved by: re (kib) Requested by: swills MFC after: 1 week
* Add support for libusb_set_auto_detach_kernel_driver() to the LibUSB v1.0 API.hselasky2016-06-166-4/+47
| | | | | | Approved by: re (kostikbel) Requested by: swills MFC after: 1 week
* Add support for libusb_get_port_number() to the LibUSB v1.0 API.hselasky2016-06-163-1/+16
| | | | | | Approved by: re (kostikbel) Requested by: swills MFC after: 1 week
* Define LIBUSB_API_VERSION.hselasky2016-06-161-0/+2
| | | | | | Approved by: re (kostikbel) Requested by: swills MFC after: 1 week
* Implement libusb_get_version() and update libusb manual page.hselasky2016-06-164-1/+32
| | | | | | Approved by: re (glebius) Requested by: swills MFC after: 1 week
* DIRDEPS_BUILD: Update dependenciesbdrewery2016-06-144-1/+3
| | | | | Approved by: re (gjb) Sponsored by: EMC / Isilon Storage Division
* Fix compile warning.hselasky2016-06-131-1/+1
| | | | | Approved by: re (delphij) MFC after: 1 week
* Don't close fd if it's lower then stderr, otherwise we can closeoshogbo2016-06-131-1/+2
| | | | | | | one of the descriptor which we just set. Pointed out by: jilles Approved by: re (hrs)
* Implement code to stop all USB endpoints before executing a USB devicehselasky2016-06-121-2/+14
| | | | | | | | | | reset command, alternate setting command or set configuration command. Else LibUSB v1.0 will not re-open the endpoints which the kernel closes and the USB application might wait infinitely for transfers to complete. Approved by: re (hrs) MFC after: 3 days
* Fix regression from r301461.pfg2016-06-101-3/+3
| | | | | | | | | | | | The fix to the __collate_range_cmp() ABI breakage missed some replacements in libc's vfscanf(). Replace them with __wcollate_range_cmp() which does what is expected. This was breaking applications like xterm and pidgin when using wide characters. Reported by: Vitalij Satanivskij Approved by: re
* libc/rpc: Make use of some xdr_* macros. (part 2)pfg2016-06-093-19/+19
| | | | | | xdr_rpcproc, xdr_rpcprog and xdr_rpcvers were broken in older versions of FreeBSD but fixed in r296394. Give them some use hoping they help make the code somewhat more readable.
* utimes(2),utime(3): Add deprecation in favour of utimensat(2) and futimens(2).jilles2016-06-092-4/+19
| | | | | | | Setting time by seconds or microseconds may cause unexpected effects especially if sysctl vfs.timestamp_precision=3 (not default). Calling the obsolete functions with NULL timestamps is acceptable.
* Fix frexpl() declaration to not include the field name.trasz2016-06-091-1/+1
| | | | MFC after: 1 month
* libc/rpc: Make use of some xdr_* macros.pfg2016-06-092-7/+7
| | | | | | xdr_rpcprog and xdr_rpcvers were broken in older versions of FreeBSD but were fixed in r296394. Give them some use hoping they help make the code somewhat more readable.
* Fix the rpcb_getaddr() definition to match its declaration.kevlo2016-06-091-1/+1
| | | | Submitted by: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
* Implement an NSS backend for netgroups and add getnetgrent_r(3).markj2016-06-093-115/+470
| | | | | | | | | | | | | | | | | | This support appears to have been documented in nsswitch.conf(5) for some time. The implementation adds two NSS netgroup providers to libc. The default, compat, provides the behaviour documented in netgroup(5), so this change does not make any user-visible behaviour changes. A files provider is also implemented. innetgr(3) is implemented as an optional NSS method so that providers such as NIS which are able to implement efficient reverse lookup can do so. A fallback implementation is used otherwise. getnetgrent_r(3) is added for convenience and to provide compatibility with glibc and Solaris. With a small patch to net/nss_ldap, it's possible to specify an ldap netgroup provider, allowing one to query nisNetgroupTriple entries. Sponsored by: EMC / Isilon Storage Division
* Fix an infinite loop in setnetgrent(3) with NIS netgroups.markj2016-06-091-0/+4
| | | | | | | | | | Handle an empty result from yp_match() by returning NULL, which is consistent with the handling of an empty netgroup in /etc/netgroup. setnetgrent(3) has no return value, so there is no particular need to distinguish this case from an error. PR: 26486 MFC after: 2 weeks
* Use a more common spelling for "(char *)0" in the getnetgrent man page.markj2016-06-091-2/+2
| | | | MFC after: 3 days
* Revert r301707ngie2016-06-081-2/+2
| | | | | | | | | getnetent_p doesn't return NULL like getnetent does. coccinelle got confused and I didn't verify that it worked before committing the change MFC after: 1 week X-MFC with: r301707 Pointyhat to: ngie
* Use NULL instead of `0` in _ht_getnetbyname(..)ngie2016-06-081-2/+2
| | | | | | | | - getnetent returns NULL on completion/error. - .h_aliases is NULL terminated. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* Test for strchr(3) returning NULL, not 0ngie2016-06-081-1/+1
| | | | | | MFC after: 3 days Reported by: coccinelle Sponsored by: EMC / Isilon Storage Division
* Update to a June 8th snapshot of (un)vis form NetBSD.brooks2016-06-081-0/+1
| | | | | | | | | | This adds stravis() and some new encoding flags VIS_SHELL, VIS_META, and VIS_NOLOCALE. Assorted cleanups and fixes includeing a manpage typo[0]. PR: 210013 [0] Submitted by: pi [0]
* Replace _pam_verbose_error() with a macro. This was the last differencedes2016-06-084-74/+9
| | | | | between our libpam and stock OpenPAM, meaning that it is now possible to replace the base libpam with a hypothetical ports version of OpenPAM.
* Don't leak olinep if malloc() fails.truckman2016-06-081-0/+2
| | | | | | | | | | | If malloc() fails to allocate linep, then free olinep (if it exists) before returning to avoid a memory leak. Reported by: Coverity CID: 1016716 Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D6755
* Don't leak addrinfo if ai->ai_addrlen <= minsiz test fails.truckman2016-06-081-12/+13
| | | | | | | | | | | | | | If the ai->ai_addrlen <= minsiz test fails, then freeaddrinfo() does not get called to free the memory just allocated by getaddrinfo(). Fix by moving ai->ai_addrlen <= minsiz to a separate nested if block, and keep freeaddrinfo() in the outer block so that freeaddrinfo() will be called whenever getaddrinfo() succeeds. Reported by: Coverity CID: 1273652 Reviewed by: ume MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D6756
* Introduce the PD_CLOEXEC for pdfork(2).oshogbo2016-06-081-1/+5
| | | | Reviewed by: mjg
* Add flags to the Casper services.oshogbo2016-06-0810-47/+79
| | | | | | | CASPER_SERVICE_STDIO - Casper will not close the first three descriptors (stdin, stdout and stderr) this can be helpful for debugging. CASPER_SERVICE_FD - Capser will not close all other descriptors, this can be useful for a filesystem service.
* Separate BLACKLIST vs BLACKLIST_SUPPORT properlylidl2016-06-071-1/+1
| | | | Sponsored by: The FreeBSD Foundation
OpenPOWER on IntegriCloud