summaryrefslogtreecommitdiffstats
path: root/usr.bin
Commit message (Collapse)AuthorAgeFilesLines
* MFC r308314:pfg2016-11-091-0/+3
| | | | | | | | | | | | | | | sed(1): add LEGACY_BSDSED_COMPAT compile-time flag. In r297602, which included a __FreeBSD_version bump to 1100105, we changed sed 'i' and 'a' from discarding whitespaces to conform with what GNU and sysvish sed do. There are arguments in favor of keeping the old behavior but the new behavior is also useful for migration purposes. It seems important to at least consider the case of developers depending on the previous behavior so add a CFLAG to enable the old behavior. PR: 213474
* MFC: r302481bapt2016-11-061-1/+1
| | | | | | | | Revert the change from errx/strerror to errc to appease gcc 4.2 I have forgotten this part in r307794 Reported by: lidl
* MFC r306782-r306783bapt2016-11-052-15/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r306782: localedef: Fix ctype dump (fixed wide spread errors) This commit is from John Marino in dragonfly with the following commit log: ==== This was a CTYPE encoding error involving consecutive points of the same ctype. It was reported by myself to Illumos over a year ago but I was unsure if it was only happening on BSD. Given the cause, the bug is also present on Illumos. Basically, if consecutive points were of the exact same ctype, they would be defined as a range regardless. For example, all of these would be considered equivalent: <A> ... <C>, <H> (converts to <A> .. <H>) <A>, <B>, <H> (converts to <A> .. <H>) <A>, <J> ... <H> (converts to <A> .. <H>) So all the points that shouldn't have been defined got "bridged" by the extreme points. The effects were recently reported to FreeBSD on PR 213013. There are countless places were the ctype flags are misdefined, so this is a major fix that has to be MFC'd. ==== This reveals a bad change I did on the testsuite: while 0x07FF is a valid unicode it is not used yet (reserved for future use) PR: 213013 Submitted by: marino@ Reported by: Kurtis Rader <krader@skepticism.us> Obtained from: Dragonfly MFC after: 1 month r306783: localedef: Improve cc_list parsing original commit log: ===== I had originally suspected the parsing of ctype definition files as being the source of the ctype flag mis-definitions, but it wasn't. In the process, I simplified the cc_list parsing so I'm committing the no-impact improvement separately. It removes some parsing redundancies and won't parse partial range definitions anymore. ==== Submitted by: marino Obtained from: Dragonfly MFC after: 1 month
* MFC r308148, r308150, r308156:gjb2016-11-031-4/+6
| | | | | | | | | | | | | r308148: Fix packaging calendar(1) files. r308150: Fix packaging /usr/share/examples/etc. r308156: Fix packaging /usr/lib{,32}/libgcc_eh{,_p}.a. Sponsored by: The FreeBSD Foundation
* MFC r307861:mm2016-10-313-3/+3
| | | | | | | Update libarchive to 3.2.2 Most of the post-3.2.1 fixes have already been merged. This update contains just the version bump and some fixes to the test framework.
* MFC 303002: Include process IDs in core dumps.jhb2016-10-281-0/+1
| | | | | | | | | When threads were added to the kernel, the pr_pid member of the NT_PRSTATUS note was repurposed to store LWP IDs instead of process IDs. However, the process ID was no longer recorded in core dumps. This change adds a pr_pid field to prpsinfo (NT_PRSINFO). Rather than bumping the prpsinfo version number, note parsers can use the note's payload size to determine if pr_pid is present.
* MFC r307638:gahr2016-10-261-2/+2
| | | | | | | | | | | Chase a cornercase in printenv and sync its behaviour with builtin's The cornercase is when printenv is passed a parameter in the form VAR=val, where VAR=val exists in the environment. In this case, printenv would print a spurious newline and returns 0. Approved by: cognet MFC after: 1 week
* MFC r307520: elfdump: correct DT_AUXILIARY / DT_USED / DT_FILTER definitionsemaste2016-10-241-3/+3
| | | | | | r109332 introduced these three as DT_SUNW_*. Update to the correct names already used elsewhere in FreeBSD and the Sun "Linker and Libraries Guide"
* MFC r302471, r302473:bapt2016-10-222-15/+13
| | | | | | | | | | | | | | | | r302471: Add RCS Id. Sort options in SYNOPSIS. Fix macro usage. Fix Dd. Submitted by: wiz@NetBSD.org Obtained from: NetBSD r302473: Sync usage between program and man page. Increase column width. [1] Simplifay the usage() function Replace errx/strerror with errc Submitted by: wiz@NetBSD.org [1] Obtained from: NetBSD
* MFC r303265:bapt2016-10-221-2/+1
| | | | Remove reference cpp(1) which is not used anymore
* MFC r303783, r305927:bapt2016-10-221-40/+29
| | | | | | | | | | | | | r303783: sdiff: remove non finish/function code 2 extra options not available neither on other BSD nor in GNU sdiff: --diff-pid and --pipe-fd were present in the SoC code, none were usable Just remove it r305927: Remove reference of z(s)diff which was dropped before importing
* MFC: 305937bapt2016-10-221-1/+34
| | | | | | | Capsicum-ize tee(1) Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D7940
* MFC: 307368,307369,307372,307381bapt2016-10-225-56/+29
| | | | | | | | Remove the common.h include which is actually not used in sdiff.c Turn editit into a static function Move cleanup() into the edit.c file which is the only users of that function Remove common.{c,h} Fix typos in sdiff(1) message and improve display
* MFH (r305414): add a toggle to show approximate swap usage.des2016-10-221-8/+55
|
* MFC r303367:ngie2016-10-211-1/+0
| | | | | | Testcase 7.8 no longer needs to be marked TODO It passes out of the box today
* MFC r303541, r303542, r303543, r303545, r303546, r303547, r304225, r304226, ↵araujo2016-10-219-20/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r304605, r304676, r305212, r305863: r303541: Use nitems() from sys/param.h. Sponsored by: gandi.net (BSD Day Taiwan) MFC after: 2 weeks. r303542: Use nitems() from sys/param.h. MFC after: 2 weeks. Sponsored by: gandi.net (BSD Day Taiwan) r303543: Use nitems() from sys/param.h. MFC after: 2 weeks. Sponsored by: gandi.net (BSD Day Taiwan) r303545: Use nitems() from sys/param.h. MFC after: 2 weeks. Sponsored by: gandi.net (BSD Day Taiwan) r303546: Use nitems() from sys/param.h. MFC after: 2 weeks. Sponsored by: gandi.net (BSD Day Taiwan) r303547: Use nitems() from sys/param.h. MFC after: 2 weeks. Sponsored by: gandi.net (BSD Day Taiwan) r304225: Use nitems() from sys/param.h. MFC after: 2 weeks. r304226: Use nitems() from sys/param.h. MFC after: 2 weeks. r304605: Fix calloc(3) argument order. Reviewed by: trasz MFC after: 4 weeks. Differential Revision: https://reviews.freebsd.org/D7532 r304676: Fix calloc(3) argument order. MFC after: 4 weeks. r305212: - Invert calloc(3) argument order. MFC after: 4 weeks r305863: Invert calloc(3) argument order. Reviewed by: ed. MFC after: 4 weeks. Differential Revision: https://reviews.freebsd.org/D7902
* MFC r302558:gahr2016-10-191-108/+133
| | | | | | | | Do not truncate lines longer than 512 chars. PR: 210344 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D6881
* MFC r303818, r303833, r303941, r304478, r304481, r304483, r304484, r304554,ed2016-10-121-2/+0
| | | | | | | | | | | | | | | | | | r304555, r304556, r304557, r304558, r304559, r304561, r304563, r304564, r304565, r304615, r304742, r304743, r304744, r304745, r304748, r304886, r304991, r305928, r305938, r305987, r306185: Bring CloudABI support back in sync with HEAD. - Add support for running 32-bit executables on amd64, armv6 and i386. - As these new architectures require the use of the vDSO, merge back vDSO support for 64-bit executables running on amd64 and arm64 as well. This has the advantage that support for vDSO-less execution can be phased out when 11.0 becomes unsupported, as opposed to 11.x. This change has been tested by running the cloudlibc unit tests on all supported architectures, which seems to work fine.
* MFC r306560, r306561:pfg2016-10-091-4/+3
| | | | | | | | | patch(1): make some macros look boolean. Minor cleanup inspired by a new patch(1) variant in schily tools. For reference: https://sourceforge.net/p/schillix-on/
* MFC r305813:pfg2016-10-091-3/+3
| | | | | | | | | | localedef(1): make better use of calloc(3) arguments. The first argument of calloc(3) should be an ordinal type, and the second a size: split a multiplication to make better use of calloc(3) and detect overflows. Do some other re-ordering and style fixes while here.
* MFC 302859: Include command line arguments in core dump process info.jhb2016-10-061-1/+15
| | | | | Fill in pr_psargs in the NT_PRSINFO ELF core dump note with command line arguments.
* MFC: r304059rmacklem2016-10-031-3/+26
| | | | | | Update the man page to descibe the "-d" option added by r304058. This is a content change.
* MFC: r304058, r304066, r304194rmacklem2016-10-032-268/+504
| | | | | | Update nfsstat.c to use the new kernel nfsstat structure and add the new "-d" flag from D1626. The man page will be updated in a subsequent commit.
* MFC r306261:kib2016-09-304-0/+206
| | | | | | | Add proccontrol(1). MFC r306281 (by bdrewery): DIRDEPS_BUILD: Connect new directories.
* MFC r306131asomers2016-09-261-1/+1
| | | | Update mkimg(1) author's contact info
* MFC bspatch Capsicumization, sanity checks, and other improvementsemaste2016-09-221-75/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r304691: bspatch: apply style(9) Make style changes (and trivial refactoring of open calls) now in order to reduce noise in diffs for future capsicum changes. r304807 (allanjude): Capsicumize bspatch Move all of the fopen() and open() calls to the top of main() Restrict each FD to least privilege (read/seek only, write only, etc) cap_enter(), and make all except the output FD read/seek only. r304821: bspatch: remove output file in the case of error r305486: bspatch: add sanity checks on sizes to avoid integer overflow Note that this introduces an explicit 2GB limit, but this was already implicit in variable and function argument types. This is based on the "non-cryptanalytic attacks against freebsd update components" anonymous gist. Further refinement is planned. r305737: bspatch: remove superfluous newlines from errx strings r305822: bspatch: use #define for header size instead of magic number r306026: bspatch: Remove backwards-compatibility sys/capability.h support bspatch previously included sys/capability.h or sys/capsicum.h based on __FreeBSD_version, as FreeBSD is the upstream for bsdiff and we may see this file incorporated into other third-party software. The Capsicum header is now installed as sys/capsicum.h in stable/10 and FreeBSD 10.3, so we can just use sys/capsicum.h and simplify the logic.
* MFC r305077:dim2016-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squelch clang 3.9.0 warnings about BASE (which is 32768) being converted to -32768 when it is used as an argument to mp_itom(), in both libtelnet and newkey. This code has been wrong since r26238 (!), so after almost 20 years it is rather useless to try to correct it. MFC r305086: Fix warnings in telnet about invalid constant conversions, e.g.: contrib/telnet/telnet/commands.c:2914:13: error: implicit conversion from 'int' to 'char' changes value from 137 to -119 [-Werror,-Wconstant-conversion] *lsrp++ = IPOPT_SSRR; ~ ^~~~~~~~~~ /usr/include/netinet/ip.h:152:21: note: expanded from macro 'IPOPT_SSRR' #define IPOPT_SSRR 137 /* strict source route */ ^~~ contrib/telnet/telnet/commands.c:2916:13: error: implicit conversion from 'int' to 'char' changes value from 131 to -125 [-Werror,-Wconstant-conversion] *lsrp++ = IPOPT_LSRR; ~ ^~~~~~~~~~ /usr/include/netinet/ip.h:148:21: note: expanded from macro 'IPOPT_LSRR' #define IPOPT_LSRR 131 /* loose source route */ ^~~ Use unsigned char buffers instead.
* MFC r304809:ngie2016-09-011-0/+6
| | | | | | | | | | Add non-TRUSTEDBSD prefixed knobs for the _PC_ACL* and {CAP,INF,MAC}_PRESENT knobs It's not necessarily intuitive that the variables to query contain TRUSTEDBSD in the prefix. Add non-TRUSTEDBSD prefixed knobs for querying things like "_PC_ACL_NFS4". Relnotes: yes
* MFC r303804:ngie2016-08-281-1/+0
| | | | | | | | | | | | Fix building usr.bin/tar/tests with PIE symbol building enabled by removing CFLAGS+= -static `CFLAGS+= -static` was a carryover from pre-r289195 with usr.bin/tar/test/Makefile that should have been specified in LDFLAGS There doesn't seem to be an apparent need for static compilation of the test binaries. Obtained-from: opBSD (418a491eed20d2603ddd1f1bd92c2c0d95094002)
* MFC r303830,r304693,r304694,r304698:ngie2016-08-282-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | r303830: Remove vestigal references to __alpha__ Replace alpha reference in getconf(1) with amd64 [*] PR: 211300 [*] r304693: Clean up trailing whitespace r304694: Add `MIN_HOLE_SIZE` pathconf(2) support to getconf This allows shell programs to programmatically determine whether or not a filesystem supports sparse files r304698: Add support for _PC_ACL_NFS4 as TRUSTEDBSD_ACL_NFS4 The TRUSTEDBSD prefix was chosen for consistency with the other related `_PC_ACL*` prefixed variables.
* MFC r304292:tuexen2016-08-201-4/+4
| | | | | | | Use names for SCTP and UDPLite when reporting the input histogram. MFC r304295: Fix the output for scope statistics.
* MFC r303929,r303930,r303931,r303932,r303933:bdrewery2016-08-191-8/+39
| | | | | | | | | | | | | r303929: Fix -S with -b not atomically updating the destination file. r303930: Support -v for -l. r303931: Fix -S with -l not being atomic. r303932: Fix -b failure not restoring flags on the destination file. r303933: Squelch a false-positive Clang static analyzer warning.
* MFC r303990:kib2016-08-191-2/+0
| | | | Remove unused prototypes.
* MFC r304374ache2016-08-181-1/+1
| | | | Fix TAB replaced with spaces in prev. commit.
* MFC r303581ache2016-08-182-2/+2
| | | | Fix date
* MFC r303568ache2016-08-181-1/+1
| | | | Remove another vestige of scripted conversion
* MFC r303569ache2016-08-185-132/+132
| | | | Reflect CLDR timedef changes
* MFC r302827ache2016-08-171-3/+4
| | | | | Optimize [Cc]flag case: don't repeatedly add the last character of string2 to squeeze cset when string2 reach its EOS state.
* MFC r302826ache2016-08-171-0/+4
| | | | Document incomplete support of [=equiv=] and collation for ranges.
* MFC r303094ache2016-08-171-2/+3
| | | | | Continuation lines with comments badly affects gprof, it is excluded from build on amd64 f.e.
* MFC r303830:ngie2016-08-162-3/+3
| | | | | | | | Remove vestigal references to __alpha__ Replace alpha reference in getconf(1) with amd64 [*] PR: 211300 [*]
* MFC r303934,r303937,r303942:bdrewery2016-08-151-0/+2
| | | | | | | | | r303934: Support rmdir(2). r303937: Use proper argument length for rmdir(2) for r303934. r303942: Fix sorting in r303934.
* MFC: r303685bapt2016-08-141-1/+3
| | | | | | | | | | | | truss: fix uninitialized trussinfo->curthread in add_threads()/enter_syscall trussinfo->curthread must be initialized before calling enter_syscall(), it is used by t->proc->abi->fetch_args(). Without that truss is segfaulting and the attached program also crash. Submitted by: Nikita Kozlov (nikita@gandi.net) Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D7399
* MFC r303515:lidl2016-08-121-3/+5
| | | | | | Make resizewin.1 manpage use .Fx macro Fix capitalization of "PuTTY" also.
* MFC r303676:dim2016-08-091-1/+1
| | | | | | | | | | | | | | Fix a segfault in bsdgrep when parsing the invalid extended regexps "?" or "+" (these are invalid, because there is no preceding operand). When bsdgrep attempts to emulate GNU grep in discarding and ignoring the invalid ? or + operators, some later logic in tre_compile_fast() goes beyond the end of the buffer, leading to a crash. Fix this by bailing out, and reporting a bad pattern instead. Approved by: re (gjb, kib) Reported by: Steve Kargl
* Merge r303264 and corrections:glebius2016-08-025-132/+132
| | | | | | | The date format for ru_RU.UTF-8 locale has changed some time ago, adjust the ru_RU.UTF-8 calendar files. Approved by: re (kib)
* MFC r303520vangyzen2016-08-011-2/+2
| | | | | | | Fix markup for -j in cpuset(1) synopsis Approved by: re (kib) Sponsored by: Dell Inc.
* MFC r302911:pfg2016-07-252-2/+6
| | | | | | | mail(1): Avoid closing negative file descriptors. CID: 1008105, 1008106 Approved by: re (gjb)
* Fix bspatch heap overflow vulnerability.delphij2016-07-251-0/+4
| | | | | | | Obtained from: Chromium Reported by: Lu Tung-Pin Security: FreeBSD-SA-16:25.bspatch Approved by: re (so@ blanket)
* MFC r302542:delphij2016-07-251-2/+2
| | | | | | Use _PATH_DEVNULL instead of hardcoding. Approved by: re (kib)
OpenPOWER on IntegriCloud