summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix warning from valgrind when a failed entry is tested.eadler2012-12-171-0/+1
| | | | | | | | PR: kern/173008 Submitted by: Zhihao Yuan <lichray@gmail.com> Reviewed by: gabor Approved by: cperciva (implicit) MFC after: 1 week
* libc/iconv: Fix race condition with setting FD_CLOEXEC.jilles2012-12-171-5/+1
| | | | | | | | | A fork/exec could happen between open and fcntl, leaking a file descriptor. Using O_CLOEXEC fixes this and as a side effect simplifies the code. NetBSD already had this (I checked this after making the change myself). Reviewed by: gabor
* New devstat metrics for devstat_compute_statistics():trociny2012-12-153-9/+75
| | | | | | | | | DSM_TOTAL_DURATION DSM_TOTAL_DURATION_READ DSM_TOTAL_DURATION_WRITE DSM_TOTAL_DURATION_FREE DSM_TOTAL_DURATION_OTHER DSM_TOTAL_BUSY_TIME
* Eliminate redundant variable.pjd2012-12-121-6/+3
|
* libc: Make various internal file descriptors close-on-exec.jilles2012-12-112-2/+2
| | | | These are obtained via fopen().
* Cleanup a few duplicate llvm libs that snuck in with the recent update.dim2012-12-111-4/+1
| | | | Noticed by: rdivacky
* libc: Make various internal file descriptors close-on-exec.jilles2012-12-107-12/+12
| | | | These are obtained via fopen().
* Improve style(9) compliance of function declarations.brooks2012-12-101-4/+12
|
* Re-disable GSSAPI, which does not build on several archs.erwin2012-12-071-4/+4
| | | | Approved by: delphij (mentor)
* Update to 9.8.4-P1.erwin2012-12-074-9/+16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Security Fixes Prevents named from aborting with a require assertion failure on servers with DNS64 enabled. These crashes might occur as a result of specific queries that are received. New Features * Elliptic Curve Digital Signature Algorithm keys and signatures in DNSSEC are now supported per RFC 6605. [RT #21918] Feature Changes * Improves OpenSSL error logging [RT #29932] * nslookup now returns a nonzero exit code when it is unable to get an answer. [RT #29492] Other critical bug fixes are included. Approved by: delphij (mentor) MFC after: 3 days Security: CVE-2012-5688 Sponsored by: DK Hostmaster A/S
| * Vendor import of Bind 9.8.4erwin2012-12-05134-486/+1813
| | | | | | | | | | Approved by: delphij (mentor) Sponsored by: DK Hostmaster A/S
| * Vendor import of BIND 9.8.3-P3dougb2012-09-204-7/+35
| |
| * Vendor import of BIND 9.8.3-P2dougb2012-07-242-8/+23
| |
| * Vendor import of BIND 9.8.3-P1dougb2012-06-042-7/+12
| |
* | Document that socket(2) may fail with EAFNOSUPPORT if the family cannotkevlo2012-12-071-7/+12
| | | | | | | | | | | | | | be found. Reviewed by: glebius Obtained from: NetBSD
* | Fix build: reflect the increased field number.delphij2012-12-071-1/+1
| |
* | - Rewrite radius servers traversal algorithm.sem2012-12-067-42/+212
| | | | | | | | | | | | - Add functions for working with IPv6 attributes. Approved by: ae
* | remove redundant yyparse declarationsbapt2012-12-051-1/+0
| | | | | | | | | | PR: conf/174079 Submitted by: Garrett Cooper <yanegomi@gmail.com>
* | libc: Use the new 'e' fopen() mode option to simplify fstab.c.jilles2012-12-041-11/+1
| | | | | | | | No functional change is intended.
* | Document that bind(2) can fail with EAFNOSUPPORT.kevlo2012-12-041-0/+2
| | | | | | | | Reviewed by: glebius
| |
| \
*-. \ Upgrade our copy of llvm/clang to r168974, from upstream's release_32dim2012-12-0334-55/+114
|\ \ \ | | | | | | | | | | | | | | | | branch. This is effectively llvm/clang 3.2 RC2; the 3.2 release is coming soon.
| | * | Vendor import of clang release_32 branch r168974 (effectively, 3.2 RC2):dim2012-12-02374-14661/+27784
| | | | | | | | | | | | | | | | http://llvm.org/svn/llvm-project/cfe/branches/release_32@168974
| | * | Vendor import of clang trunk r162107:dim2012-08-1961-865/+1869
| | | | | | | | | | | | | | | | http://llvm.org/svn/llvm-project/cfe/trunk@162107
| * | | Vendor import of llvm release_32 branch r168974 (effectively, 3.2 RC2):dim2012-12-02707-17440/+53022
| | | | | | | | | | | | | | | | http://llvm.org/svn/llvm-project/llvm/branches/release_32@168974
* | | | Protect against DoS attacks, such as being described in CVE-2010-2632.marcel2012-12-011-22/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The changes were derived from what has been committed to NetBSD, with modifications. These are: 1. Preserve the existsing GLOB_LIMIT behaviour by including the number of matches to the set of parameters to limit. 2. Change some of the limits to avoid impacting normal use cases: GLOB_LIMIT_STRING - change from 65536 to ARG_MAX so that glob(3) can still provide a full command line of expanded names. GLOB_LIMIT_STAT - change from 128 to 1024 for no other reason than that 128 feels too low (it's not a limit that impacts the behaviour of the test program listed in CVE-2010-2632). GLOB_LIMIT_PATH - change from 1024 to 65536 so that glob(3) can still provide a fill command line of expanded names. 3. Protect against buffer overruns when we hit the GLOB_LIMIT_STAT or GLOB_LIMIT_READDIR limits. We append SEP and EOS to pathend in those cases. Return GLOB_ABORTED instead of GLOB_NOSPACE when we would otherwise overrun the buffer. This change also modifies the existing behaviour of glob(3) in case GLOB_LIMIT is specifies by limiting the *new* matches and not all matches. This is an important distinction when GLOB_APPEND is set or when the caller uses a non-zero gl_offs. Previously pre-existing matches or the value of gl_offs would be counted in the number of matches even though the man page states that glob(3) would return GLOB_NOSPACE when gl_matchc or more matches were found. The limits that cannot be circumvented are GLOB_LIMIT_STRING and GLOB_LIMIT_PATH all others can be crossed by simply calling glob(3) again and with GLOB_APPEND set. The entire description above applies only when GLOB_LIMIT has been specified of course. No limits apply when this flag isn't set! Obtained from: Juniper Networks, Inc
* | | | In globextend(), take advantage of the fact that realloc(NULL, size) ismarcel2012-12-011-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | equivalent to malloc(size). This eliminates the conditional expression used for calling either realloc() or malloc() when realloc() will do all the time.
* | | | In globextend() when the pathv vector cannot be (re-)allocated, don'tmarcel2012-12-011-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | free and clear the gl_pathv pointer in the glob_t structure. Such breaks the invariant of the glob_t structure, as stated in the comment right in front of the globextend() function. If gl_pathv was non-NULL, then gl_pathc was > 0. Making gl_pathv a NULL pointer without also setting gl_pathc to 0 is wrong. Since we otherwise don't free the memory associated with a glob_t in error cases, it's unlikely that this change will cause a memory leak that wasn't already there to begin with. Callers of glob(3) must call globfree(3) irrespective of whether glob(3) returned an error or not.
* | | | The getline function returns the number of characters read, noteadler2012-12-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | written. Use clearer text for this. PR: docs/174023 Submitted by: Paul Procacci <pprocacci@gmail.com> Approved by: bcr (mentor) MFC after: 1 week
* | | | libc: Allow setting close-on-exec in fopen/freopen/fdopen.jilles2012-11-304-2/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a new mode option 'e' that must follow any 'b', '+' and/or 'x' options. C11 is clear about the 'x' needing to follow 'b' and/or '+' and that is what we implement; therefore, require a strict position for 'e' as well. For freopen() with a non-NULL path argument and fopen(), the close-on-exec flag is set iff the 'e' mode option is specified. For freopen() with a NULL path argument and fdopen(), the close-on-exec flag is turned on if the 'e' mode option is specified and remains unchanged otherwise. Although the same behaviour for fopen() can be obtained by open(O_CLOEXEC) and fdopen(), this needlessly complicates the calling code. Apart from the ordering requirement, the new option matches glibc. PR: kern/169320
* | | | Document that getpeername(2) and getsockname(2) can fail with EINVAL.kevlo2012-11-232-0/+8
| | | | | | | | | | | | | | | | Reviewed by: glebius
* | | | only rename(2) after chmod(2) has succeedbapt2012-11-201-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | report error if chmod(2) fails Reported by: jh
* | | | change mode the group file to 0644 after a successfull rename(2)bapt2012-11-201-1/+8
| | | |
* | | | Cleanup the code a bit, which improves the portability.tuexen2012-11-191-43/+42
| | | | | | | | | | | | | | | | MFC after: 1 week
* | | | Fix the handling of mapped IPv6 addresses in sctp_connectx().tuexen2012-11-191-1/+0
| | | | | | | | | | | | | | | | MFC after: 3 days
* | | | - the preferred way to write a NULL pointer constant is with NULLkevlo2012-11-163-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | - whitespace nit Reviewed by: glebius
* | | | Fix weird indentation.des2012-11-161-4/+4
| | | |
* | | | mdoc: Use the Ev macro for environmental variables.joel2012-11-161-3/+3
| | | |
* | | | Document that rtprio(2) and rtprio_thread(2) can fail with EFAULTkevlo2012-11-161-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | due to the invoked copyout(9). Reviewed by: davidxu
* | | | Complete man page.grog2012-11-161-11/+27
| | | | | | | | | | | | | | | | MFC after: 2 weeks
* | | | Document that sendfile(2) can fail with ENOBUFS.kevlo2012-11-141-0/+2
| | | | | | | | | | | | | | | | Reviewed by: glebius
* | | | Document wait6() and waitid().kib2012-11-132-32/+282
| | | | | | | | | | | | | | | | | | | | | | | | PR: standards/170346 Submitted by: "Jukka A. Ukkonen" <jau@iki.fi> MFC after: 1 month
* | | | Implement the waitid() SUSv4 function using wait6() system call.kib2012-11-136-1/+72
| | | | | | | | | | | | | | | | | | | | | | | | PR: standards/170346 Submitted by: "Jukka A. Ukkonen" <jau@iki.fi> MFC after: 1 month
* | | | Add an explanatory comment to lib/libc/gen/isnan.c about the fix to makedim2012-11-111-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | static linking with libc and libm work. Requested by: jilles MFC after: 1 week X-MFC-With: 242879
* | | | Only define isnan, isnanf, __isnan and __isnanf in libc.so, not indim2012-11-102-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libc.a and libc_p.a. In addition, define isnan in libm.a and libm_p.a, but not in libm.so. This makes it possible to statically link executables using both isnan and isnanf with libc and libm. Tested by: kargl MFC after: 1 week
* | | | Clarify that the ' flag is an apostrophe.grog2012-11-081-1/+1
| | | | | | | | | | | | | | | | MFC after: 2 weeks
* | | | Implement DTrace for PowerPC. This includes both 32-bit and 64-bit.jhibbits2012-11-073-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is one known issue: Some probes will display an error message along the lines of: "Invalid address (0)" I tested this with both a simple dtrace probe and dtruss on a few different binaries on 32-bit. I only compiled 64-bit, did not run it, but I don't expect problems without the modules loaded. Volunteers are welcome. MFC after: 1 month
* | | | Simple unit-tests for libcrypt, to show how easy it is.sjg2012-11-072-0/+64
| | | | | | | | | | | | | | | | Approved by: marcel (mentor)
* | | | Fix typo; s/ouput/outputkevlo2012-11-071-1/+1
| | | |
* | | | Remove -L<path> from LDADD, it doesn't belong there.marcel2012-11-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Add it to LDFLAGS instead. Submitted by: Garrett Cooper <yanegomi@gmail.com>
* | | | Fix a few warnings from newer clang 3.2 in libpmc, about comparing enumdim2012-11-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pmc_event values against integer constants which fall outside the enum range. Reviewed by: fabient, sbruno MFC after: 3 days
OpenPOWER on IntegriCloud