aboutsummaryrefslogtreecommitdiff
path: root/sbin
Commit message (Collapse)AuthorAgeFilesLines
...
* Rename pass4check() to freeblock() and move from pass4.c to inode.c.Kirk McKusick2020-12-185-47/+41
| | | | | | | | | | | | The new name more accurately describes what it does and the file move puts it with other similar functions. Done in preparation for future cleanups. No functional differences intended. Sponsored by: Netflix Historic Footnote: my last FreeBSD svn commit Notes: svn path=/head/; revision=368773
* geom(8): list geoms with /dev/ prefixRobert Wing2020-12-121-0/+4
| | | | | | | | | | | | | | | | | | | Allow geom(8) to list geoms with the '/dev/' prefix. `geom part show` accepts the '/dev/' prefix but `geom part list` does not. Modify find_geom() in sbin/geom/core/geom.c to be consistent with the behavior of find_geom() in lib/geom/part/geom_part.c. PR: 188213 Reported by: Ronald F. Guilmette <rfg@tristatelogic.com> Reviewed by: imp, kevans Approved by: kevans (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27556 Notes: svn path=/head/; revision=368576
* savecore: bail on write error even when decompressingRyan Libby2020-12-111-9/+16
| | | | | | | | | Reviewed by: markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27560 Notes: svn path=/head/; revision=368568
* decryptcore: preload OpenSSL error strings; seed PRNGEric van Gyzen2020-12-111-0/+13
| | | | | | | | | | | As in r360226, preload OpenSSL error strings and seed the PRNG before entering capability mode. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=368553
* Fix bug in ifconfig preventing proper VLAN creation.Hans Petter Selasky2020-12-091-15/+15
| | | | | | | | | | | | | | | | | | | | | | Detection of interface type by filter must happen before detection of interface type by prefix. Else the following sequence of commands will try to create a LAGG interface instead of a VLAN interface, which accidentially worked previously, because the date pointed to by the ifr_data pointer was not parsed by VLAN create ioctl(2). This is a regression after r368229, because the VLAN creation now parses the ifr_data field. How to reproduce: # ifconfig lagg0 create # ifconfig lagg0.256 create Differential Revision: https://reviews.freebsd.org/D27521 Reviewed by: kib@ and kevans@ Reported by: raul.munoz@custos.es Sponsored by: Mellanox Technologies // NVIDIA Networking Notes: svn path=/head/; revision=368492
* bectl: simplify the tail end of the jail cmdKyle Evans2020-12-061-4/+2
| | | | | | | | | | | | | | This has already confused me once (and I'm pretty sure I wrote it), so let's clarify: unjailing after the command has completed will only happen if we're interactive and -U has not been specified. This just folds two conditionals together to make it obvious how -b/-U interact with each other. MFC after: 3 days Notes: svn path=/head/; revision=368388
* ping(8): Fix a few mandoc related issuesGordon Bergling2020-12-041-11/+9
| | | | | | | - new sentence, new line Notes: svn path=/head/; revision=368348
* Fix r368197: suppress error printing for the "check" command.Gleb Smirnoff2020-12-021-2/+3
| | | | | | | Reviewed by: kevans Notes: svn path=/head/; revision=368287
* Improve man page for AmazonEFS mounts.Rick Macklem2020-12-011-2/+11
| | | | | | | | | | | | | | | | PR#250770 was actually just a misunderstanding of what NFS mount options are needed for AmazonEFS mounts. This patch attempts to clarify the manpage to clarify this. This is a content change. PR: 250770 Reviewed by: bcr MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27430 Notes: svn path=/head/; revision=368268
* add documentation that the rules need to be reloaded, and how to do it...John-Mark Gurney2020-12-011-2/+12
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=368267
* Print at least something when failing.Gleb Smirnoff2020-11-301-1/+4
| | | | Notes: svn path=/head/; revision=368197
* Import kernel WireGuard supportMatt Macy2020-11-292-0/+620
| | | | | | | | | | | | | Data path largely shared with the OpenBSD implementation by Matt Dunwoodie <ncon@nconroy.net> Reviewed by: grehan@freebsd.org MFC after: 1 month Sponsored by: Rubicon LLC, (Netgate) Differential Revision: https://reviews.freebsd.org/D26137 Notes: svn path=/head/; revision=368163
* hastd(8) assumes it has no extra file descriptors openedEugene Grosbein2020-11-291-0/+1
| | | | | | | | | | and aborts otherwise, so call closefrom() early. PR: 227461 MFC after: 2 weeks Notes: svn path=/head/; revision=368148
* ping: allow building without INET supportAlan Somers2020-11-282-21/+43
| | | | | | | | | | | | | Building without INET6 support was already possible. Now it's possible to build ping with only INET6, or even with neither INET nor INET6. Reported by: bz Reviewed by: bz MFC-With: 368045 Differential Revision: https://reviews.freebsd.org/D27394 Notes: svn path=/head/; revision=368131
* ping: add a ping6 hard link for backwards compatibilityAlan Somers2020-11-264-2/+23
| | | | | | | | | | | | When invoked as "ping6", ping will now attempt to use ICMPv6 for hostnames that resolve both IPv4 and IPv6 addresses. Reviewed by: bz, manu MFC-With: r368045 Differential Revision: https://reviews.freebsd.org/D27384 Notes: svn path=/head/; revision=368078
* Ensure consistent error messages from ifconfig(8).Hans Petter Selasky2020-11-267-10/+19
| | | | | | | | | | | | | | | | | | | If multiple threads are invoking "ifconfig XXX create" a race may occur which can lead to two different error messages for the same error. a) ifconfig: SIOCIFCREATE2: File exists b) ifconfig: interface XXX already exists This patch ensures ifconfig prints the same error code for the same case. Reviewed by: imp@ and kib@ Differential Revision: https://reviews.freebsd.org/D27380 MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking Notes: svn path=/head/; revision=368058
* Merge ping6 to pingAlan Somers2020-11-2617-837/+671
| | | | | | | | | | | | | There is now a single ping binary, which chooses to use ICMP or ICMPv4 based on the -4 and -6 options, and the format of the address. Submitted by: Ján Sučan <sucanjan@gmail.com> Sponsored by: Google LLC (Google Summer of Code 2019) MFC after: Never Differential Revision: https://reviews.freebsd.org/D21377 Notes: svn path=/head/; revision=368045
* ping(8): Improve parameter validationMark Johnston2020-11-241-52/+58
| | | | | | | | | | | | | - Use strtonum(3) to simplify bounds checking of numeric parameters. - Fix bounds checking when filling out packet data in "sweep" mode. PR: 239974, 239977, 239978 Reported by: Neeraj <neerajpal09@gmail.com> MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25622 Notes: svn path=/head/; revision=367988
* ping6: update usage text after r365547Alan Somers2020-11-241-1/+2
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=367976
* Prefer Em to Ar for emphasisWarner Losh2020-11-231-6/+6
| | | | | | | | | Em is better than Ar if all we want to do is underline the text. Submitted by: yuripv@ Notes: svn path=/head/; revision=367963
* Document the new "tls" NFS mount option.Rick Macklem2020-11-201-1/+8
| | | | | | | | | | | | | | | | | | Recent commits to head have added support for NFS over TLS to the FreeBSD kernel. To enable use of this for an NFS mount, the "tls" mount_nfs option has been added. Once the IETF has assigned an RFC number, I will replace "NNNN" with the number. This is a content change. Reviewed by: gbe Differential Revision: https://reviews.freebsd.org/D26262 Notes: svn path=/head/; revision=367913
* devmatch(8): Fix section orderingGordon Bergling2020-11-201-4/+4
| | | | | | | - sections out of conventional order: Sh HISTORY Notes: svn path=/head/; revision=367897
* camcontrol(8): Fix some warnings spotted by mandocGordon Bergling2020-11-201-9/+0
| | | | | | | - skipping paragraph macro: Pp before Bl Notes: svn path=/head/; revision=367889
* Add '-u' switch that would uncompress cores that were compressed byGleb Smirnoff2020-11-193-56/+173
| | | | | | | | | | | | | | | | | | | kernel during dump time. A real life scenario is that cores are compressed to reduce size of dumpon partition, but we either don't care about space in the /var/crash or we have a filesystem level compression of /var/crash. And we want cores to be uncompressed in /var/crash because we'd like to instantily read them with kgdb. In this case we want kernel to write cores compressed, but savecore(1) write them uncompressed. Reviewed by: markj, gallatin Relnotes: yes Differential Revision: https://reviews.freebsd.org/D27245 Notes: svn path=/head/; revision=367824
* Make use of the getlocalbase() function for run-time adjustment of theStefan Eßer2020-11-182-2/+5
| | | | | | | | | | | | | | | | | | local software base directory, as committed in SVN rev. 367813. The pkg and mailwrapper programs used the LOCALBASE environment variable for this purpose and this functionality is preserved by getlocalbase(). After this change, the value of the user.localbase sysctl variable is used if present (and not overridden in the environment). The nvmecontrol program gains support of a dynamic path to its plugin directory with this update. Differential Revision: https://reviews.freebsd.org/D27237 Notes: svn path=/head/; revision=367816
* [nvmecontrol] Fix type signedness warning-to-error on gcc-6.4Adrian Chadd2020-11-171-4/+4
| | | | | | | | | | | | This fixes a type signedness comparison warning-to-error on gcc-6.4. The ternary operation casts it right but the actual assignment doesn't. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D26791 Notes: svn path=/head/; revision=367771
* Stop using NVME_MAX_XFER_SIZE constant.Alexander Motin2020-11-172-10/+14
| | | | | | | | | | This constant depends on MAXPHYS and does not respect device capabilities. Use proper dynamic ioctl(NVME_GET_MAX_XFER_SIZE) instead. MFC after: 1 month Notes: svn path=/head/; revision=367768
* Revert the whole getlocalbase() set of changes while a different design isScott Long2020-11-153-11/+4
| | | | | | | hashed out. Notes: svn path=/head/; revision=367711
* Fix the previous revision, it suffered from an incomplete change to theScott Long2020-11-151-1/+1
| | | | | | | | getlocalbase API. Also don't erroneously subtract the lenth from the buffer a second time. Notes: svn path=/head/; revision=367702
* Replace hardcoded references to _PATH_LOCALBASE with calls to getlocalbase.3Scott Long2020-11-143-4/+11
| | | | | | | Reviewed by: imp, se Notes: svn path=/head/; revision=367687
* Improve nvmecontrol error reporting.Alexander Motin2020-11-1316-143/+180
| | | | | | | | MFC after: 1 week Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=367630
* Address a mandoc warningMateusz Piotrowski2020-11-101-1/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=367567
* Use Cm macros instead of Ar when referring to a specific memory disk typeMateusz Piotrowski2020-11-061-3/+3
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=367420
* Fix a typo and remove Xr's to vn(4) and vnconfig(4)Mateusz Piotrowski2020-11-061-7/+4
| | | | | | | | | | "mandoc -Tlint" complained about the Xr to vnconfig, which was removed in r238202. I am not sure but maybe it's time to do the same to vn(4). MFC after: 2 weeks Notes: svn path=/head/; revision=367419
* Style, not functional changes:Gleb Smirnoff2020-11-031-7/+7
| | | | | | | | | | - Improve spelling of a false check [1] - A missing line from r367150. Submitted by: kib Notes: svn path=/head/; revision=367307
* ifconfig: properly detect invalid mediaopt keywords.Konstantin Belousov2020-11-021-2/+3
| | | | | | | | | | | | | | | | | | | | | When invalid keyword is specified, ifconfig(8) is silent about it, instead random request is sent to the driver. Before the patch: root@r-freeb43:~ # ifconfig mce0 mediaopt -txpause,-rxpause ifconfig: SIOCSIFMEDIA (media): Device not configured After: root@r-freeb43:~ # ifconfig mce0 mediaopt -txpause,-rxpause ifconfig: unknown option: -txpause Reviewed by: hselasky, kp Sponsored by: Mellanox Technologies / NVidia Networking MFC after: 1 week Differential revision: https://reviews.freebsd.org/D27060 Notes: svn path=/head/; revision=367285
* ifconfig.8: Improve formatting of -f in synopsisMateusz Piotrowski2020-11-011-2/+2
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=367259
* Remove Tn macros from ifconfig.8Mateusz Piotrowski2020-11-011-27/+10
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=367258
* devmatch(8): Respect mask field when matching strings of Z type.Vladimir Kondratyev2020-10-311-0/+5
| | | | | | | | | | | While here, add debug output for this action. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26823 Notes: svn path=/head/; revision=367237
* Use a dynamic buffer for the copy of a node's new value.John Baldwin2020-10-301-14/+21
| | | | | | | | | | | | | This permits setting a node's value to a string longer than BUFSIZ. Reported by: Sony Arpita Das @ Chelsio Reviewed by: freqlabs MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D27027 Notes: svn path=/head/; revision=367188
* Update man-pages to describe the user.localbase variable added in r367179.Stefan Eßer2020-10-301-1/+2
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=367184
* bectl(8): missing flag in the help messageLuca Pizzamiglio2020-10-301-1/+1
| | | | | | | | | | | | Flag -o for destroy subcommand is missing in the help message, but present in the man page. Fix it. PR: 249325 Approved by: kevans Differential Revision: https://reviews.freebsd.org/D26429 Notes: svn path=/head/; revision=367183
* Add help messages for camcontrol(8) MMCCAM functionalityIlya Bakulin2020-10-301-0/+20
| | | | | | | | | | | | This adds the help messages for camcontrol(8) in-binary help. Man page will follow in the separate change. Reviewed by: bz Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D25963 Notes: svn path=/head/; revision=367180
* Convert flags from int to bool. Some (compress) were already used inGleb Smirnoff2020-10-291-12/+14
| | | | | | | comparisons with bool values. No functional changes. Notes: svn path=/head/; revision=367150
* Support hardware rate limiting (pacing) with TLS offload.John Baldwin2020-10-292-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add a new send tag type for a send tag that supports both rate limiting (packet pacing) and TLS offload (mostly similar to D22669 but adds a separate structure when allocating the new tag type). - When allocating a send tag for TLS offload, check to see if the connection already has a pacing rate. If so, allocate a tag that supports both rate limiting and TLS offload rather than a plain TLS offload tag. - When setting an initial rate on an existing ifnet KTLS connection, set the rate in the TCP control block inp and then reset the TLS send tag (via ktls_output_eagain) to reallocate a TLS + ratelimit send tag. This allocates the TLS send tag asynchronously from a task queue, so the TLS rate limit tag alloc is always sleepable. - When modifying a rate on a connection using KTLS, look for a TLS send tag. If the send tag is only a plain TLS send tag, assume we failed to allocate a TLS ratelimit tag (either during the TCP_TXTLS_ENABLE socket option, or during the send tag reset triggered by ktls_output_eagain) and ignore the new rate. If the send tag is a ratelimit TLS send tag, change the rate on the TLS tag and leave the inp tag alone. - Lock the inp lock when setting sb_tls_info for a socket send buffer so that the routines in tcp_ratelimit can safely dereference the pointer without needing to grab the socket buffer lock. - Add an IFCAP_TXTLS_RTLMT capability flag and associated administrative controls in ifconfig(8). TLS rate limit tags are only allocated if this capability is enabled. Note that TLS offload (whether unlimited or rate limited) always requires IFCAP_TXTLS[46]. Reviewed by: gallatin, hselasky Relnotes: yes Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D26691 Notes: svn path=/head/; revision=367123
* Use proper variable for device path.Alexander Motin2020-10-283-4/+4
| | | | | | | | | | | | It seems *-passthru commands were broken from the day one, since the device path is fetched into opt.dev variable and not left in argv[optind]. The other three wrong argv[optind] instances are just in error messages. MFC after: 1 week Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=367112
* Drop "All rights reserved" from all my stuff. This includesEdward Tomasz Napierala2020-10-281-1/+0
| | | | | | | | | | | | Foundation copyrights, approved by emaste@. It does not include files which carry other people's copyrights; if you're one of those people, feel free to make similar change. Reviewed by: emaste, imp, gbe (manpages) Differential Revision: https://reviews.freebsd.org/D26980 Notes: svn path=/head/; revision=367105
* Replace literal uses of /usr/local in C sources with _PATH_LOCALBASEStefan Eßer2020-10-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Literal references to /usr/local exist in a large number of files in the FreeBSD base system. Many are in contributed software, in configuration files, or in the documentation, but 19 uses have been identified in C source files or headers outside the contrib and sys/contrib directories. This commit makes it possible to set _PATH_LOCALBASE in paths.h to use a different prefix for locally installed software. In order to avoid changes to openssh source files, LOCALBASE is passed to the build via Makefiles under src/secure. While _PATH_LOCALBASE could have been used here, there is precedent in the construction of the path used to a xauth program which depends on the LOCALBASE value passed on the compiler command line to select a non-default directory. This could be changed in a later commit to make the openssh build consistently use _PATH_LOCALBASE. It is considered out-of-scope for this commit. Reviewed by: imp MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D26942 Notes: svn path=/head/; revision=367075
* Use proper type (ino_t) for inode numbers to avoid improper sign extentionKirk McKusick2020-10-251-6/+7
| | | | | | | | | | | | | | | | in the Pass 5 checks. The manifestation was fsck_ffs exiting with this error: ** Phase 5 - Check Cyl groups fsck_ffs: inoinfo: inumber 18446744071562087424 out of range The error only manifests itself for filesystems bigger than about 100Tb. Reported by: Nikita Grechikhin <ngrechikhin at yandex.ru> MFC after: 2 weeks Sponsored by: Netflix Notes: svn path=/head/; revision=367045
* ifconfig.8: Remove spurious commasMateusz Piotrowski2020-10-251-3/+3
| | | | | | | | | | | | Correct misuse of commas/parentheses in an enumeration that makes the number of actual parameters more important than expected. PR: 250526 Submitted by: Samy Mahmoudi <samy.mahmoudi__gmail_com> MFC after: 1 week Notes: svn path=/head/; revision=367039