aboutsummaryrefslogtreecommitdiff
path: root/sbin
Commit message (Collapse)AuthorAgeFilesLines
* ifconfig: improve vlan options parsingAlexander V. Chernikov2022-01-171-7/+14
| | | | | | PR: 261136 Reported by: Daniel O'Connor MFC after: 2 weeks
* fsck(8): Fix typoLi-Wen Hsu2022-01-121-1/+1
| | | | | | PR: 260949 Reported by: Graham Perrin <grahamperrin@gmail.com> MFC after: 3 days
* mount_nfs: Add a "bgnow" NFS mount optionRick Macklem2022-01-112-5/+32
| | | | | | | | | | | | | | | | The "bg" option does not go background until the initial mount attempt fails, which can take 60+ seconds. This new "bgnow" option goes background immediately, avoiding the 60+ second delay, if the NFS server is not yet available. The man page update is a content change. Tested by: jwb Reviewed by: debdrup, emaste PR: 260764 MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D33733
* add and use defintions for ATA power modesAndriy Gapon2022-01-112-13/+13
| | | | | | | | | Those can be returned by CHECK POWER MODE command (0xe5). Note that some of the definitions duplicate definitions for Extended Power Conditions. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D33646
* devd: correct wifi regexpWarner Losh2022-01-091-3/+3
| | | | | | | Correct the wifi regexp to include iwlwifi and remove wi driver that was has been retired. Sponsored by: Netflix
* devd: remove the scsi regexpWarner Losh2022-01-091-13/+0
| | | | | | | | We don't really use the scsi regexp for anything. The rescan was a workaround that was fixed a long time ago and has been disabled for ages. And the regexp was incomplete. Sponsored by: Netflix
* ldconfig: remove two symbolsKonstantin Belousov2022-01-081-3/+0
| | | | | | | | _PATH_LD32_HINTS is unused because it is a.out remnant. _PATH_ELF32_HINTS is provided by rtld_paths.h already. Sponsored by: The FreeBSD Foundation MFC after: 1 week
* ipfilter: Restore ipfsyncCy Schubert2022-01-083-0/+1201
| | | | | | | | | ipfsync is a WIP sync daemon designed to be used in a failover scenario. It was removed by 5ee61c7daa511927aae8652d6a3ea78866a50ef8. This commit restores its three files. ipfsync is in my work queue. MFC after: 10 days X-MFC with: 5ee61c7daa511927aae8652d6a3ea78866a50ef8
* ldconfig: remove libsoft supportWarner Losh2022-01-071-10/+3
| | | | | | | Remove support for -soft and its implementation. This arg was never documented, so no need to remove it from the man page. Sponsored by: Netflix
* route: remove write-only struct hostent from getaddr()Ed Maste2022-01-061-21/+12
| | | | | | | | | | | | Under some INET/INET6 src.conf configurations sbin/route previously failed to build due to an unused variable warning. It was functionally write-only anyway, so just remove it. Reported by: melifaro Reviewed by: melifaro MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33717
* Whitespace and capitalization cleanups.Kirk McKusick2022-01-061-7/+8
| | | | | | No changes intended. Sponsored by: Netflix
* vfslist.c: initialize skipvfs variableStefan Eßer2022-01-051-0/+1
| | | | | | | | | | The function makevfslist is only called once in mount.c, but should be save to be called more than once with different parameters. The bin/df command links against this file, and will need this possibility to allow -l and -t to be used together. MFC after: 3 days
* ipfilter: Fix manpage typosCy Schubert2022-01-045-6/+6
| | | | | | Reported by: jrtc27 Fixes: 2582ae5740181e0d2bab10003d66ae91c9b56329 MFC after: 1 month
* ipfilter userland: Fix typosCy Schubert2022-01-041-4/+4
| | | | | | Reported by: netchild Fixes: 2582ae5740181e0d2bab10003d66ae91c9b56329 MFC after: 1 month
* ipfilter userland: Fix branch mismergeCy Schubert2022-01-041-44/+27
| | | | | | | | | | | | | | | | The work to ANSIfy and adjust returns to style(9) resulted in a mismerge of a stash when ipfilter was moved from contrib to sbin. An older file replaced WIP at the time, resulting in a regression. The majority of this work was done in 2018 saved as git stashes within a git-svn tree and migrated to the git tree. The regression occurred when the various stashes were sequentially merged to create individual commits, following the ipfilter move to netpfil and sbin. Reported by: jrtc27 Fixes: 2582ae5740181e0d2bab10003d66ae91c9b56329 Pointy hat to: cy MFC after: 1 month
* ipfilter userland: Style(9) requires a space after returnCy Schubert2022-01-04105-778/+778
| | | | | | Reported by: jrtc27 Fixes: 2582ae5740181e0d2bab10003d66ae91c9b56329 MFC after: 1 month
* ipfilter: Fix typosCy Schubert2022-01-041-4/+4
| | | | | | Reported by: jrtc27 Fixes: 2582ae5740181e0d2bab10003d66ae91c9b56329 MFC after: 1 month
* ipfilter userland: Fix whitespace errorsCy Schubert2022-01-046-20/+20
| | | | | | Replace leading spaces with a tabs on affected lines. MFC after: 1 month
* ipfilter userland: Remove trailing whitespaceCy Schubert2022-01-047-14/+14
| | | | MFC after: 1 month
* ipfilter: Adjust userland returns to conform to style(9)Cy Schubert2022-01-04117-948/+965
| | | | | | Adjust ipfilter's userland return statements to conform to style(9). MFC after: 1 month
* ipfilter: INLINE --> inlineCy Schubert2022-01-041-3/+3
| | | | | | | | | Replace the INLINE macro with inline. Some ancient compilers supported __inline__ instead of inline. The INLINE hack compensated for it. Ancient compilers are history. Reported by: glebius MFC after: 1 month
* ipflter: ANSIfy userland function declarationsCy Schubert2022-01-04154-1594/+837
| | | | | | | | | | | Convert ipfilter userland function declarations from K&R to ANSI. This syncs our function declarations with NetBSD hg commit 75edcd7552a0 (apply our changes). Though not copied from NetBSD, this change was partially inspired by NetBSD's work and inspired by style(9). Reviewed by: glebius (for #network) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D33595
* dnctl: Support reading config from file like ipfw(8)Kristof Provost2022-01-031-54/+67
| | | | | | | | Extend the dnctl (dummynet config) tool to be able to read commands from a file, just like ipfw already does. Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D33627
* Various fixes for ggatec and ggatedAlan Somers2022-01-033-39/+88
| | | | | | | | | | Dynamically size buffers in ggatec. Instead of static size on the stack. Add flush support. Submitted by: Johannes Totz <jo@bruelltuete.com> MFC after: 2 weeks Reviewed by: asomers Differential Revision: https://reviews.freebsd.org/D31722
* ufs: Rework shortlink handling to avoid subobject overflowsJessica Clarke2022-01-022-11/+4
| | | | | | | | | | | | | | | | | | | | Shortlinks occupy the space of both di_db and di_ib when used. However, everywhere that wants to read or write a shortlink takes a pointer do di_db and promptly runs off the end of it into di_ib. This is fine on most architectures, if a little dodgy. However, on CHERI, the compiler can optionally restrict the bounds on pointers to subobjects to just that subobject, in order to mitigate intra-object buffer overflows, and this is enabled in CheriBSD's pure-capability kernels. Instead, clean this up by inserting a union such that a new di_shortlink can be added with the right size and element type, avoiding the need to cast and allowing the use of the DIP macro to access the field. This also mirrors how the ext2fs code implements extents support, with the exact same structure other than having a uint32_t i_data[] instead of a char di_shortlink[]. Reviewed by: mckusick, jhb Differential Revision: https://reviews.freebsd.org/D33650
* route: use NULL for null ptr in getaddr call, not 0Ed Maste2022-01-011-7/+7
| | | | | | Style(9) prefers NULL. Sponsored by: The FreeBSD Foundation
* ipfilter userland: Revert the ipmon part of a6fb9bbea731Cy Schubert2021-12-272-65/+61
| | | | | | | a6fb9bbea731 caused incorrect formatting of ipmon log output. Fixes: a6fb9bbea7318e993dfe0f8a7f00821f79850b26 MFC after: immediately
* ipfilter userland: Path fixup no longer requiredCy Schubert2021-12-275-7/+0
| | | | | | | | Since the move of ipfilter from contrib to sbin adjusting the source path is no longer required. Fixes: 41edb306f05651fcaf6c74f9e3557f59f80292e1 MFC after: 1 month
* pkgbase: Put more binaries/lib in runtimeEmmanuel Vadot2021-12-211-1/+1
| | | | | | | | | Move some needed binaries/libs from FreeBSD-utilities to FreeBSD_runtime. This is everything needed to boot to multiuser with FreeBSD-rc installed. MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D33435
* pkgbase: Put sconfig in FreeBSD-utilitiesEmmanuel Vadot2021-12-211-1/+1
| | | | | | | There is no need to have it in runtime as it's not essential. MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG
* Revert "amd64: Do not build sconfig"Emmanuel Vadot2021-12-211-0/+1
| | | | | | This reverts commit a46856c3f9ec86bd8f0436c3f0736783c2f804db. Requested by: glebius
* ipfilter: Move userland bits to sbinCy Schubert2021-12-20222-9/+46167
| | | | | | | | | | | | | | | | Through fixes and improvements our ipfilter sources have diverged enough to warrant move from contrib into sbin/ipf. Now that I'm planning on implementing MSS clamping as in iptables it makes more sense to move ipfilter to sbin. This is the second of three commits of the ipfilter move. Suggested by glebius on two occaions. Suggested by and discussed with: glebius Reviewed by: glebius, kp (for #network) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D33510
* ipfilter: Move kernel bits to netpfilCy Schubert2021-12-202-2/+2
| | | | | | | | | | | | | | | | Through fixes and improvements our ipfilter sources have diverged enough to warrant move from contrib into sys/netpil. Now that I'm planning on implementing MSS clamping as in iptables it makes more sense to move ipfilter to netpfil. This is the first of three commits the ipfilter move. Suggested by glebius on two occaions. Suggested by and discussed with: glebius Reviewed by: glebius, kp (for #network) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D33510
* fsutil: forward declare struct fstabWarner Losh2021-12-161-0/+1
| | | | | | Fix the build by forward declaring struct fstab. Sponsored by: Netflix
* Update fsck(8) to ignore failures from a check program for a filesystemKirk McKusick2021-12-164-13/+60
| | | | | | | | | | when the fstab(5) entry for the filesystem has the "failok" attribute. Reviewed by: kib PR: 246201 MFC after: 2 weeks Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D33424
* route(8): Remove obsolete informationWarner Losh2021-12-151-18/+1
| | | | | | | | xns and osi are no longer relevant (or supported) so remove their vestiges. Noticed by: phk Sponsored by: Netflix
* amd64: Do not build sconfigEmmanuel Vadot2021-12-151-1/+0
| | | | | | | | We do not build the drivers for this arch so no need to build the configuration tools. MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG
* swapon(8): adapt to the new swapoff(2) interfaceKonstantin Belousov2021-12-091-8/+2
| | | | | | | | | also fix test sys/audit/administrative.c. Reviewed by: brooks Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33343
* savecore: emit information about saved cores under verboseKyle Evans2021-12-081-1/+2
| | | | | | | | | | | | Declare how many cores we saved, and where we saved them to. Drop a comment about emitting little information; it's obvious from the block in question that we emit nothing without verbose. Reviewed by: markj Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. X-NetApp-PR: #65 Differential Revision: https://reviews.freebsd.org/D31393
* kldstat(8): style(9) fixes.Hans Petter Selasky2021-12-071-53/+54
| | | | | | | | | No functional change intended. Differential revision: https://reviews.freebsd.org/D32506 Submitted by: christos@ MFC after: 1 week Sponsored by: NVIDIA Networking
* pfsync: fix incorrect enabling of defer modeKristof Provost2021-12-061-1/+1
| | | | | | | | | | | | | When we exposed the PFSYNCF_OK flag to userspace in 5f5bf88949d we unintentionally caused defer mode to always be enabled. The ioctl check only looked for nonzero, not for the PFSYNCF_DEFER flag. Fix this check and ensure ifconfig sets the flag. Reviewed by: glebius MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D33244
* sysctl: Small style fixWarner Losh2021-12-061-2/+1
| | | | | | Slightly reorder to make this look better. No functional change. Sponsored by: Netflix
* sys/bitset.h: reduce visibility of BIT_* macrosStefan Eßer2021-12-052-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add two underscore characters "__" to names of BIT_* and BITSET_* macros to move them to the implementation name space and to prevent a name space pollution due to BIT_* macros in 3rd party programs with conflicting parameter signatures. These prefixed macro names are used in kernel header files to define macros in e.g. sched.h, sys/cpuset.h and sys/domainset.h. If C programs are built with either -D_KERNEL (automatically passed when building a kernel or kernel modules) or -D_WANT_FREENBSD_BITSET (or this macros is defined in the source code before including the bitset macros), then all macros are made visible with their previous names, too. E.g., both __BIT_SET() and BIT_SET() are visible with either of _KERNEL or _WANT_FREEBSD_BITSET defined. The main reason for this change is that some 3rd party sources including sched.h have been found to contain conflicting BIT_* macros. As a work-around, parts of shed.h have been made conditional and depend on _WITH_CPU_SET_T being set when sched.h is included. Ports that expect the full functionality provided by sched.h need to be built with -D_WITH_CPU_SET_T. But this leads to conflicts if BIT_* macros are defined in that program, too. This patch set makes all of sched.h visible again without this parameter being passed and without any name space pollution due to BIT_* macros becoming visible when sched.h is included. This patch set will be backported to the STABLE branches, but ports will need to use -D_WITH_CPU_SET_T as long as there are supported releases that do not contain these patches. Reviewed by: kib, markj MFC after: 1 month Relnotes: yes Differential Revision: https://reviews.freebsd.org/D33235
* swapoff(8): add -f flagKonstantin Belousov2021-12-042-10/+29
| | | | | | | | | | | to force swapout by ignoring the heuristic that calculates amount of allocated memory against total of RAM plus remaining swap. Reviewed by: markj Discussed with: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33165
* sbin: build ping if at least one of INET & INET6 is enabledEd Maste2021-11-282-1/+6
| | | | | | | | | It does not build (and serves no purpose) if neither is true (i.e., building WITHOUT_INET and WITHOUT_INET6). Also add an explicit error in ping to make this case clear. PR: 260082 Sponsored by: The FreeBSD Foundation
* ldconfig(8): check for no-args command line after options are parsedKonstantin Belousov2021-11-241-5/+6
| | | | | | | | | | | | | | | | | | | Default action for ldconfig is specified as -R AKA 'append', and for no-args (without options changing default actions), ldconfig should append empty list of directories to current list. But because the check was done before options were parsed out, presence of any option turned off default rescan. As result, innocently-looked commands like `ldconfig -v' were interpreted as setting directory hints list to one specified on the command line, i.e. empty. Reported by: https://github.com/mesonbuild/meson/issues/9592 Reviewed by: emaste Tested by: jbeich Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33058
* ldconfig: use libexec/rtld-elf/rtld_paths.hKonstantin Belousov2021-11-242-1/+3
| | | | | | | | | | instead of duplicating definitions using slighly different macro names. Reviewed by: emaste Tested by: jbeich Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33058
* ldconfig(8): nostd/-s does nothingKonstantin Belousov2021-11-242-9/+5
| | | | | | | | | | | Remove the option from man page and summary. Silently ignore it when parsing command line for backward compatibility. Reviewed by: emaste Tested by: jbeich Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33058
* ldconfig: start of cleanupKonstantin Belousov2021-11-243-48/+31
| | | | | | | | | | | | | | Use bool. Use local variables instead of static. Remove non-functional debugging override of hints file path. Use explicit exit() instead of return from main. Minor style tweaks. Reviewed by: emaste Tested by: jbeich Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33058
* ldconfig: remove a comment which is another remnant of a.out supportKonstantin Belousov2021-11-241-1/+1
| | | | | | | Noted and reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33058