Bryan Drewery
195aef9962
truss: Add support for utrace(2).
...
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
2015-10-06 21:58:38 +00:00
Jason Helfman
816c67bac0
- address grammar
...
PR: 203440 (based on)
Submitted by: ceratv@rpi.edu
Approved by: wblock@ (mentor)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D3813
2015-10-05 18:09:43 +00:00
Mark Johnston
403ec61cbb
Revert r288628 and instead fix a discrepancy between the posix_fadvise(2)
...
man page and POSIX: posix_fadvise(2) returns an error number on failure.
Reported by: jilles
MFC after: 1 week
2015-10-03 22:27:14 +00:00
Hiroki Sato
4c60a05d25
- Move PF_LOCAL at the end of the array. PF_INET{,6} is used more often.
...
- Add SOCKTYPE_ANY to PF_LOCAL.
- Apply AI_CANONNAME to only AF_INET{,6}. It is not meaningful for the
other AFs.
2015-10-03 12:40:54 +00:00
Jilles Tjoelker
d358fa780b
wordexp: Rewrite to make WRDE_NOCMD reliable.
...
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)
2015-09-30 21:32:29 +00:00
Xin LI
b95523e859
In this context fclose() can never fail, so assert it in the test
...
case.
2015-09-29 17:54:28 +00:00
Konstantin Belousov
96cdb0ab9d
Annotate arm userspace assembler sources stating their tolerance to
...
the non-executable stack.
Reviewed by: andrew
Sponsored by: The FreeBSD Foundation
2015-09-29 16:09:58 +00:00
Xin LI
55b2d63309
Use calloc() instead of malloc + memset.
...
MFC after: 2 weeks
2015-09-29 04:47:31 +00:00
Jilles Tjoelker
3caeab9db2
fnmatch(): Remove exponential behaviour as in sh r229201.
...
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.
2015-09-27 12:52:18 +00:00
Bryan Drewery
660d1f65bb
Add missing CLEANFILES.
...
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-09-24 23:15:24 +00:00
Craig Rodrigues
f1e1637581
Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
...
Submitted by: Sascha Wildner <swildner@dragonflybsd.org>
Obtained from: DragonFlyBSD (commit 5d7d35b17f98588c39b30036f1a3fe8802935c2c)
2015-09-23 16:16:16 +00:00
Craig Rodrigues
c6a7de08f1
Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
2015-09-22 15:57:26 +00:00
Craig Rodrigues
587cf6827d
Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
2015-09-22 15:40:07 +00:00
Craig Rodrigues
3e2981e8b8
Use proper function prototype for readdir().
...
Eliminates -Wstrict-prototypes warning
Submitted by: Joerg Sonnenberger <joerg@dragonflybsd.org>
Obtained from: DragonFlyBSD (commit 2a6aec8dab58c89961cabcfdb92e0d0ae256dea4)
2015-09-22 07:40:55 +00:00
Craig Rodrigues
996f7159b1
Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
2015-09-22 07:31:40 +00:00
Bryan Drewery
cca3306a7f
Avoid adding duplicates into OBJS. bsd.lib.mk already handles adding
...
entries to OBJS based on SRCS.
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-09-22 04:55:28 +00:00
Craig Rodrigues
3ba5ea2408
Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
2015-09-20 21:21:17 +00:00
Craig Rodrigues
626c9d7433
Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
2015-09-20 21:21:01 +00:00
Craig Rodrigues
d9556fb15d
Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
2015-09-20 20:55:00 +00:00
Craig Rodrigues
5e939c7dcb
Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
2015-09-20 20:53:24 +00:00
Craig Rodrigues
107909b888
Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
2015-09-20 20:52:13 +00:00
Craig Rodrigues
85cef63214
Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
2015-09-20 20:51:52 +00:00
Craig Rodrigues
060e5496fc
Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
2015-09-20 20:50:56 +00:00
Craig Rodrigues
c83f3fc4b4
Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
2015-09-20 20:50:18 +00:00
Craig Rodrigues
25070501c6
Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
2015-09-20 20:28:49 +00:00
Craig Rodrigues
4178e4b070
Remove names from some prototypes
2015-09-20 20:27:57 +00:00
Craig Rodrigues
7dcedc7a74
Remove names from some prototypes
2015-09-20 20:26:46 +00:00
Craig Rodrigues
f98e0c9dd8
Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
2015-09-20 20:24:28 +00:00
Craig Rodrigues
55b6b759c8
Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
2015-09-20 20:23:16 +00:00
Craig Rodrigues
d5bf9eb518
Remove names from some prototypes
2015-09-20 20:21:49 +00:00
Craig Rodrigues
8d7e1f1585
Remove names from some prototypes
2015-09-20 20:16:34 +00:00
Craig Rodrigues
48d59c2270
Remove names from prototypes
2015-09-20 20:15:44 +00:00
Craig Rodrigues
6874645fa9
Add include for declaration of _set_tp(). Eliminates -Wmissing-prototypes warnings.
2015-09-20 04:59:01 +00:00
Craig Rodrigues
25462e6589
Add declarations to eliminate -Wmissing-prototypes warnings
2015-09-20 04:26:55 +00:00
Craig Rodrigues
193d994d2d
Use ANSI C prototypes.
...
Eliminates gcc 4.9 warnings.
2015-09-20 04:23:16 +00:00
Craig Rodrigues
0b64c636db
Add declaration to eliminate -Wmissing-prototypes warning
2015-09-20 04:21:44 +00:00
Craig Rodrigues
9a50fd2d05
Add declarations to netdb_private.h to eliminate -Wmissing-prototypes warnings.
2015-09-20 04:20:31 +00:00
Craig Rodrigues
bf1aa507b0
Add declarations to eliminate -Wmissing-prototypes warnings
2015-09-20 04:17:53 +00:00
Craig Rodrigues
ae274020ba
Define _NS_PRIVATE to make declarations visible.
...
This eliminates -Wmissing-prototypes warnings.
2015-09-20 04:17:03 +00:00
Craig Rodrigues
ffdd70376a
Add missing includes to eliminate -Wmissing-prototypes warnings
2015-09-20 04:15:37 +00:00
Craig Rodrigues
9762525c95
Adding missing declarations to eliminate -Wmissing-prototypes warnings
2015-09-20 04:06:55 +00:00
Craig Rodrigues
f8af09cd0f
Add missing include to eliminate -Wmissing-prototypes warning
2015-09-20 04:06:04 +00:00
Craig Rodrigues
6db7b53b71
Add declaration to eliminate -Wmissing-prototypes warning
2015-09-20 03:59:27 +00:00
Craig Rodrigues
e0b54d0140
Add declarations to eliminate -Wmissing-prototypes warnings
2015-09-20 03:58:27 +00:00
Craig Rodrigues
97f3e1c2a2
Adding missing include to eliminate -Wmissing-prototypes warning
2015-09-20 03:56:57 +00:00
Craig Rodrigues
486828e8a3
Add declarations to eliminate -Wmissing-prototypes warnings
2015-09-20 03:55:03 +00:00
Craig Rodrigues
8d3aa83d8b
Add declarations to eliminate -Wmissing-prototypes warnings.
2015-09-20 03:53:08 +00:00
Craig Rodrigues
d5cc6f7378
Add declaration to eliminate -Wmissing-prototypes warning.
2015-09-20 03:51:15 +00:00
Craig Rodrigues
7ca26e3831
Add missing include to eliminate -Wmissing-prototypes warnings
2015-09-20 03:49:08 +00:00
Craig Rodrigues
cfb65fa249
Add missing includes to eliminate -Wmissing-prototypes warnings
2015-09-20 03:45:57 +00:00