summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
...
| * - 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
| |
| * Adding missing declarations to eliminate -Wmissing-prototypes warningsrodrigc2015-09-202-0/+6
| |
| * Add missing include to eliminate -Wmissing-prototypes warningrodrigc2015-09-201-0/+1
| |
| * Add declaration to eliminate -Wmissing-prototypes warningrodrigc2015-09-201-0/+1
| |
| * Add declarations to eliminate -Wmissing-prototypes warningsrodrigc2015-09-2018-0/+35
| |
| * Adding missing include to eliminate -Wmissing-prototypes warningrodrigc2015-09-201-0/+1
| |
| * Add declarations to eliminate -Wmissing-prototypes warningsrodrigc2015-09-203-0/+6
| |
| * Add declarations to eliminate -Wmissing-prototypes warnings.rodrigc2015-09-203-0/+15
| |
| * Add declaration to eliminate -Wmissing-prototypes warning.rodrigc2015-09-201-0/+2
| |
| * Add missing include to eliminate -Wmissing-prototypes warningsrodrigc2015-09-201-0/+2
| |
| * Add missing includes to eliminate -Wmissing-prototypes warningsrodrigc2015-09-205-0/+5
| |
| * Add PF_LOCAL support in getaddrinfo(3) and getnameinfo(3):hrs2015-09-204-78/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | - In a PF_LOCAL address, "hostname" must begins with '/' and "servname" is always NULL. All of ai_flags are ignored. - PF_UNSPEC matches PF_LOCAL. EAI_SERVICE is not returned to make AF-independent programming easier; "servname" is always ignored in PF_LOCAL. In practice, PF_INET* and PF_LOCAL are mutually-exclusive because a hostname which begins with '/' is invalid in PF_INET*. No domain name resolution is performed for a PF_LOCAL address. Differential Revision: https://reviews.freebsd.org/D3634
| * libc: Consistently call _ioctl() internally, not ioctl().jilles2015-09-191-1/+3
| |
| * There is no HP 300 support in FreeBSD anymore, so remove the obsoletedelphij2015-09-181-6/+1
| | | | | | | | | | | | | | | | BUGS section. While I'm there also bump Dd date. MFC after: 2 weeks
OpenPOWER on IntegriCloud