aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
Commit message (Collapse)AuthorAgeFilesLines
* gzip: fix error handling in unxzEric van Gyzen2022-02-251-2/+1
| | | | | | | | | The result of fstat() was not checked. Furthermore, there was a redundant check of st.st_size. Fix both. Reported by: Coverity MFC after: 1 week Sponsored by: Dell EMC Isilon
* iscsi: per-session timeouts and rapid teardown of session on reconnectRichard Scheffenegger2022-02-255-2/+78
| | | | | | | | | | Add per-Session configurable ping (SCSI NOP) and login timeouts. Remove the torn down, old iSCSI session quickly, when performing a reconnect. Reviewed By: trasz Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D34198
* dtc: more mandoc -T lint fixesWarner Losh2022-02-241-3/+3
| | | | | Obtained from: dtc repo 04c805a8b08e4a1d4ff1f1e62ef475fbfe1a5fbe Sponsored by: Netflix
* dtc.1: Mention the existence of -i flagJose Luis Duran2022-02-231-0/+3
| | | | | Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/570
* dtc.1: Appease mandoc -T lintJose Luis Duran2022-02-231-3/+7
| | | | | | | Prefer .Fx to bare FreeBSD Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/579
* Temporarily skip usr.bin.diff.diff_test.functionname in CILi-Wen Hsu2022-02-211-0/+4
| | | | | PR: 262086 Sponsored by: The FreeBSD Foundation
* fetch: make -S argument accept values > 2GBStefan Eßer2022-02-201-1/+1
| | | | | | | | | | | | | | | Use strtoll() to parse the argument of the -S option. FreeBSD has supported 64 bit file offsets for more than 25 years on all architectures and off_t is a 64 bit integer type for that reason. While strtol() returns a 64 bit value on 64 LP64 architectures, it is limit to 32 bit on e.g. i386. The strtoll() function returns a 64 but result on all supported architectures and therefore supports the possible file lengths and file offsets on 32 bit archtectures. Reported by: antoine MFC after: 3 days
* uname: -v: strip final whitespace compatibly with uname(3)наб2022-02-181-2/+6
| | | | | | This restores POSIX.1 conformance PR: 260938
* diff: fix failed compare when ignoring file caseTom Jones2022-02-182-9/+31
| | | | | | | | | | | | With --ignore-file-name-case we need to compare files regardless of case. We need to propigate both names down to diffit so we can look up the correct file when the names differ based on case, otherwise we try to look up the file using the case from the a tree which might not be discoverable if its case is different in the b tree. Reviewed by: bapt Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D34201
* Remove surplus check for which diff is being testedTom Jones2022-02-181-2/+0
| | | | | | | | Must have left this when I was testing the test invocation for 8f79bd9b85716c495c2741ac25db37e8d71f22f7 Pointy hat: thj Sponsored by: Klara Inc.
* diff: add --no-dereference flagTom Jones2022-02-184-19/+116
| | | | | | | | | When diffing files and directories, don't follow symbolic links, instead compare where the links point to. Reviewed by: bapt Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D34203
* diff: Detect Objective-C methodsTom Jones2022-02-1811-4/+182
| | | | | | | | | | When searching back for function definitions, consider lines starting with '+' and '-', this allows us to pick up Objective-C methods as well as C style function definitions. Reviewed by: bapt Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D34202
* vtfontcvt: update FreeBSD Foundation copyrightsEd Maste2022-02-182-2/+1
| | | | Remove "All Rights Reserved"
* elfdump: handle small files more gracefullyEric van Gyzen2022-02-171-1/+6
| | | | | | | | | | | | elfdump -E on an empty file would complain "Invalid argument" because it tried to mmap zero bytes. With the -E flag, elfdump should simply exit non-zero. For tiny files, the code would reference off the end of the mapped region. Ensure the file is large enough to contain an ELF header before mapping it. MFC after: 1 week Sponsored by: Dell EMC Isilon
* Integrate contrib/file/tests with kyua/atfEric van Gyzen2022-02-163-0/+67
| | | | | | | | | | This could be done better by making each test a separate ATF test case. This exercise is left for the reader. Reviewed by: delphij (earlier version) MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D34303
* elfctl: whitespace cleanupEd Maste2022-02-151-3/+3
| | | | Reported by: jrm (in review D34283)
* elfctl: fix operations with multiple features on multiple filesEd Maste2022-02-151-5/+11
| | | | | | | | | | | | | | | Previously an invocation like elfctl -e +feature1,feature2 file1 file2 would set both feature flags in file 1 but only feature1 in file2 (due to the string being modified by strsep()). Reported by: jrm Tested by: jrm MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34283
* elfctl: fix -e invalid operation error handlingEd Maste2022-02-151-4/+4
| | | | | | | | | | | | Validate the operation prior to parsing the feature string, so that e.g. -e 0x1 reports invalid operation '0' rather than invalid feature 'x11'. Also make it an error rather than a warning, so that it is not repeated if multiple files are specified. (Previously an invalid operation resulted in a segfault.) MFC after: 3 days Sponsored by: The FreeBSD Foundation
* elfctl: error if -e is specified multiple timesEd Maste2022-02-151-0/+2
| | | | | | Reported by: jrm MFC after: 3 days Sponsored by: The FreeBSD Foundation
* improve c styleWolfram Schneider2022-02-142-14/+11
| | | | | | | | - BSD KNF: return is a native statement and we use a space before the parenthesis - remove superfluous empty lines Reported by: jrtc27
* grammarWolfram Schneider2022-02-141-2/+2
| | | | Reported by: jrtc27
* Better help message if locate database does not existsWolfram Schneider2022-02-132-10/+62
| | | | | | | PR: 211501 Reported by: Oliver Peter Reviewed by: Pau Amma Differential Revision: https://reviews.freebsd.org/D34243
* better unique file namesWolfram Schneider2022-02-121-2/+2
| | | | | | | | Our mktemp(1) implementation uses 8-X for a temp file by default. That's ok, but we should increase the value from 8 to 10 as many other OS already did. PR: 261438
* lsvfs: one last style nit missed in 946585179dc4Kyle Evans2022-02-101-1/+1
| | | | | | Space after `for`. Sponsored by: Klara, Inc.
* lsvfs: restyle, no functional changeKyle Evans2022-02-101-34/+39
| | | | | | | | | | | | | | | | | Namely: - main was using two-space indentation - re-sort local variables - explicit braces for loop scope - make flag bit comparison explicit The first line of this commit message is unfortunately a lie, as it introduces a minor functional change on non-FreeBSD systems. Namely, the first branch is now explicitly compared against `0` and the choice was made to compare it as greater than 0 to avoid issues on other systems where `argc != 0` on entry isn't guaranteed (negative when checked there). Sponsored by: Klara, Inc.
* tcp: Add/update AccECN related statistics and numbersRichard Scheffenegger2022-02-091-0/+9
| | | | | | | | | | | | | | | | Reserve couters in the tcps struct in preparation for AccECN, extend the debugging output for TF2 flags, optimize the syncache flags from individual bits to a codepoint for the specifc ECN handshake. This is in preparation of AccECN. No functional chance except for extended debug output capabilities. Reviewed By: #transport, rrs Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D34161
* libarchive: import changes from upstreamMartin Matuska2022-02-093-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Libarchive 3.6.0 New features: PR #1614: tar: new option "--no-read-sparse" PR #1503: RAR reader: filter support PR #1585: RAR5 reader: self-extracting archive support New features (not used in FreeBSD base): PR #1567: tar: threads support for zstd (#1567) PR #1518: ZIP reader: zstd decompression support Security Fixes: PR #1491, #1492, #1493, CVE-2021-36976: fix invalid memory access and out of bounds read in RAR5 reader PR #1566, #1618, CVE-2021-31566: extended fix for following symlinks when processing the fixup list Other notable bugfixes and improvements: PR #1620: tar: respect "--ignore-zeros" in c, r and u modes PR #1625: reduced size of application binaries MFC after: 2 weeks Relnotes: yes
* Merge bmake-20220208Simon J. Gerraty2022-02-092-3/+15
|\ | | | | | | | | | | | | | | | | | | * unit-tests/Makefile: disable opt-debug-x-trace on Linux if there is any chance we have dash as .SHELL * meta.c: use a variable to hold command line to be filtered to avoid any side effects from content of command line. Merge commit '535c59a6a9214436f5d6643775d29808e4b3408d'
* | systat: Eliminate write-only unit variableWarner Losh2022-02-071-2/+1
| | | | | | | | Sponsored by: Netflix
* | systat/iostat: Use bools for numbers and kbptWarner Losh2022-02-071-4/+5
| | | | | | | | | | | | These are really bools, declare them as such. Sponsored by: Netflix
* | ipsec(4): Fix a few typos in error messagesGordon Bergling2022-02-061-3/+3
| | | | | | | | | | | | - s/receieve/receive/ MFC after: 1 week
* | Update to bmake-20220204Simon J. Gerraty2022-02-052-13/+19
| |
* | update external URLWolfram Schneider2022-02-051-1/+1
| |
* | fix URL typoWolfram Schneider2022-02-051-1/+1
| |
* | update external URLWolfram Schneider2022-02-051-1/+1
| |
* | update external URLWolfram Schneider2022-02-051-1/+1
| |
* | switch from short to int for lookup tableWolfram Schneider2022-02-051-5/+4
| | | | | | | | This simplifies the code, less casting is needed.
* | elfctl: update man page example for 'no' prefixEd Maste2022-02-051-2/+2
| | | | | | | | | | | | | | Reported by: Mark Millard on freebsd-current@ Fixes: c763f99d11fd ("elfctl: prefix disable flags with "no"") MFC after: 1 week Sponsored by: The FreeBSD Foundation
* | whereis: fix fetching of user.cs_path sysctl variableStefan Eßer2022-02-041-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation of sysctlbyname() does not support the user sub-tree. This function exits with a return value of 0, but sets the passed string buffer to an empty string. As a result, the whereis program did not use the value of the sysctl variable "user.cs_path", but only the value of the environment variable "PATH". This update makes whereis use the sysctl function with a fixed OID, which already supports the user sub-tree. MFC after: 3 days
* | remove dead codeWolfram Schneider2022-02-031-35/+2
| | | | | | | | | | A lookup array is faster than a function with linear search. The old function was not used for years - spring cleaning.
* | better printf(3) format usageWolfram Schneider2022-02-031-1/+1
| | | | | | | | Reported by: jhb
* | sockstat: fix usage stringMichael Tuexen2022-02-011-1/+1
| | | | | | | | | | MFC after: 1 week Sponsored by: Netflix, Inc.
* | sockstat: add -i to display inp_gencntMichael Tuexen2022-02-012-4/+29
| | | | | | | | | | | | | | | | | | | | The inp_gencnt will be used to identify a TCP endpoint by an upcoming command line tool to set TCP socket options. Reviewed by: rscheff MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D34137
* | improve casting for pointer diffsWolfram Schneider2022-02-011-1/+1
| |
* | fix casting issue in error message for 32bit CPUs (e.g. armv7)Wolfram Schneider2022-01-311-1/+1
| |
* | cleanup documentationWolfram Schneider2022-01-311-7/+2
| |
* | throw an error if reading from stdin failedWolfram Schneider2022-01-311-0/+3
| |
* | enable to configure the locate path length at compile timeWolfram Schneider2022-01-315-19/+23
| | | | | | | | | | | | | | The length has not changed and is 1024 chars (equals PATH_MAX). PR: 201243 Submitted by: Willem Jan Withagen <wjw@digiware.nl>
* | Fix statistics for empty databasesWolfram Schneider2022-01-311-7/+9
| | | | | | | | | | | | | | An empty database is a database which does not contain any filenames. It should not occur in practice but maybe in the case of an error. echo | /usr/libexec/locate.mklocatedb > empty.db; locate -d empty.db -S
* | remove registerWolfram Schneider2022-01-313-9/+9
| | | | | | | | There are no measurable performance differences if registers are used or not.