aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
Commit message (Collapse)AuthorAgeFilesLines
...
* login: use sizeof(audit_cond) consistently, NFCKyle Evans2021-10-061-1/+1
| | | | | The other three instances were already converted to use audit_cond, this one was just changed from sizeof(long) -> sizeof(int).
* unifdef.1: Fix typo on "input"Elyes HAOUAS2021-10-061-1/+1
| | | | | Pull request: https://github.com/freebsd/freebsd-src/pull/549 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
* netstat: split ipsec and ipsec6 statistics in libxoMateusz Guzik2021-10-051-6/+7
| | | | | | | | In particular fixes --libxo json PR: 254673 Reported by: j.vandeville@gmail.com Sponsored by: Rubicon Communications, LLC ("Netgate")
* contrib/bc: re-enable tests after the import of version 5.1.0Stefan Eßer2021-10-041-2/+2
| | | | | | | The tests have been fixed to not write any data outside of the temporary work directory provided by the test framework. MFC after: 3 days
* lastcomm/sa: Remove sparc64 tests, they aren't needed.Warner Losh2021-10-045-69/+1
| | | | | | These tests will run only on a sparc64 system, and so never run anymore. Sponsored by: Netflix
* ncurses: chase dependency changes in the source treeBaptiste Daroussin2021-10-0417-18/+20
| | | | Differential Revision: https://reviews.freebsd.org/D32098
* contrib/bc: temporarily disconnect the tests for 5.0.2Stefan Eßer2021-10-041-2/+2
| | | | | | | | | | | | | | | | | | | | | The tests that come with version 5.0.2 have been extended to cover the line editing functions. It has been found that these tests generate false negative results in FreeBSD, most likely due to an issue in the pexpect functionality used. These history tests are skipped on systems that do not have python and py-pexpect installed (and thus are unlikely to cause CI test failures), but in order to not cause irritating failures on systems were these packages are in fact installed, I temporarily disconnect them. I had planned to skip this version due to the issue with the history tests, but some committer has asked me to go ahead since the currently used version 5.0.0 contains a macro name that collides with a project he is working on. No MFC of this version is planned. A version 5.0.3 is expected to be released soon, and that version will allow to reconnect the tests and will be MFCed.
* tcp: Make dsack stats available in netstat and also make sure its aware of ↵Randall Stewart2021-10-011-0/+6
| | | | | | | | | | | | | | | | | TLP's. DSACK accounting has been for quite some time under a NETFLIX_STATS ifdef. Statistics on DSACKs however are very useful in figuring out how much bad retransmissions you are doing. This is further complicated, however, by stacks that do TLP. A TLP when discovering a lost ack in the reverse path will cause the generation of a DSACK. For this situation we introduce a new dsack-tlp-bytes as well as the more traditional dsack-bytes and dsack-packets. These will now all display in netstat -p tcp -s. This also updates all stacks that are currently built to keep track of these stats. Reviewed by: tuexen Sponsored by: Netflix Inc. Differential Revision: https://reviews.freebsd.org/D32158
* cmp: add -b, --print-bytesKyle Evans2021-09-2911-16/+70
| | | | | | | | This is compatible with GNU cmp. Reviewed by: bapt, markj (earlier version) Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D32074
* cmp: add -i, --ignore-initial, an alternative to skip1/skip2 argsKyle Evans2021-09-293-1/+53
| | | | | | | | This is compatible with GNU cmp. Reviewed by: markj Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D32073
* cmp: add -n, --bytes to limit number of bytes to compareKyle Evans2021-09-297-15/+57
| | | | | | | | This is compatible with GNU cmp. Reviewed by: markj Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D32072
* cmp: accept SI suffixes for skip1 and skip2Kyle Evans2021-09-294-3/+46
| | | | | | | | This is compatible with GNU cmp. Reviewed by: bapt (earlier version), markj, imp Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D32071
* Add myself to calendar.freebsdYasuhiro Kimura2021-09-271-0/+1
| | | | | | | | It corresponds to the 9th step of the procedure described in section 7.1 of Committer's Guide. Approved by: meta (mentor) Differential Revision: https://reviews.freebsd.org/D32153
* unzip: sync with NetBSD upstream to add passphrase supportYoshihiro Takahashi2021-09-252-10/+66
| | | | | | | | | | | | | | | - Add support for password protected zip archives. We use memset_s() rather than explicit_bzero() for more portable (See PR). - Use success/failure macro in exit() - Mention ZIPX format in unzip(1) Submitted by: Mingye Wang and Alex Kozlov (ak@) PR: 244181 Reviewed by: mizhka Obtained from: NetBSD MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28892
* man: reset OPTIND before parsing argsKyle Evans2021-09-231-0/+4
| | | | | | | | | | | | | | | | | | From jilles: POSIX requires that a script set `OPTIND=1` before using different sets of parameters with `getopts`, or the results will be unspecified. The specific problem observed here is that we would execute `man -f` or `man -k` without cleaning up state from man_parse_args()' `getopts` loop. FreeBSD's /bin/sh seems to reset OPTIND to 1 after we hit the second getopts loop, rendering the following shift harmless; other /bin/sh implementations will leave it at what we came into the loop at (e.g., bash as /bin/sh), shifting off any keywords that we had. Input from: jilles Reviewed by: allanjude, bapt, imp Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D32063
* truss: Decode correctly 64bits arguments on 32bits arm.Olivier Houchard2021-09-221-12/+6
| | | | | | | | | Mostly revert ebbc3140ca0d7eee154f7a67ccdae7d3d88d13fd. We don't need to special-case anything for arm64, the check for the pointer size is already done for us, just keep the bits about having arm and arm64 having to add padding for 32bits binaries. MFC after: 1 week
* truss: Decode correctly 64bits arguments on 32bits arm.Olivier Houchard2021-09-221-8/+14
| | | | | | | | When decoding 32bits arm syscall, make sure we account for the padding when decoding 64bits args. Do it too when using a 64bits truss on a 32bits binary. MFC After: 1 week PR: 256199
* Drop cloudabiKonstantin Belousov2021-09-214-301/+1
| | | | | | | | | | | | | According to https://github.com/NuxiNL/cloudlibc: CloudABI is no longer being maintained. It was an awesome experiment, but it never got enough traction to be sustainable. There is no reason to keep it in FreeBSD. Approved by: ed (private mail) Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D31923
* calendar.freebsd: Fix off-by-one errorKevin Bowling2021-09-171-1/+1
|
* proccontrol(1): Add wxmap controlKonstantin Belousov2021-09-172-2/+26
| | | | | | | Reviewed by: brooks, emaste, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D31779
* StyleKonstantin Belousov2021-09-171-2/+4
| | | | | | | Reviewed by: brooks, emaste, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D31779
* diff: link with libm for sqrt()Piotr Pawel Stefaniak2021-09-161-0/+1
| | | | | Reported by: Jenkins Fixes: bcf2e78dc48378456798191f1c15cb76d6221a65
* diff: implement option -F (--show-function-line)Piotr Pawel Stefaniak2021-09-154-25/+62
| | | | | | | | With unified and context diffs, show the last line that matches the provided pattern before the context. Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D31714
* diff(1): Add --color supportCameron Katri2021-09-154-3/+118
| | | | | | | | | | Adds a --color flag to diff(1) that supports the same options as GNU's diff(1). The colors are customizable with the env var DIFFCOLORS in a format similar to grep(1)'s GREPCOLORS. An example would be 04;36:41 for additions to be underlined light blue, and deletions have a red background. Differential Revision: https://reviews.freebsd.org/D30545
* diff: decrease indent levelPiotr Pawel Stefaniak2021-09-151-22/+21
| | | | An upcoming change will add more code in the loop.
* diff: avoid applying offsets to null pointerPiotr Pawel Stefaniak2021-09-151-3/+6
| | | | This was the only instance of undefined behavior I could find so far.
* diff: replace isqrt() with sqrt()Piotr Pawel Stefaniak2021-09-151-21/+2
| | | | Remove cruft and use a system-provided and maintained function instead.
* diff: move functions around and reduce their visibilityPiotr Pawel Stefaniak2021-09-154-39/+39
| | | | | | Most of them become static. There will be more such functions added in upcoming commits, so they would be inconsistent with existing code. Improve the existing code instead of reinforcing the unwanted pattern.
* diff: convert boolean flag variables to boolPiotr Pawel Stefaniak2021-09-152-15/+16
| | | | | | There will be more boolean flags added in upcoming commits and they would have to be stored in ints in order to be consistent with existing code. Change the existing code to use the bool type.
* diff: improve code stylePiotr Pawel Stefaniak2021-09-153-150/+123
| | | | Reflow comments, strip trailing space, improve wrapping of lines.
* top: Remove a duplicate extern declaration for show_args.John Baldwin2021-09-151-1/+0
| | | | | | | | This fixes a -Wnested-extern error with GCC 9. There is an existing extern declaration in top.h. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D31937
* tee: use queue(9) in place of a custom linked listPietro Cerutti2021-09-151-10/+10
| | | | Approved by: cognet
* llvm-objcopy: Install llvm-strip, and optionally strip, linksJessica Clarke2021-09-131-1/+4
| | | | | | | | | | | | Just as elftoolchain's objcopy doubles as strip, so does LLVM's. This ensures that a strip binary is still present for WITH_LLVM_BINUTILS builds. Note that we do not currently have a committed copy of the manpage generated from the rST source so no manpage is installed for (llvm-)strip. Reported by: Shawn Webb <shawn.webb@hardenedbsd.org> Tested by: Shawn Webb <shawn.webb@hardenedbsd.org> MFC after: 1 week
* tabs: a hacky version of tabs appeared in 1st edition UnixWarner Losh2021-09-091-2/+7
| | | | | | | | | | | | First edition Unix had an /etc/tabs file. It contained the escape sequences to set tabs to every 8 stops on an old Teletype Model 37 and compatible terminals. One would 'cat /etc/tabs' to reset them. Unix at the time effectively mandated this because the delays in the tty driver assumed this and tabs didn't work when they were too different from '8'. Document this historical niggle in HISTORY after it was brought to my attention on a Hacker News thread. Sponsored by: Netflix
* top(1): indicate how to reset grep stringJohn Grafton2021-09-081-1/+1
| | | | | Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/536/files
* pkgbase: Create a FreeBSD-ftp packageEmmanuel Vadot2021-09-071-0/+2
| | | | | | | | ftp tools aren't that useful nowadays but some might want them. Create a FreeBSD-ftp package so users have a choice to have them or not. Differential Revision: https://reviews.freebsd.org/D31794
* pkgbase: Create a FreeBSD-kerberos packageEmmanuel Vadot2021-09-071-0/+2
| | | | | | | This allows users to install or not kerberos related utilities and libs. Differential Revision: https://reviews.freebsd.org/D31801
* pkgbase: Create a FreeBSD-rdma packageEmmanuel Vadot2021-09-0712-0/+13
| | | | | | Put all the rdma related tools into this package. Differential Revision: https://reviews.freebsd.org/D31799
* pkgbase: Create a FreeBSD-telnet packageEmmanuel Vadot2021-09-071-0/+2
| | | | | | | | | | both telnet and telnetd aren't that useful nowadays but some might want them. Create a FreeBSD-telnet package so users have a choice to have them or not. Differential Revision: https://reviews.freebsd.org/D31791 Reviewed by: emaste
* Add WITH_LLVM_BINUTILS to install LLVM binutils instead of ElftoolchainAlex Richardson2021-09-068-9/+62
| | | | | | | | | | | | | | | | | | | When WITH_LLVM_BINUTILS is set, we will install the LLVM binutils as ar/ranlib/nm/objcopy/etc. instead of the elftoolchain ones. Having the LLVM binutils instead of the elftoolchain ones allows us to use features such as LTO that depend on binutils that understand LLVM IR. Another benefit will be an improved user-experience when compiling with AddressSanitizer, since ASAN does not symbolize backtraces correctly if addr2line is elftoolchain addr2line instead of llvm-symbolizer. See https://lists.freebsd.org/archives/freebsd-toolchain/2021-July/000062.html for more details. This is currently off by default but will be turned on by default at some point in the near future. Reviewed By: emaste Differential Revision: https://reviews.freebsd.org/D31060
* Don't build and install {llvm,clang,lldb}-tblgen for the targetAlex Richardson2021-09-061-5/+1
| | | | | | | | | | The tablegen binaries are only needed to build software that uses LLVM's infrastructure for command line options, disassembler tables, etc. They are not user-facing binaries and should therefore not be installed by default. Reviewed By: emaste Differential Revision: https://reviews.freebsd.org/D31058
* xinstall: fix invocation of llvm-stripMitchell Horne2021-08-301-5/+15
| | | | | | | | | | | | | | | | | When executing strip(1), '--' is passed as an argument to explicitly terminate the getopt(3) loop. The option parsing in llvm-strip doesn't support this however, so setting XSTRIPBIN=llvm-strip results in an unsupported argument error. llvm-strip(1) is otherwise commandline-compatible with FreeBSD's strip(1), so just use the documented argument format that is common to both. Special care needs to be taken for filenames beginning with a '-'. Reviewed by: arichardson, eugen (earlier version, both) Discussed with: jilles Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D30614
* ldd: Remove non-functional -v optionKonstantin Belousov2021-08-282-31/+7
| | | | | | | | | | | It seems -v only worked for a.out. Remove it, not even keeping the current nop for compat. Also remove more mentions of a.out format from the man page. Reviewed by: dim, emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D31708
* Fix some common typos in source code commentsGordon Bergling2021-08-281-1/+1
| | | | | | | | | - s/priviledged/privileged/ - s/funtion/function/ - s/doens't/doesn't/ - s/sychronization/synchronization/ MFC after: 3 days
* diff3: document and test -TPiotr Pawel Stefaniak2021-08-254-2/+27
| | | | | Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D31650
* clang: Support building with GCC and DEBUG_FILES disabledJessica Clarke2021-08-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | If MK_DEBUG_FILES=no then the Clang link rule has clang as .TARGET, rather than clang.full, causing the implicit ${CFLAGS.${.TARGET:T}} to be CFLAGS.clang, and thus pull in flags intended for when your compiler is Clang, not when linking Clang itself. This doesn't matter if your compiler is in fact Clang, but it breaks using GCC as, for example, bsd.sys.mk adds -Qunused-arguments to CFLAGS.clang. This is seen when trying to build a bootstrap toolchain on Linux where GCC is the system compiler. Thus, introduce a new internal NO_TARGET_FLAGS variable that is set by Clang to disable the addition of these implicit flags. This is a bigger hammer than necessary, as flags for .o files would be safe, but that is not needed for Clang. Note that the same problem does not arise for LDFLAGS when building LLD with BFD, since our build produces a program called ld.lld, not plain lld (unlike upstream, where ld.lld is a symlink to lld so they can support multiple different flavours in one binary). Suggested by: sjg Fixes: 31ba4ce8898f ("Allow bootstrapping llvm-tblgen on macOS and Linux") MFC after: 1 week Reviewed by: dim, imp, emaste Differential Revision: https://reviews.freebsd.org/D31532
* diff: read whole files to determine if they are ASCII textPiotr Pawel Stefaniak2021-08-232-23/+50
| | | | | | | Before this change, only the first BUFSIZE bytes were checked. Reviewed by: bapt (previous version) Differential Revision: https://reviews.freebsd.org/D31639
* nfsstat(1): Fix a typo in an error messageGordon Bergling2021-08-231-1/+1
| | | | | | - s/priviledged/privileged/ MFC after: 1 week
* diff3: implement --strip-trailing-crPiotr Pawel Stefaniak2021-08-235-1/+21
| | | | | Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D31626
* diff3.1: update manual page to match codePiotr Pawel Stefaniak2021-08-231-6/+27
|