summaryrefslogtreecommitdiffstats
path: root/usr.bin
Commit message (Collapse)AuthorAgeFilesLines
* 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)
* MFC r302904:tuexen2016-07-242-90/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a bug which results in a core dump when running netstat with the -W option and having a listening SCTP socket. The bug was introduced in r279122 when adding support for libxo. MFC r302907: When calling netstat -Laptcp the local address values are not aligned with the corresponding entry in the table header. r295136 increased the value width from 14 to 32 without the corresponding change to the table header. This commit adds the change to the table header width. MFC r302917: Ensure that the -a, -W, -L options for SCTP behave similar as for TCP. MFC r302928: Address a potential memory leak found a the clang static code analyzer running on the userland stack. MFC r302930: Don't free a data chunk twice. Found by the clang static code analyzer running for the userland stack. MFC r302935: Deal with a portential memory allocation failure, which was reported by the clang static code analyzer. Joint work with rrs@. MFC r302942: Add missing sctps_reasmusrmsgs counter. Joint work with rrs@. MFC r302945: Don't duplicate code for SCTP, just use the ones used for UDP and TCP. This fixes a bug with link local addresses. This will require and upcoming change in the kernel to bring SCTP to the same behaviour as UDP and TCP. MFC r302949: Fix the PR-SCTP behaviour. This is done by rrs@. MFC r302950: Add a constant required by RFC 7496. MFC r303024: netstat and sockstat expect the IPv6 link local addresses to have an embedded scope. So don't recover. MFC r303025: Use correct order of conditions to avoid NULL deref. MFC r303073: Fix a bug in deferred stream reset processing which results in using a length field before it is set. Thanks to Taylor Brandstetter for reporting the issue and providing a fix. Approved by: re (kib)
* MFC r302770:kib2016-07-201-0/+25
| | | | | | Trace timeval parameters to the getitimer(2) and setitimer(2) syscalls. Approved by: re (gjb)
* 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 Approved by: re (gjb)
* MFC r302511, r302771, r302845:pfg2016-07-172-4/+8
| | | | | | mail(1): check for out of memory conditions when calling calloc(3). Approved by: re (gjb)
* lorder: produce locale-independent symbol orderingemaste2016-07-071-0/+1
| | | | | | | | Found by the Debian reproducible builds effort -- Debian bug 830259. Reported by: Reiner Herrmann <reiner@reiner-h.de> Approved by: re (gjb) Sponsored by: The FreeBSD Foundation
* Fix .../usr.bin/lastcomm/legacy_test:main on i386ngie2016-07-032-56/+56
| | | | | | | | | | | | | The time in the output files was ahead by 3 hours on i386. Fix the incorrect offset. Differential Revision: https://reviews.freebsd.org/D7079 (as part of a larger diff) MFC after: 1 week PR: 210329 Reported by: asomers Approved by: re (gjb) Reviewed by: cem Sponsored by: EMC / Isilon Storage Division
* Output the diffs to standard error when comparing the expected vs thengie2016-07-031-1/+1
| | | | | | | | | | | | | | 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. Differential Revision: https://reviews.freebsd.org/D7079 (as part of a larger diff) MFC after: 1 week Approved by: re (gjb) Reviewed by: cem Sponsored by: EMC / Isilon Storage Division
* Skip lastcomm and sa tests on unsupported architecturesasomers2016-06-261-0/+1
| | | | | | | | | | | | | | | | 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: 210566 PR: 204154 Reviewed by: ngie Approved by: re (gjb) MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D6960
* This patch fixes two bugs:tuexen2016-06-251-5/+20
| | | | | | | | | | | | | * sctp46, tcp46, and udp46 sockets are displayed as such and not as sctp4 6, tcp4 6, udp4 6. This bug was introduced in http://svnweb.freebsd.org/base?view=revision&revision=187915 * For SCTP sockets, the the -4 and -6 flags are honoured as much as possible. This means IPv4 sockets are handled correctly, IPv6 sockets are displayed as sctp46, since it is currently not possible to distinguish between sctp6 and sctp46. Approved by: re (gjb) MFC after: 1 week
* gcore: Forward pending signals when detaching from the target.markj2016-06-241-3/+13
| | | | | | | | | | | Otherwise gcore's ptrace attach operation can race with delivery of a signal and cause it to be lost. In collaboration with: Suraj Raju <sraju@isilon.com> Reviewed by: bdrewery Approved by: re (gjb, kib) MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
* MFV r302003,r302037,r302038,r302056:mm2016-06-225-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 MFC after: 1 week Security: CVE-2016-4300, CVE-2016-4301, CVE-2016-4302 Approved by: re (kib)
* mkimg: bump version to 20151211 after r292082emaste2016-06-171-1/+1
| | | | | | | | | | | mkimg has had a number of functional additions after the last time the version was incremented. Do so now, to r292082's commit date, so that users can determine what is supported. Reviewed by: marcel Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D6882
* Add clang-format under WITH_CLANG_EXTRAS.bdrewery2016-06-173-0/+56
| | | | | | | Reviewed by: dim Approved by: re (gjb) Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D6856
* ar: enable reproducible output by default when invoked as 'ar -s'emaste2016-06-162-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 Reviewed by: bdrewery Approved by: re (gjb) MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D6871
* WITH_META_MODE: Fix rebuilding maketab outside of build-tools.bdrewery2016-06-141-2/+4
| | | | | | | | | | | | | | | The bsd.dep.mk yacc targets rely on only the .c file getting a .meta file. However the previous code here relying on only the .h file meant that it would be generated with a .meta file. r301285 made it so that the .h file is never expected to get a .meta file. To keep this restriction in place add in an extra dependency on the .c file so that it is generated at this time. It's a hack but the best for the patterns we have at the moment for handling build-tools and side-effect-generated files. Reported by: Mark Millard Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division
* Add myself (mahrens) to calendar.freebsdmahrens2016-06-131-0/+1
| | | | | Approved by: mckusick Approved by: re (gjb)
* Change my given name from "Garrett" to "Ngie"ngie2016-06-131-1/+1
| | | | | | | A legal name change from "Garrett" to "Ngie", as well as a FreeBSD account name change, is pending. Approved by: re (hrs)
* install: When preserving timestamps, also copy the nanoseconds part.jilles2016-06-092-17/+20
| | | | | | Now that we have utimensat in -legacy, install(1) can use it. This is a revert of r299942 which is itself a revert of r299850.
* Add support for truss'ing Linux/x86_64 binaries under amd64.jhb2016-06-092-0/+105
| | | | Prodding by: xmj
* Merge bmake-20160606sjg2016-06-082-4/+7
| | | | o dir.c: extend mtimes cache to others via cached_stat()
* Fix a (false positive?) Argument cannot be negative coverity defect.truckman2016-06-081-5/+2
| | | | | | | | | | | | | | | Rather than guarding close(fd) with an fd >= 0 test and setting fd to -1 when it is closed to avoid a potential double-close, just move the close() call after the conditional "goto make_token". This moves the close() call totally outside the loop to avoid the possibility of calling it twice. This should also prevent a Coverity warning about checking fd for validity after it was previously passed to read(). Reported by: Coverity CID: 1355335 MFC after: 1 week X-MFC with: r299484
* indent(1): Fix typo.pfg2016-06-061-1/+1
| | | | | | | It's typedef, not typdef. Obtained from: OpenBSD (CVS rev. 1.20) MFC after: 3 days
* Use the in-tree sys/elf_common.hbdrewery2016-06-051-0/+13
| | | | This is the same fix as r301471.
* Import bmake-20160604sjg2016-06-051-2/+2
| | | | Performace improvements for meta mode.
* Report negotiated MaxBurstLength and FirstBurstLength in "iscsictl -v"trasz2016-06-051-0/+4
| | | | | | and "ctladm islist -v" outputs. MFC after: 1 month
* Document getent(1)'s ability to enumerate netgroup members.markj2016-06-042-2/+4
| | | | MFC after: 3 days
OpenPOWER on IntegriCloud