summaryrefslogtreecommitdiffstats
path: root/usr.bin
Commit message (Collapse)AuthorAgeFilesLines
* MFC r308340vangyzen2016-11-301-1/+2
| | | | | | | | ncal: fix a reference to an out-of-scope stack buffer PR: 214237 Submitted by: Jonathan de Boyne Pollard Sponsored by: Dell EMC
* MFC r308824vangyzen2016-11-301-2/+32
| | | | | | | | | | locale: fix display of "grouping" and "mon_grouping" values The "grouping" and "mon_grouping" values are arrays of one-byte integers, not arrays of ASCII characters. Display them in a format similar to GNU and MacOS. Sponsored by: Dell EMC
* MFC r308808, r308809: Lookup locale when print all keywords as well.ume2016-11-261-1/+2
|
* MFC r297207:trasz2016-11-042-6/+37
| | | | | | | | | Make the autofs(5) -hosts map more robust, primarily to make it correctly handle NFS shares containing whitespace. This also adds the -E parameter to showmount(8). PR: 207596 Differential Revision: https://reviews.freebsd.org/D5649
* 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 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"
* Spelling, title.grog2016-10-221-1/+1
|
* 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 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 299458: Fix buffer overrun in gcore(1) NT_PRPSINFOjhb2016-10-061-2/+2
| | | | | | | | | Use size of destination buffer, rather than a constant that may or may not correspond to the source buffer, to restrict the length of copied strings. In particular, pr_fname has 16+1 characters but MAXCOMLEN is 18+1. Use strlcpy instead of strncpy to ensure the result is nul-terminated. This seems to be what is expected of these fields.
* MFC r274925: misc mdoc fixes.pluknet2016-09-271-16/+14
|
* MFC r306131asomers2016-09-261-1/+1
| | | | Update mkimg(1) author's contact info
* MFC bspatch Capsicumization and 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 r264823 (ed): Make usage printing more consistent with other tools.emaste2016-09-222-4/+22
| | | | | | | | | - Introduce a separate usage() function. - Don't use argv[0]. Directly name the application, as we do elsewhere. - Don't prepend the application name. - Don't print two newlines. Also apply the unnecessary semicolon cleanup from r298089
* 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.
* MFstable/11 r304951:ngie2016-09-021-1/+0
| | | | | | | | | | | | | | MFC r303804: 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)
* MFstable/11 r304949,r305226:ngie2016-09-012-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r304949: MFC r303830,r304693,r304694,r304698: 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. r305226: MFC r304809: 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 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.
* MFstable/11 r304208:ngie2016-08-162-3/+3
| | | | | | | | | | MFC r303830: 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 r270132 (by gabor):dim2016-08-093-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Do not look for more matching lines if -L is specified Submitted by: eadler (based on) MFC r296799 (by ian): Fix a bug in bsdgrep that caused the program to hang in a tight loop for some combinations of command line options and search patterns. The code was examining regexec flags looking for a regcomp flag value. The fix is to look in the struct field where the decoded regcomp flag was stored when the regex was compiled. With this fix, it's possible to build WITHOUT_GNU_GREP_COMPAT and WITH_BSDGREP and have a usable GPL-free grep (which of course lacks gnugrep extensions). It now passes the kyua tests except for one test that requires the -z/--null-data gnu extension, and one test involving outputting context lines across multiple files which appears to sometimes output an extra delimiter line ("--") between matches (a rather obscure failure of a rather obscure feature, so bsdgrep should be generally usable now). MFC r303676: 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. Reported by: Steve Kargl
* MFC r288306mr2016-08-027-3/+262
| | | | Add support to systat to display zfs arc cache status/info
* Direct commit of adapted r303581.ache2016-07-312-2/+2
| | | | Fix date.
* MFC r302911:pfg2016-07-252-2/+6
| | | | | | mail(1): Avoid closing negative file descriptors. CID: 1008105, 1008106
* Fix bspatch heap overflow vulnerability.delphij2016-07-251-0/+4
| | | | | | Obtained from: Chromium Reported by: Lu Tung-Pin Security: FreeBSD-SA-16:25.bspatch
* MFC r301974: ar: enable reproducible output by default when invoked as 'ar -s'emaste2016-07-252-3/+9
| | | | | | | | | ar output is already deterministic by default for ar -q and ar -r, and when invoked as ranlib. Make ar -s equivalent to ranlib and enable deterministic output by default in that case too. PR: 210330 Sponsored by: The FreeBSD Foundation
* MFC r302542:delphij2016-07-251-2/+2
| | | | Use _PATH_DEVNULL instead of hardcoding.
* MFC: r302827ache2016-07-221-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-07-221-0/+4
| | | | Document incomplete support of [=equiv=] and collation for ranges.
* MFC: merge in all new features and improvements into mkuzip(8) from current,sobomax2016-07-2022-113/+1658
| | | | | | | | | | | | | | which includes: o LZMA compression; o block de-duplication; o performance improvements; o multi-thread support. This includes the following revisions: r295943,r296626,r296628,r296810,r298504,r298505,r298577 Suggested by: emaste
* MFC r302770:kib2016-07-201-0/+25
| | | | Trace timeval parameters to the getitimer(2) and setitimer(2) syscalls.
* MFC r302558:gahr2016-07-201-108/+133
| | | | | | | Do not truncate lines longer than 512 chars. PR: 210344 Differential Revision: https://reviews.freebsd.org/D6881
* MFC r302973:pfg2016-07-201-1/+1
| | | | | | | | | sed(1): Fix off by one introduced in r299211. Detected by running the gsed tests. Submitted by: Mikhail Teterin PR: 195929
* MFC r302179:markj2016-07-201-3/+13
| | | | gcore: Forward pending signals when detaching from the target.
* MFC r302511, r302771, r302845:pfg2016-07-172-4/+8
| | | | mail(1): check for out of memory conditions when calling calloc(3).
* MFC r301090:markj2016-07-161-0/+3
| | | | mkimg: Indicate that input file pages are unlikely to be reused.
* MFC r302206asomers2016-07-121-0/+1
| | | | | | | | | | | | Skip lastcomm and sa tests on unsupported architectures usr.bin/lastcom/tests/Makefile usr.sbin/sa/tests/Makefile Set allow_architectures appropriately. These tests depend on golden files that must be generated for each architecture, and haven't yet been generated for all of them. PR: 204154
* MFC r302327:ngie2016-07-112-56/+56
| | | | | | | | | Fix .../usr.bin/lastcomm/legacy_test:main on i386 The time in the output files was ahead by 3 hours on i386. Fix the incorrect offset. PR: 210329
* MFC r302326:ngie2016-07-111-1/+1
| | | | | | | | | Output the diffs to standard error when comparing the expected vs the obtained output from lastcomm instead of just printing out a summary, e.g. "they differed". This will make failures with results more apparent when running kyua debug, kyua report-html, etc.
* MFC r302075:mm2016-06-305-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update libarchive to 3.2.1 (bugfix and security fix release) List of vendor fixes: - fix exploitable heap overflow vulnerability in Rar decompression (vendor issue 719, CVE-2016-4302, TALOS-2016-0154) - fix exploitable stack based buffer overflow vulnebarility in mtree parse_device functionality (vendor PR 715, CVE-2016-4301, TALOS-2016-0153) - fix exploitable heap overflow vulnerability in 7-zip read_SubStreamsInfo (vendor issue 718, CVE-2016-4300, TALOS-2016-152) - fix integer overflow when computing location of volume descriptor (vendor issue 717) - fix buffer overflow when reading a crafred rar archive (vendor issue 521) - fix possible buffer overflow when reading ISO9660 archives on machines where sizeof(int) < sizeof(size_t) (vendor issue 711) - tar and cpio should fail if an input file named on the command line is missing (vendor issue 708) - fix incorrect writing of gnutar filenames that are exactly 512 bytes long (vendor issue 682) - allow tests to be run from paths that are equal or longer than 128 characters (vendor issue 657) - add memory allocation errors in archive_entry_xattr.c (vendor PR 603) - remove dead code in archive_entry_xattr_add_entry() (vendor PR 716) - fix broken decryption of ZIP files (vendor issue 553) - manpage style, typo and description fixes Post-3.2.1 vendor fixes: - fix typo in cpio version reporting (Vendor PR 725, 726) - fix argument range of ctype functions in libarchive_fe/passphrase.c - fix ctype use and avoid empty loop bodies in WARC reader Security: CVE-2016-4300, CVE-2016-4301, CVE-2016-4302
* MFC r301138:pfg2016-06-281-5/+6
| | | | | | | | | | | sed(1): convert sed to use REG_STARTEND more explicitly. This is a followup to previous r302228, which only merged the incomplete r300684 causing a regression. Reported by: mi PR: 209387 Taken from: openbsd-tech (Martijn van Duren)
* sed(1): convert sed to use REG_STARTEND more explicitly.pfg2016-06-271-16/+22
| | | | | | | | | | | | | | Summarizing the findings in the OpenBSD list: This solves a reproduceable issue with very recent Mesa where REG_NOTBOL combined with a match at the begin of the string causes our regex library to treat the word as not begin of word. Bump __FreeBSD_version: JIC we hit the issue in recent Mesa ports. PR: 209352, 209387 (exp-run) Taken from: openbsd-tech (Martijn van Duren) MFC after: 1 month
* MFC r299529,r299540,r299576,r299896:mm2016-06-179-6/+183
| | | | | | | | | | | | | | | | | | | | | | | | | r299529,r299540: Update libarchive to 3.2.0 New features: - new bsdcat command-line utility - LZ4 compression (in src only via external utility from ports) - Warc format support - 'Raw' format writer - Zip: Support archives >4GB, entries >4GB - Zip: Support encrypting and decrypting entries - Zip: Support experimental streaming extension - Identify encrypted entries in several formats - New --clear-nochange-flags option to bsdtar tries to remove noschg and similar flags before deleting files - New --ignore-zeros option to bsdtar to handle concatenated tar archives - Use multi-threaded LZMA decompression if liblzma supports it - Expose version info for libraries used by libarchive r299576,r299896: Fix broken cpio behavior. Relnotes: yes
* MFC r301513:pfg2016-06-091-1/+1
| | | | | | | | indent(1): Fix old typo. It's typedef, not typdef. Obtained from: NetBSD (CVS rev. 1.14)
* MFC r300428:ngie2016-06-081-1/+1
| | | | | | | | | Fix humanized decoding of struct stat with respect to .st_mtim st_mtim was being incorrectly described as "stime=", not "mtime=". This was introduced with the original feature commit (r176471). PR: 209699
* MFC r297052:grembo2016-06-061-8/+22
| | | | Update fetch.1 and fetch.3 to reflect libfetch's actual use of CA bundles
* MFC r300327:ken2016-05-251-1/+2
| | | | | | | | | | | | | | | ------------------------------------------------------------------------ r300327 | ken | 2016-05-20 13:30:52 -0600 (Fri, 20 May 2016) | 11 lines Add the density code for LTO-7 to libmt and the mt(1) man page. The density code and bits per mm values were obtained from an actual drive density report. The number of tracks were obtained from an LTO-7 hardware announcement on IBM's web site. ------------------------------------------------------------------------ Sponsored by: Spectra Logic
* sed: rewrite the main loop.pfg2016-05-241-49/+43
| | | | | | | | | | Rewrite the main loop of the "sed s/..." command, shortening it by ten lines and simplifying it by removing the switch statement implementing /g, /1, and /2 separately and repetitively. This will be needed to bring a fix from OpenBSD later. Obtained from: OpenBSD (schwarze CVS Rev. 1.18)
* MFV r299377:pfg2016-05-241-2/+2
| | | | | | | | sed.1: Correction for the case insensitive case. Use the capital I instead of the lowercase. Submitted by: Mikhail T.
OpenPOWER on IntegriCloud