summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge from headbapt2015-10-193-4/+54
|\ \ | |/
| * Document bitset(9)cem2015-10-171-2/+3
| |
| * resolver: automatically reload /etc/resolv.confvangyzen2015-10-142-2/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. https://lists.freebsd.org/pipermail/freebsd-arch/2015-October/017342.html Reviewed by: kp, wblock Discussed with: jilles, imp, alfred MFC after: 1 month Relnotes: yes Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D3867
* | Include sys/*.h earlierbapt2015-10-141-3/+5
| | | | | | | | Reported by: kib
* | Commit log from Dragonfly:bapt2015-10-134-17/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FreeBSD extended ctypes to include numbers (e.g. isnumber()) but never actually implemented it. The isnumber() function was equivalent to the isdigit() function in every case. Now that DragonFly's ctype source files have number definitions, the number ctype can finally be implemented. It's given a new flag _CTYPE_N. The isalnum() and iswalnum() functions have been changed to use this flag rather than the _CTYPE_D digit flag. While isalnum(), isnumber(), and their wide equivalents now return different values in locale cases, the ishexnumber() and iswhexnumber() functions are unchanged. They are still aliases for isxdigit() and iswxdigit(). Also change ctype.h for isdigit and isxdigit to use sbistype like the other functions. Obtained from: dragonfly
* | Merge from headbapt2015-10-13281-2054/+1555
|\ \ | |/
| * Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) andngie2015-10-1226-60/+9
| | | | | | | | | | | | | | | | | | | | | | | | netbsd-tests.test.mk (r289151) - Eliminate explicit OBJTOP/SRCTOP setting - Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk - Remove unnecessary TESTSDIR setting - Use SRCTOP where possible for clarity MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Divison
| * Change the default setting of kern.ipc.shm_allow_removed from 0 to 1.trasz2015-10-101-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the need for manually changing this flag for Google Chrome users. It also improves compatibility with Linux applications running under Linuxulator compatibility layer, and possibly also helps in porting software from Linux. Generally speaking, the flag allows applications to create the shared memory segment, attach it, remove it, and then continue to use it and to reattach it later. This means that the kernel will automatically "clean up" after the application exits. It could be argued that it's against POSIX. However, SUSv3 says this about IPC_RMID: "Remove the shared memory identifier specified by shmid from the system and destroy the shared memory segment and shmid_ds data structure associated with it." From my reading, we break it in any case by deferring removal of the segment until it's detached; we won't break it any more by also deferring removal of the identifier. This is the behaviour exhibited by Linux since... probably always, and also by OpenBSD since the following commit: revision 1.54 date: 2011/10/27 07:56:28; author: robert; state: Exp; lines: +3 -8; Allow segments to be used even after they were marked for deletion with the IPC_RMID flag. This is permitted as an extension beyond the standards and this is similar to what other operating systems like linux do. MFC after: 1 month Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3603
| * Use proper function prototypes.rodrigc2015-10-072-4/+4
| | | | | | | | Eliminates -Wstrict-prototypes warning
| * Document the recently added pl_syscall_* fields in struct ptrace_lwpinfo.jhb2015-10-071-1/+24
| | | | | | | | | | Reviewed by: emaste, kib Differential Revision: https://reviews.freebsd.org/D3833
| * truss: Add support for utrace(2).bdrewery2015-10-061-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This uses the kdump(1) utrace support code directly until a common library is created. This allows malloc(3) tracing with MALLOC_CONF=utrace:true and rtld tracing with LD_UTRACE=1. Unknown utrace(2) data is just printed as hex. PR: 43819 [inspired by] Reviewed by: jhb MFC after: 2 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D3819
| * - address grammarjgh2015-10-051-7/+6
| | | | | | | | | | | | | | | | PR: 203440 (based on) Submitted by: ceratv@rpi.edu Approved by: wblock@ (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D3813
| * Revert r288628 and instead fix a discrepancy between the posix_fadvise(2)markj2015-10-031-5/+7
| | | | | | | | | | | | | | man page and POSIX: posix_fadvise(2) returns an error number on failure. Reported by: jilles MFC after: 1 week
| * - Move PF_LOCAL at the end of the array. PF_INET{,6} is used more often.hrs2015-10-031-7/+9
| | | | | | | | | | | | | | - Add SOCKTYPE_ANY to PF_LOCAL. - Apply AI_CANONNAME to only AF_INET{,6}. It is not meaningful for the other AFs.
| * wordexp: Rewrite to make WRDE_NOCMD reliable.jilles2015-09-302-94/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Shell syntax is too complicated to detect command substitution and unquoted operators reliably without implementing much of sh's parser. Therefore, have sh do this detection. While changing sh's support anyway, also read input from a pipe instead of arguments to avoid {ARG_MAX} limits and improve privacy, and output count and length using 16 instead of 8 digits. The basic concept is: execl("/bin/sh", "sh", "-c", "freebsd_wordexp ${1:+\"$1\"} -f "$2", "", flags & WRDE_NOCMD ? "-p" : "", <pipe with words>); The WRDE_BADCHAR error is still implemented in libc. POSIX requires us to fail strings containing unquoted braces with code WRDE_BADCHAR. Since this is normally not a syntax error in sh, there is still a need for checking code in libc, we_check(). The new we_check() is an optimistic check that all the characters <newline> | & ; < > ( ) { } are quoted. To avoid duplicating too much sh logic, such characters are permitted when quoting characters are seen, even if the quoting characters may themselves be quoted. This code reports all WRDE_BADCHAR errors; bad characters that get past it and are a syntax error in sh return WRDE_SYNTAX. Although many implementations of WRDE_NOCMD erroneously allow some command substitutions (and ours even documented this), there appears to be code that relies on its security (codesearch.debian.net shows quite a few uses). Passing untrusted data to wordexp() still exposes a denial of service possibility and a fairly large attack surface. Reviewed by: wblock (man page only) MFC after: 2 weeks Relnotes: yes Security: fixes command execution with wordexp(untrusted, WRDE_NOCMD)
| * In this context fclose() can never fail, so assert it in the testdelphij2015-09-291-0/+1
| | | | | | | | case.
| * Annotate arm userspace assembler sources stating their tolerance tokib2015-09-2930-1/+56
| | | | | | | | | | | | | | the non-executable stack. Reviewed by: andrew Sponsored by: The FreeBSD Foundation
| * Use calloc() instead of malloc + memset.delphij2015-09-291-2/+1
| | | | | | | | MFC after: 2 weeks
| * fnmatch(): Remove exponential behaviour as in sh r229201.jilles2015-09-271-28/+49
| | | | | | | | | | | | The old code was exponential in the number of asterisks in the pattern. However, once a match has been found upto the next asterisk, the previous asterisks are no longer relevant.
| * Add missing CLEANFILES.bdrewery2015-09-241-0/+2
| | | | | | | | | | MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
| * Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.rodrigc2015-09-231-2/+2
| | | | | | | | | | Submitted by: Sascha Wildner <swildner@dragonflybsd.org> Obtained from: DragonFlyBSD (commit 5d7d35b17f98588c39b30036f1a3fe8802935c2c)
| * Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.rodrigc2015-09-224-21/+9
| |
| * Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.rodrigc2015-09-2235-409/+235
| |
| * Use proper function prototype for readdir().rodrigc2015-09-221-10/+6
| | | | | | | | | | | | | | Eliminates -Wstrict-prototypes warning Submitted by: Joerg Sonnenberger <joerg@dragonflybsd.org> Obtained from: DragonFlyBSD (commit 2a6aec8dab58c89961cabcfdb92e0d0ae256dea4)
| * Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.rodrigc2015-09-221-1/+1
| |
| * Avoid adding duplicates into OBJS. bsd.lib.mk already handles addingbdrewery2015-09-221-2/+0
| | | | | | | | | | | | | | entries to OBJS based on SRCS. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
| * Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.rodrigc2015-09-201-45/+16
| |
| * Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.rodrigc2015-09-209-49/+20
| |
| * Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.rodrigc2015-09-201-25/+10
| |
| * Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.rodrigc2015-09-201-7/+3
| |
| * Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.rodrigc2015-09-201-3/+1
| |
| * Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.rodrigc2015-09-201-25/+7
| |
| * Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.rodrigc2015-09-206-23/+7
| |
| * Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.rodrigc2015-09-205-106/+52
| |
| * Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.rodrigc2015-09-203-8/+6
| |
| * Remove names from some prototypesrodrigc2015-09-201-1/+1
| |
| * Remove names from some prototypesrodrigc2015-09-201-2/+2
| |
| * Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.rodrigc2015-09-2012-51/+28
| |
| * Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.rodrigc2015-09-2032-142/+56
| |
| * Remove names from some prototypesrodrigc2015-09-2012-14/+14
| |
| * Remove names from some prototypesrodrigc2015-09-202-5/+5
| |
| * Remove names from prototypesrodrigc2015-09-203-7/+7
| |
| * Add include for declaration of _set_tp(). Eliminates -Wmissing-prototypes ↵rodrigc2015-09-207-0/+7
| | | | | | | | warnings.
| * Add declarations to eliminate -Wmissing-prototypes warningsrodrigc2015-09-201-0/+3
| |
| * Use ANSI C prototypes.rodrigc2015-09-201-69/+31
| | | | | | | | Eliminates gcc 4.9 warnings.
| * Add declaration to eliminate -Wmissing-prototypes warningrodrigc2015-09-201-0/+2
| |
| * Add declarations to netdb_private.h to eliminate -Wmissing-prototypes warnings.rodrigc2015-09-205-20/+20
| |
| * Add declarations to eliminate -Wmissing-prototypes warningsrodrigc2015-09-201-0/+10
| |
| * Define _NS_PRIVATE to make declarations visible.rodrigc2015-09-201-0/+1
| | | | | | | | This eliminates -Wmissing-prototypes warnings.
| * Add missing includes to eliminate -Wmissing-prototypes warningsrodrigc2015-09-202-0/+3
| |
OpenPOWER on IntegriCloud