summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-01-2510-15/+24
|\
| * MFC r294234: utimensat(2): Correct description of [EINVAL] error.jilles2016-01-211-3/+6
| |
| * MFC r293856:brooks2016-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | Avoid reading pass the end of the source buffer when it is not NUL terminated. If this buffer is adjacent to an unmapped page or a version of C with bounds checked is used this may result in a crash. PR: 206178 Submitted by: Alexander Cherepanov <cherepan@mccme.ru>
| * MFC r293855:brooks2016-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | Avoid reading pass the end of the source buffer when it is not NUL terminated. If this buffer is adjacent to an unmapped page or a version of C with bounds checked is used this may result in a crash. PR: 206177 Submitted by: Alexander Cherepanov <cherepan@mccme.ru>
| * Default __MAKE_SHELL to /bin/sh when generating aton_ether_subr.c viangie2016-01-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | `gen_ether_subr`. __MAKE_SHELL is only defined when installworld is run on stable/10, which breaks workflows dealing with source trees mounted with noexec [*] This is a direct commit to stable/10 Reported by: Mark Martinec <Mark.Martinec+freebsd@ijs.si> Sponsored by: EMC / Isilon Storage Division
| * MFC r293715:ngie2016-01-191-2/+2
| | | | | | | | | | | | | | | | | | | | Fix a mismerge from NetBSD in r162194 with `xdr_rpcb_entry_list_ptr(..)` This fixes the potential NULL pointer dereference properly, and also fixes memory leaks encountered in the process of iterating through `*rp`. Found by: Valgrind Submitted by: Miles Ohlrich <miles.ohlrich@isilon.com>
| * MFC r293705:ngie2016-01-181-2/+2
| | | | | | | | | | | | | | | | | | Similar to r293704, fix theoretical leak of netconfig(3) resources in __rpcbind_is_up(..) if getnetconfig(3) is partly successful in allocating resources, but not completely successful by moving the endnetconfig(3) call up before we return from the function if nconf == NULL. Submitted by: Miles Ohlrich <miles.ohlrich@isilon.com>
| * MFC r293704:ngie2016-01-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fix theoretical leak of netconfig(3) resources in svcunix_create(..) In the event that the getconfig(3) call in svcunix_create is partly successful, some of the netconfig(3) resources allocated might be leaked if the call returns NULL as endnetconfig(3) wasn't called explicitly in that case. Ensure that the resources are fully cleaned up by going to the `done` label, which will call endnetconfig(3) for us. Submitted by: Miles Ohlrich <miles.ohlrich@isilon.com>
| * MFC r287619:tuexen2016-01-161-2/+0
| | | | | | | | | | | | | | | | | | Zero out a local variable also when PURIFY is not defined. This silence a warning brought up by valgrind whenever if_nametoindex is used. This was already discussed in PR 166483, but the code committed in r234329 guards the initilization with #ifdef PURIFY. Therefore, valgrind still complains. Since this code is not performance critical, always zero out the local variable to silence valgrind.
| * MFC r293783: futimens/utimensat: Use the new system calls.jilles2016-01-153-4/+10
| | | | | | | | | | | | | | | | | | Update the __FreeBSD_version check in lib/libc/sys/futimens.c and lib/libc/sys/utimensat.c. Before this, fallback code using futimes/futimesat/lutimes was used except when running on a sufficiently recent 11-current kernel. Also, update the history section in the man page.
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-01-1313-111/+559
|\ \ | |/
| * MFC r287964:trasz2016-01-121-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Kernel part of reroot support - a way to change rootfs without reboot. Note that the mountlist manipulations are somewhat fragile, and not very pretty. The reason for this is to avoid changing vfs_mountroot(), which is (obviously) rather mission-critical, but not very well documented, and thus hard to test properly. It might be possible to rework it to use its own simple root mount mechanism instead of vfs_mountroot(). Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2698
| * MFC r285240:trasz2016-01-124-99/+2
| | | | | | | | | | | | | | Remove reboot.S (part of libc). It's not needed and was actually broken - returning 0 from reboot(2) resulted in SIGBUS. Sponsored by: The FreeBSD Foundation
| * MFC r277610 (by jillies):dchagin2016-01-096-0/+510
| | | | | | | | Add futimens and utimensat system calls.
| * MFC r291114: popen() requires check for fdopen() failurerpokala2016-01-091-10/+24
| | | | | | | | | | | | | | | | Move fdopen() up near other resource allocation like malloc(); do proper deallocation on failure later on in the function. Approved by: jhb Sponsored by: Panasas, Inc.
| * MFC r292047: RPC: populate local address for rendezvous transporter.stas2016-01-081-2/+16
| |
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-01-072-57/+0
|\ \ | |/
| * MFC r292719:ume2016-01-012-57/+0
| | | | | | | | | | Remove _gethostbynisname() and _gethostbynisaddr(). These functions used to be called from getipnodebyname().
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2015-12-3015-12/+5797
|\ \ | |/
| * MFC r292550, r292595:ume2015-12-291-12/+4
| | | | | | | | | | Simplify _map_v4v6_address(). We don't need to use a temporary buffer, here.
| * MFC r292317,r292318,r292323,r292324,r292665:ngie2015-12-2814-0/+5793
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r292317: Integrate tools/regression/lib/libc/resolv into the FreeBSD test suite as lib/libc/tests/resolv Convert the testcases to ATF Sponsored by: EMC / Isilon Storage Division r292318: Add Makefile accidentally missed in r292317 Sponsored by: EMC / Isilon Storage Division r292323: Integrate tools/regression/lib/libc/nss into the FreeBSD test suite as lib/libc/tests/nss - Convert the testcases to ATF - Do some style(9) cleanups: -- Sort headers -- Apply indentation fixes -- Remove superfluous parentheses - Explicitly print out debug printfs for use with `kyua {debug,report}`; for items that were overly noisy, they've been put behind #ifdef DEBUG conditionals - Fix some format strings Sponsored by: EMC / Isilon Storage Division r292324: Iterate down lib/libc/tests/nss... Sponsored by: EMC / Isilon Storage Division r292665: Increase the timeout for resolv_test from the default (300 seconds) to 450 seconds This is required on slower network connections, and on older releases (stable/10 seems to be slower as far as name resolution goes.. not sure why yet). Remove an outdated comment in the Makefile from when I was working on this code over a year ago on github Sponsored by: EMC / Isilon Storage Division
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2015-12-286-55/+205
|\ \ | |/
| * MFC r292445, r292554:ume2015-12-282-8/+6
| | | | | | | | Use _map_v4v6_address().
| * MFC r292539:ume2015-12-281-1/+6
| | | | | | | | | | | | | | If we end up following a CNAME chain that does not find any data return that instead of internal error. PR: 156684
| * MFC r292513: clock_gettime(2),gettimeofday(2): Remove [EFAULT] error.jilles2015-12-272-8/+2
| | | | | | | | | | | | | | | | | | Depending on system configuration and parameters, clock_gettime() and gettimeofday() may not be system calls. If so, passing an invalid pointer will cause a signal and not an [EFAULT] error. From a standards perspective, this is OK since passing an invalid pointer is undefined behaviour.
| * MFC r292510:kib2015-12-271-3/+8
| | | | | | | | Fix lockf(3) cancellation behaviour.
| * MFC r292514:ume2015-12-271-8/+8
| | | | | | | | | | | | addrinfo.ai_family is an address family, not a protocol family. PR: 162434
| * Add AI_V4MAPPED and AI_ALL support for getaddrinfo(3).ume2015-12-252-28/+176
| | | | | | | | PR: 198092
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2015-12-2212-58/+163
|\ \ | |/
| * MFC: r291073araujo2015-12-211-5/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a NIS server has long entries on its database that is bigger than 1024 specified on YPMAXRECORD the ypmatch can get in an infinite retry loop when is requesting the information from the NIS server. The ypmatch(1) will return an error until the command receives an kill(1). To avoid this problem, we check the MAX_RETRIES that is by default set to 20 and avoid get in infinet loop at the client side. NOTE: FreeBSD nis(8) server doesn't present this issue. Submitted by: Ravi Pokala <rpokala at panasas.com>, Lakshmi N. Sundararajan <lakshmi.n at msystechnologies.com>, Lewis, Fred <flewis at panasas.com>, Pushkar Kothavade <pushkar.kothavade at msystechnologies.com>
| * MFC r292130: exec(3): Fix COMPATIBILITY section: default path does notjilles2015-12-201-2/+2
| | | | | | | | contain cwd.
| * MFC r292153:ngie2015-12-201-1/+1
| | | | | | | | | | | | | | | | | | Add -static to CFLAGS to unbreak the tests by using a libc.a with the xlocale private symbols exposed which aren't exposed publicly via the DSO PR: 191354 Sponsored by: EMC / Isilon Storage Division
| * MFC r289315, r292216vangyzen2015-12-193-4/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | resolver: automatically reload /etc/resolv.conf On each resolver query, use stat(2) to see if the modification time of /etc/resolv.conf has changed. If so, reload the file and reinitialize the resolver library. However, only call stat(2) if at least two seconds have passed since the last call to stat(2), since calling it on every query could kill performance. This new behavior is enabled by default. Add a "reload-period" option to disable it or change the period of the test. Document this behavior and option in resolv.conf(5). Polish the man page just enough to appease igor. Relnotes: yes Sponsored by: Dell Inc.
| * MFC r289837vangyzen2015-12-191-39/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | resolver: abuse _res a little less In the past, _res was a global variable. Now, it's multiple function calls. Several functions in the resolver use _res multiple times and therefore call the function(s) far more than necessary. Fix those callers to store the result of _res in a local variable. Add __noinline to the definition of res_init() to avoid the code bloat that these changes would have otherwise incurred. Thanks to jilles for noticing this. Sponsored by: Dell Inc.
| * MFC r292129:ume2015-12-191-1/+1
| | | | | | | | | | | | | | | | | | RFC 3493 requires ignoring the loopback address for AI_ADDRCONFIG. Since it breaks certain jail setup, we ignore just 127.0.0.1 instead of whole loopback address range. PR: 192014 Reviewed by: hrs
| * MFC r292250:ngie2015-12-185-5/+15
| | | | | | | | | | | | | | | | Allow users override `DEBUG` on the command line via DEBUG_FLAGS="-DDEBUG" with lib/libc/resolv by conditionalizing its definition Reviewed by: ume, vangyzen Differential Revision: https://reviews.freebsd.org/D4519
| * MFC r292059:ume2015-12-171-1/+2
| | | | | | | | | | | | | | | | The calls to RES_SET_H_ERRNO() macro on error paths wind up dereferencing an uninitialized res. PR: 202142 Submitted by: Sean Boudreau
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2015-12-1410-83/+72
|\ \ | |/
| * MFC r291837:ngie2015-12-133-4/+6
| | | | | | | | | | | | | | | | | | | | split.ih: - Create automatically generated include header for split.c main.c: - Use function definitions from debug.ih and split.ih instead of externs Sponsored by: EMC / Isilon Storage Division
| * Revert r292168 -- I used the wrong commit message by accidentngie2015-12-133-6/+4
| |
| * MFC r276737,r289369,r289376,r289424,r291219,r291382,r291385,r291908:ngie2015-12-133-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r276737 (by imp): Remove old ioctl use and support, once and for all. r289369 (by emaste): newfs_msdos: rework option parsing to match NetBSD NetBSD split newfs_msdos in two so that they can reuse the file system creation part in makefs. This change is a step on the path of bringing that support to FreeBSD. Reviewed by: kib, pfg Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3905 r289376 (by emaste): newfs_msdos: move mkfs_msdos to separate file for later use in makefs Sponsored by: The FreeBSD Foundation r289424 (by emaste): newfs_msdos: prefer snprintf to sprintf Obtained from: NetBSD Sponsored by: The FreeBSD Foundation r291219 (by emaste): newfs_msdos: rework error handling for eventual use in makefs Return -1 on errors from mkfs_msdos() instead of err()/errx(), to allow different consumers to handle errors as appropriate. Obtained from: NetBSD Sponsored by: The FreeBSD Foundation r291382 (by emaste): mkfs_msdos: sync with NetBSD Add a sanity test and clean up whitespace. Obtained from: NetBSD r291385 (by emaste): Use netbsd usage() implementation in newfs_msdos In r289629 newfs_msdos option descriptions are available in mkfs_msdos.h. Obtained from: NetBSD r291908: Fix leak in mkfs_msdos(..) by initializing img to NULL and free'ing at the end of the function Differential Revision: https://reviews.freebsd.org/D4405 PR: 204943 Reviewed by: emaste, jilles Reported by: David Binderman <dcb314@hotmail.com> Sponsored by: EMC / Isilon Storage Division
| * MFC r291980,r291981:ngie2015-12-133-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r291980: Add missing va_ends for corresponding va_starts to clean up variable arguments initialized in _test_fmt(..) Reported by: cppcheck Sponsored by: EMC / Isilon Storage Division r291981: Delete bogus freeing of uninitialized data Reported by: cppcheck Sponsored by: EMC / Isilon Storage Division
| * MFC r292013:ngie2015-12-132-4/+4
| | | | | | | | | | | | | | Use stdint.h instead of inttypes.h as the latter pollutes namespace more Submitted by: bde Sponsored by: EMC / Isilon Storage Division
| * MFC r291832,r291833,r291834,r291835,r291836,r291838:ngie2015-12-133-78/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r291832: Fix -Wformat warnings by using the correct format qualifiers Sponsored by: EMC / Isilon Storage Division r291833: - Use ANSI C function prototypes/definitions instead of K&R style ones - Add a missing return type for main(..) Sponsored by: EMC / Isilon Storage Division r291834: Add missing headers and sort #includes per style(9) Sponsored by: EMC / Isilon Storage Division r291835: Use ANSI C function prototypes/definitions instead of K&R style ones Sponsored by: EMC / Isilon Storage Division r291836: Use `==` instead of `=` in the function comment above split(..) so mkh -p exposes split(..). Sponsored by: EMC / Isilon Storage Division r291838: Fix -Wformat issues and minor whitespace issues in surrounding areas Sponsored by: EMC / Isilon Storage Division
| * MFC r292004:ngie2015-12-132-0/+6
| | | | | | | | | | | | | | | | | | | | Fix compilation when -DDEBUG is defined by adding inttypes.h #include for intmax_t Differential Revision: https://reviews.freebsd.org/D4434 Reported by: cppcheck Reviewed by: jhb Sponsored by: EMC / Isilon Storage Division
| * MFC r291979:ngie2015-12-131-0/+1
| | | | | | | | | | | | | | Unbreak compiling getnetgrent.c with -DDEBUG after r236402 by adding a missing "}" Sponsored by: EMC / Isilon Storage Division
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2015-12-1018-28/+2650
|\ \ | |/
| * MFC r291296:ngie2015-12-051-0/+1
| | | | | | | | Link localeconv(3) to localeconv_l(3)
| * MFC r283801,r290846,r290851,r290856,r290860:ngie2015-12-055-13/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r283801 (by araujo): Fix warning of implicit declaration of function 'mkdir'. Differential Revision: D2662 Reviewed by: rodrigc, ngie r290846: Bump WARNS to 2 Sponsored by: EMC / Isilon Storage Division r290851: Change WARNS to 2 across the board with all the libc testcases This effectively "reverts" r290846 Sponsored by: EMC / Isilon Storage Division r290856 (by bapt): also skip the definition of ':fopen_regular' to avoid the build to fail due to unused variables defined by ATF macros r290860 (by bapt): Remove unused variables to fix building world
| * MFC r290537,r290540,r290560,r290856,r290871,r291839:ngie2015-12-0514-23/+2653
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r290537: Integrate tools/regression/lib/libc/stdio into the FreeBSD test suite as lib/libc/tests/stdio - Fix some whitespace - Convert the testcases to ATF - Convert "/dev/null" to _PATH_DEVNULL Sponsored by: EMC / Isilon Storage Division r290540: printfloat_test and scanfloat_test need symbols from msun; these are automatically provided on amd64, but not i386. Add libm to DPADD/LDADD to unbreak the i386 tinderbox Pointyhat to: ngie Sponsored by: EMC / Isilon Storage Division r290560: Convert print_positional_test over to ATF Somehow missed in r290537 Sponsored by: EMC / Isilon Storage Division r290856 (by bapt): also skip the definition of ':fopen_regular' to avoid the build to fail due to unused variables defined by ATF macros r290871: Disable -Wformat with scanfloat_test when compiling with gcc to avoid a "use of assignment suppression and length modifier together in scanf format" warning on line 90 (it's intentional) Sponsored by: EMC / Isilon Storage Division r291839: Initialize errno to 0 in the nul testcase before testing it For some odd reason stable/10 requires this, otherwise it always fails the errno == 0 check on line 196. Sponsored by: EMC / Isilon Storage Division
OpenPOWER on IntegriCloud