aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
Commit message (Collapse)AuthorAgeFilesLines
...
* | Resurrect standalone commandDag-Erling Smørgrav2025-12-233-0/+7
| | | | | | | | | | | | | | | | | | | | | | While command(1) is now classified by POSIX as an intrinsic utility and no longer required to exist as a standalone program, it turns out that we still have a use for it (cf. env(1)), so resurrect it. PR: 291879 Fixes: 4100bd6caa66 ("usr.bin: Remove intrinsic utilities") Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D54341
* | usr.bin: Remove intrinsic utilitiesDag-Erling Smørgrav2025-12-194-34/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These utilities can only function correctly if implemented as shell builtins and exist only because POSIX previously required them. As of POSIX 2024, they have all been reclassified as intrinsic utilities and are no longer required to exist in PATH. We can therefore retire them. Cf. XBD 1.7, XRAT C.1.8, Austin Group bug 854. Note that kill(1) is also considered an intrinsic utility (because only the shell can interpret job IDs correctly), but we have a working standalone implementation, which we will keep. PR: 291686 Relnotes: yes Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D54239
* | limits: Unbreak after RLIMIT_VMM additionDag-Erling Smørgrav2025-12-172-10/+18
| | | | | | | | | | | | | | | | Update structures and add assertions to prevent a reoccurrence. Fixes: 1092ec8b3375 ("kern: Introduce RLIMIT_VMM") Reviewed by: bnovkov, allanjude Differential Revision: https://reviews.freebsd.org/D54273
* | kern: Introduce RLIMIT_VMMBojan Novković2025-12-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces a new per-UID limit for controlling the number of vmm instances, in anticipation of unprivileged bhyve. This allows ut to limit the amount of kernel memory allocated by the vmm driver and prevent potential memory exhaustion attacks. Differential Revision: https://reviews.freebsd.org/D53728 Reviewed by: markj, olce, corvink MFC after: 3 months Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc.
* | tests/lorder_test: Update test case description from copy/pasteLi-Wen Hsu2025-12-171-1/+1
| | | | | | | | | | MFC after: 3 days Sponsored by: The FreeBSD Foundation
* | tests/lorder_test: Add require.progs for nm and ccSiva Mahadevan2025-12-172-0/+6
| | | | | | | | | | | | Signed-off-by: Siva Mahadevan <me@svmhdvn.name> Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/1858
* | Fix zgrep(1) wrapper regression, add testCraig Leres2025-12-142-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | @bdrewery reported D48873 broke "bzgrep -q '1 2' /var/log/messages.0.bz2" The mistake was in using $* instead of "$@" (I suspect $* is never right). Reported by: bdrewery Reviewed by: markj Approved by: markj Fixes: 1070477cc8b7 ("Fix remaining zgrep(1) wrapper script regressions") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54217
* | login.1: Remove mention of login copyright displayEd Maste2025-12-141-2/+2
| | | | | | | | | | PR: 291649 Fixes: 905571c03119 ("Remove copyright strings printed at login time via login(1) or sshd(8).")
* | fsync: Open files in non-blocking modeDag-Erling Smørgrav2025-12-051-1/+1
| | | | | | | | | | | | | | | | This avoids blocking forever when invoked on a fifo. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D54084
* | Update to bmake-20251111Simon J. Gerraty2025-12-034-12/+32
|\ \ | | | | | | | | | Merge commit '638c66de4a0faa4c2e815e81cd4021c2387c7e0f'
* | | librdmacm/libibverbs: Statically bound libbnxtre.so.1 to rpingSumit Saxena2025-12-032-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default ibv_devices and rping are not statically bound to libbnxtre.so.1. i.e. 'ldd /usr/bin/rping' command doesn't list 'libbnxtre.so.1' entry. So, statically bound the libbnxtre.so.1 library to rping & ibv_devices utils. MFC-After: 3 days Reviewed-by: sumit.saxena@broadcom.com Differential-Revision: https://reviews.freebsd.org/D49604
* | | mdo.1: Document group-related and fine-grained control functionalitiesOlivier Certner2025-11-261-24/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a manual page update describing the functionality that was added to mdo(1) in commit 3ca1e69028ac ("mdo(1): Add support and shortcuts for fully specifying users and groups"). Please either refer to that commit or the new manual page's content for more information. While here: - Add to the introduction a description of process credentials and some specific vocabulary that is used throughout the page, as well as the relationship between mdo(1) and mac_do(4). - Update the HISTORY section. - Add AUTHORS and SECURITY CONSIDERATIONS sections. Reviewed by: ziaee MFC after: 1 minute Sponsored by: The FreeBSD Foundation Sponsored by: Google LLC (GSoC 2025) Co-authored-by: Kushagra Srivastava <kushagra1403@gmail.com> Differential Revision: https://reviews.freebsd.org/D53905
* | | mdo(1): Avoid calling getgroups() in some unnecessary casesOlivier Certner2025-11-241-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the basis for supplementary groups are the current ones, we do not need to fetch them when they are to be replaced entirely (which we already have been doing), as in the '!start_from_current_groups' case, but specifically also when they are not going to be touched at all. This change in passing makes the modified code block's comment saying that SETCREDF_SUPP_GROUPS need not be set here correct. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53771
* | | beep: Sort usage and man page optionsJose Luis Duran2025-11-222-35/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort usage and man page options, mention possible minimum and maximum values, fix punctuation marks, and cleanup the man page. PR: 291092 Reviewed by: pauamma_gundo.com, christos MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53827
* | | freebsd-tips: Add a shell function for laptopsAlexander Ziaee2025-11-141-0/+8
| | | | | | | | | | | | | | | | | | MFC after: 3 days Reviewed by: pauamma_gundo.com Differential Revision: https://reviews.freebsd.org/D53748
* | | lam: fix using stdin more than onceKyle Evans2025-11-144-4/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Historically, lam(1) closes stdin once we've hit EOF the first time, which would stop it from doing anything else on subsequent gatherline() calls with another openfile. However, this doesn't seem to be strictly necessary- the EOF flag on FILEs is quite sticky, so we can assume that a subsequent fgetc(stdin) will flag EOF properly. This 'fixes' the below-referenced commit in the sense that it surfaced this problem as a fatal error, but the issue was pre-existing. If we do `lam - -`, then one gatherline() will fclose(stdin) and set `ip->eof` for *that* openfile, while the next one will then observe that STDIN_FILENO has been closed and turn it into an EBADF. Add a few tests that were easy to snipe while I'm here, but I haven't aimed for anything close to exhaustive because I think re@ would prefer this fix go in sooner rather than later to land in 15.0. Minor style adjustment for the previous commit while we're here. Reported by: cperciva Discussed with: jrtc27 Reviewed by: des, jlduran Fixes: 4472fd66d006 ("lam: fail on I/O errors") MFC after: 3 days (tentative) Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53750
* | | ministat: Clean up usage message, manual page, and chameleonMateusz Piotrowski2025-11-133-52/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the manual page: - Fix synopsis and use better argument names - Improve description of flags. - In EXAMPLES, list the contents of iguana and chameleon files. - Use Rs to reference The Cartoon Guide to Statistics - Fix misc indentation and style issues - Tag SPDX MFC after: 1 week Reviewed by: bcr, ziaee Differential Revision: https://reviews.freebsd.org/D53710
* | | MFV: less v685.Xin LI2025-11-101-3/+15
| | | | | | | | | | | | MFC after: 3 days
* | | ktrace: Only enable EXTERROR traces for 'x'John Baldwin2025-11-061-0/+1
| | | | | | | | | | | | | | | | | | | | | Add a missing break statement to avoid falling through to the '+' case. Fixes: 96f4be881e8e ("ktrace(1): teach about KTR_EXTERR")
* | | cut.1: Align option list and tag spdxAlexander Ziaee2025-11-031-1/+4
| | | | | | | | | | | | MFC after: 3 days
* | | sockstat(1): Add "-F" parameterJuraj Lutter2025-11-022-41/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add "-F" parameter that, when specified, instructs sockstat(1) to only display sockets for username/UID specified. For consistency with "-j", the last occurence of "-F" is used. Reviewed by: asomers Approved by: asomers Differential Revision: https://reviews.freebsd.org/D53458
* | | id: Fix WITHOUT_AUDIT buildDag-Erling Smørgrav2025-11-021-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | Rather than add more ifdefs, trust the compiler to optimize Aflag away. Fixes: 70b72ede982f ("id: Clean up") PR: 290740 MFC after: 3 days
* | | truss: Properly display first argument to nmountTiago Gasiba2025-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The first argument to nmount(2) is an nvlist in the form of an iovec, which truss already knows how to decode. Set the correct flag so this happens automatically. MFC after: 1 week PR: 290667
* | | id: Add -d and -s optionsDag-Erling Smørgrav2025-10-282-6/+70
| | | | | | | | | | | | | | | | | | | | | | | | These options may not be combined with any other options and print the current or specified user's home directory and shell respectively. Reviewed by: imp, bcr Differential Revision: https://reviews.freebsd.org/D53301
* | | id: Clean upDag-Erling Smørgrav2025-10-281-59/+55
| | | | | | | | | | | | | | | | | | | | | No functional change intended. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D53300
* | | pkgbase: fix kyua packageBaptiste Daroussin2025-10-281-5/+5
| | | | | | | | | | | | All its shared data should be installed in the FreeBSD-kyua package
* | | mandoc: Also run makewhatis for /usr/share/openssl/manLexi Winter2025-10-261-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use a pkg(8) trigger to run makewhatis for /usr/share/man when manpages are updated, but this doesn't cover /usr/share/openssl/man. Rewrite the trigger to process a list of directories instead of a single directory, and include /usr/share/openssl/man in the list. MFC after: 3 days Reviewed by: emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D53064
* | | cut: Avoid undefined behavior.Bryan Drewery2025-10-241-2/+2
| | | | | | | | | | | | | | | | | | | | | Summary: UBSAN complains about p[signed - unsigned] wrapping around. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D53226
* | | w: Trim whitespace and commas from time and uptimeDag-Erling Smørgrav2025-10-231-8/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When producing formatted output, trim leading whitespace and trailing commas from the human-readable time and uptime before emitting them. The text output remains unchanged. PR: 290089 Fixes: 6e6febb54da9 ("w: Fix idle time in json output, add login/idle times to json output") Reviewed by: marius.h_lden.org Differential Revision: https://reviews.freebsd.org/D53167
* | | netstat: add support for UDP-Lite endpointsMichael Tuexen2025-10-232-11/+30
| | | | | | | | | | | | | | | | | | | | | | | | With this patch UDP-Lite endpoints are also shown per default. Reviewed by: Nick Banks MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53252
* | | sockstat: add support for UDP-Lite endpointsMichael Tuexen2025-10-231-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | With this patch UDP-Lite endpoints are also show per default. Reviewed by: Peter Lei, Nick Banks MFC after: 3 days Relnotes: yes Differential Revision: https://reviews.freebsd.org/D53230
* | | libarchive: merge from vendor branchMartin Matuska2025-10-217-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update vendor/libarchive to 3.8.2 Important bugfixes: #2477 tar writer: fix replacing a regular file with a dir for ARCHIVE_EXTRACT_SAFE_WRITES #2659 lib: improve filter process handling #2664 zip writer: fix a memory leak if write callback error early #2665 lib: archive_read_data: handle sparse holes at end of file correctly #2668 7zip: Fix out of boundary access #2670 zip writer: fix writing with ZSTD compression #2672 lib: fix error checking in writing files #2678 zstd write filter: enable Zstandard's checksum feature #2679 lib: handle possible errors from system calls #2707 lib: avoid leaking file descriptors into subprocesses #2713 RAR5 reader: fix multiple issues in extra field parsing function #2716 RAR5 reader: early fail when file declares data for a dir entry #2717 bsdtar: Allow filename to have CRLF endings #2719 tar reader: fix checking the result of the strftime (CVE-2025-25724) #2737 tar reader: fix an infinite loop when parsing V headers #2742 lib: parse_date: handle dates in 2038 and beyond if time_t is big enough Obtained from: libarchive Vendor commit: 7f53fce04e4e672230f4eb80b219af17975e4f83 Security: CVE-2025-25724 PR: 290303 (exp-run) MFC after: 1 week
* | | sockstat: fix column length for PROTOMichael Tuexen2025-10-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The computation of the length was not taking into account that IPv6 endpoints, which are not IPv6 only, have a suffix of 46. For UDP and TCP this bug was not relevant, since tcp46 and udp46 has the same length as PROTO, but sctp46 is longer. Upcoming udplite support will also be affected. Reviewed by: asomers MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53212
* | | find: fix pathnames printed by the SIGINFO handlerAlan Somers2025-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't duplicate the last component. PR: 290362 Reported by: John F. Carr <jfc@mit.edu> Fixes: d06a00963b7 MFC after: 3 days Reviewed by: jilles, Goran Mekić <meka@tilda.center> Pull Request: https://github.com/freebsd/freebsd-src/pull/1878
* | | mkimg: Add a -h option and improve usage output to be more expressiveBrad Davis2025-10-181-8/+13
| | | | | | | | | | | | | | | | | | Reviewed by: imp, kp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D52906
* | | ncurses: Move utilities to the ncurses packageLexi Winter2025-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | | MFC after: 3 days Reviewed by: manu, kevans Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D53163
* | | calendar: Add myself (jlduran) to calendar.freebsdJose Luis Duran2025-10-171-0/+1
| | | | | | | | | | | | The bank no longer uses this information as a security question.
* | | tar: Move to the utilities packageLexi Winter2025-10-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tar(1) is not a core runtime utility; in particular, nothing in /etc/rc.d/* requires it. Move it to utilities, which is also where cpio(1) lives. This removes the dependency from runtime to libarchive. MFC after: 3 days Reviewed by: manu, emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D53059
* | | sockstat: improve handling of path stateMichael Tuexen2025-10-142-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only suppress the path state column when producing traditional text output. When generating html output, always include the column. Please note that when generating json or xml output, optional fields like the path state are only generated if they is applicable. This has not been changed. The changes in this patch were suggested by asomers. Reviewed by: asomers Fixes: 746eadecaa7d ("sockstat: show path state column only when useful") MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D53005
* | | login.conf: Remove never used ignoretime/ignoretime@Paul Armstrong2025-10-131-4/+0
| | | | | | | | | | | | | | | | | | | | | PR: 240378 Reviewed by: otis (mentor), glebius (src committer) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52991
* | | sockstat: Fix build reproducibilityColin Percival2025-10-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both usr.bin/sockstat and usr.bin/sockstat/tests build the file src/usr.bin/sockstat/sockstat.c. Unfortunately, they place the resulting object file in the same place, but produce different files due to paths appearing in the .debug files; this results in different binaries depending on how the race between the two builds ends. Use .PATH to tell make to find sockstat.c in the parent directory but place the object file in the current object directory, rather than placing '..' into the name of the source file. Suggested by: bdrewery, emaste, jrtc27 MFC after: 5 minutes (15.0 build fix) Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D53032
* | | vmstat: Print the number of wired pages in each objectMark Johnston2025-10-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Reviewed by: alc, kib MFC after: 1 week Sponsored by: Modirum MDPay Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53008
* | | sockstat: show path state column only when usefulMichael Tuexen2025-10-092-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Showing the path state column is only useful, if there is at least one SCTP endpoint shown, which is not in the state CLOSED or LISTEN. Don't show it when it is not useful. Reviewed by: rrs MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D52986
* | | sockstat: improve output formattingMichael Tuexen2025-10-091-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the format when the output for a socket spans multiple lines. Reviewed by: rrs MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D52984
* | | sockstat: improve indentationMichael Tuexen2025-10-071-61/+62
| | | | | | | | | | | | | | | | | | | | | No functional changes intended. MFC after: 3 days Sponsored by: Netflix, Inc.
* | | sockstat: support reporting of BBLog stateMichael Tuexen2025-10-062-4/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a -b option to print the BBLog state for TCP sockets. Reviewed by: jtl, rrs MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D52944
* | | tail: Tweak follow_rename test caseDag-Erling Smørgrav2025-10-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a brief sleep to give tail time to start following the file before we rename it. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D52887
* | | lsvfs(1): CapsicumiseFaraz Vahedi2025-10-061-24/+27
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Faraz Vahedi <kfv@kfv.io> Reviewed by: asomers, markj Pull Request: https://github.com/freebsd/freebsd-src/pull/1498
* | | getconf: Report value of _SC_PHYS_PAGESJason W. Bacon2025-10-031-0/+1
| | | | | | | | | | | | | | | PR: 289717 Reviewed by: jhb
* | | */*: remove recallocarray() compat shims following import into libcRobert Clausecker2025-10-031-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | libopenbsd retains recallocarray() during bootstrapping for now as it is needed for mandoc. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D52864