summaryrefslogtreecommitdiff
path: root/usr.sbin
Commit message (Collapse)AuthorAgeFilesLines
* trim(8): Fix a few issues reported by mandocGordon Bergling2020-12-191-5/+7
| | | | | | | | | | | - new sentence, new line - unusual Xr order: ioctl(2) after da(4) - unusual Xr order: sysexits(3) after nda(4) MFC after: 1 week Notes: svn path=/head/; revision=368816
* zonectl(8): Fix a few issues reported by mandocGordon Bergling2020-12-191-7/+1
| | | | | | | | | | | | | - Add missing quotation mark for a comment above the .Dd - inserting missing end of block: Sh breaks Bd - skipping paragraph macro: Pp before Bl - skipping paragraph macro: Pp before Bd - empty block: Bd MFC after: 1 week Notes: svn path=/head/; revision=368815
* nfsv4(4): Fix a few issues reported by mandocGordon Bergling2020-12-191-5/+7
| | | | | | | | | | | - new sentence, new line - function name without markup: rtalloc() - function name without markup: VOP_RECLAIM() MFC after: 1 week Notes: svn path=/head/; revision=368814
* bluetooth: Fix a mandoc related issuesGordon Bergling2020-12-194-24/+25
| | | | | | | | | | | | | | - new sentence, new line - sections out of conventional order: Sh FILES - unusual Xr order: bthost(1) after bthidd(8) - no blank before trailing delimiter - whitespace at end of input line - sections out of conventional order: Sh EXIT STATUS MFC after: 1 week Notes: svn path=/head/; revision=368813
* mpsutil(8): Remove trailing whitespaceGordon Bergling2020-12-191-1/+1
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=368812
* bhyvectl(8): Normalize the man page dateGordon Bergling2020-12-191-1/+1
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=368811
* camdd(8): Fix the man page dateGordon Bergling2020-12-191-1/+1
| | | | | | | | | | The comment before the .Dd macro was missing a quotation mark, so that the date of the man page was always today. MFC after: 3 days Notes: svn path=/head/; revision=368810
* config: Fix a few mandoc related errorsGordon Bergling2020-12-192-10/+11
| | | | | | | | | | - new sentence, new line - no blank before trailing delimiter MFC after: 1 week Notes: svn path=/head/; revision=368809
* devctl(8): Correct "sections out of conventional order" errorGordon Bergling2020-12-191-5/+5
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=368808
* Remove redundand redefinion, fixing build.Konstantin Belousov2020-12-191-2/+0
| | | | | | | | Sponsored by: The FreeBSD Foundation MFC after: 1 week Notes: svn path=/head/; revision=368775
* Fix issues with various VNC clients.Peter Grehan2020-12-181-104/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - support VNC version 3.3 (macos "Screen Sharing" builtin client) - wait until client has requested an update prior to sending framebuffer data - don't send an update if no framebuffer updates detected - increase framebuffer poll frequency to 30Hz, and double that when kbd/mouse input detected - zero uninitialized array elements in rfb_send_server_init_msg() - fix overly large allocation in rfb_init() - use atomics for flags shared between input and output threads - use #defines for constants This work was contributed by Marko Kiiskila, with reuse of some earlier work by Henrik Gulbrandsen. Clients tested : FreeBSD-current - tightvnc - tigervnc - krdc - vinagre Linux (Ubuntu) - krdc - vinagre - tigervnc - xtightvncviewer - remmina MacOS - VNC Viewer - TigerVNC - Screen Sharing (builtin client) Windows 10 - Tiger VNC - VNC Viewer (cursor lag) - UltraVNC (cursor lag) o/s independent - noVNC (browser) using websockify relay PR: 250795 Submitted by: Marko Kiiskila <marko@apache.org> Reviewed by: jhb (bhyve) MFC after: 3 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D27605 Notes: svn path=/head/; revision=368747
* Update the unbound version number from r368478.Cy Schubert2020-12-171-3/+3
| | | | | | | | | | | Updating the version number is an extra manual step. Pointy hat to: cy Reported by: Herbert J. Skuhra <herbert _ gojira.at> MFC after: 3 days Notes: svn path=/head/; revision=368734
* [bhyve] virtio-net: Do not allow receiving packets until features have been ↵Aleksandr Fedorov2020-12-171-0/+19
| | | | | | | | | | | | | | | negotiated. Enforce the requirement that the RX callback cannot be called after a reset until the features have been negotiated. This fixes a race condition where the receive callback is called during a device reset. Reviewed by: vmaffione, grehan Approved by: vmaffione (mentor) Sponsored by: vstack.com Differential Revision: https://reviews.freebsd.org/D27381 Notes: svn path=/head/; revision=368720
* bsdinstall: remove VTOC8 partition scheme optionMitchell Horne2020-12-171-7/+0
| | | | | | | | | | | | | Now that sparc64 has been removed, there are no kernels built with support for the VTOC8 partitioning scheme by default. Remove the option from the installer, as it is unsupported on all installer images produced by re@. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D27641 Notes: svn path=/head/; revision=368719
* freebsd-update: unconditionally regenerate passwd/login.conf filesKyle Evans2020-12-171-11/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | The existing logic is nice in theory, but in practice freebsd-update will not preserve the timestamps on these files. When doing a major upgrade, e.g. from 12.1-RELEASE -> 12.2-RELEASE, pwd.mkdb et al. appear in the INDEX and we clobber the timestamp several times in the process of packaging up the existing system into /var/db/freebsd-update/files and extracting for comparisons. This leads to these files not getting regenerated when they're most likely to be needed. Measures could be taken to preserve timestamps, but it's unclear whether the complexity and overhead of doing so is really outweighed by the marginal benefit. I observed this issue when pkg subsequently failed to install a package that wanted to add a user, claiming that the user was removed in the process. bapt@ pointed to this pre-existing bug with freebsd-update as the cause. PR: 234014, 232921 Reviewed by: bapt, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27635 Notes: svn path=/head/; revision=368713
* /etc/services: attempt to bring the database to this century 2/2.Pedro F. Giffuni2020-12-171-236/+198
| | | | | | | | | | | | | | | This is the final half of splitting r358153 in two, in order to avoid a build system bugs and being able to merge an earlier change to previous releases. Add a note to UPDATING to avoid people building from very old systems from having issues with mergemaster MFC after: 3 days (only 12-stable) Differential Revision: https://reviews.freebsd.org/D23621 Notes: svn path=/head/; revision=368712
* Bugfix to not hide jailparam flags, which for example changes the outputJamie Gritton2020-12-151-1/+1
| | | | | | | | | | "vnet=2" to the less opaque "vnet=inherit" Reported by: kevans MFC after: 5 days Notes: svn path=/head/; revision=368676
* Provide userland notification of gpio pin changes ("userland gpio interrupts").Ian Lepore2020-12-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an import of the Google Summer of Code 2018 project completed by Christian Kramer (and, sadly, ignored by us for two years now). The goals stated for that project were: FreeBSD already has support for interrupts implemented in the GPIO controller drivers of several SoCs, but there are no interfaces to take advantage of them out of user space yet. The goal of this work is to implement such an interface by providing descriptors which integrate with the common I/O system calls and multiplexing mechanisms. The initial imported code supports the following functionality: - A kernel driver that provides an interface to the user space; the existing gpioc(4) driver was enhanced with this functionality. - Implement support for the most common I/O system calls / multiplexing mechanisms: - read() Places the pin number on which the interrupt occurred in the buffer. Blocking and non-blocking behaviour supported. - poll()/select() - kqueue() - signal driven I/O. Posting SIGIO when the O_ASYNC was set. - Many-to-many relationship between pins and file descriptors. - A file descriptor can monitor several GPIO pins. - A GPIO pin can be monitored by multiple file descriptors. - Integration with gpioctl and libgpio. I added some fixes (mostly to locking) and feature enhancements on top of the original gsoc code. The feature ehancements allow the user to choose between detailed and summary event reporting. Detailed reporting provides a record describing each pin change event. Summary reporting provides the time of the first and last change of each pin, and a count of how many times it changed state since the last read(2) call. Another enhancement allows the recording of multiple state change events on multiple pins between each call to read(2) (the original code would track only a single event at a time). The phabricator review for these changes timed out without approval, but I cite it below anyway, because the review contains a series of diffs that show how I evolved the code from its original state in Christian's github repo for the gsoc project to what is being commited here. (In effect, the phab review extends the VC history back to the original code.) Submitted by: Christian Kramer Obtained from: https://github.com/ckraemer/freebsd/tree/gsoc2018 Differential Revision: https://reviews.freebsd.org/D27398 Notes: svn path=/head/; revision=368585
* fix up documentation/comments: processname is not defined, but programnameJohn-Mark Gurney2020-12-102-6/+6
| | | | | | | | | | | is.. a couple other minor documentation fixes that igor caught... MFC after: 1 week Notes: svn path=/head/; revision=368529
* Add deprecation notice for bvmconsole and bvmdebugRobert Wing2020-12-102-3/+7
| | | | | | | | | | | | | | | | Now that bhyve(8) supports UART, bvmconsole and bvmdebug are no longer needed. Mark the '-b' and '-g' flag as deprecated for bhyve(8). These will be removed in 13. Reviewed by: jhb, grehan Approved by: kevans (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27519 Notes: svn path=/head/; revision=368519
* Make "diskinfo -i" also test 1MB reads.Edward Tomasz Napierala2020-12-101-0/+3
| | | | Notes: svn path=/head/; revision=368510
* Lift scope of buf[] to make it extend to a potential access via *basenameStefan Eßer2020-12-101-1/+1
| | | | | | | | | | | | It can be assumed that the contents of the buffer was still allocated and valid at the point of the out-of-scope access, so there was no security issue in practice. Reported by: Coverity Scan CID 1437697 MFC after: 3 days Notes: svn path=/head/; revision=368503
* fts_read: Handle error from a NULL return better.Bryan Drewery2020-12-085-5/+11
| | | | | | | | | | | | | | | | | | | | This is addressing cases such as fts_read(3) encountering an [EIO] from fchdir(2) when FTS_NOCHDIR is not set. That would otherwise be seen as a successful traversal in some of these cases while silently discarding expected work. As noted in r264201, fts_read() does not set errno to 0 on a successful EOF so it needs to be set before calling it. Otherwise we might see a random error from one of the iterations. gzip is ignoring most errors and could be improved separately. Reviewed by: vangyzen Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D27184 Notes: svn path=/head/; revision=368467
* crunchgen: fix NULL-deref bug introduced in r364647Alex Richardson2020-12-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | While porting over the local changes from CheriBSD for upstreaming, I accidentally committed a broken version of find_entry_point(): we have to return NULL if the value is not found instead of a value with ep->name == NULL, since the checks in main were changed to check ep instead of ep->name for NULL. This only matters if the crunched tool cannot be found using normal lookup and one of the fallback paths is used, so it's unlikely to be triggered in rescue. However, I noticed that one of our CheriBSD test scripts was failing to run commands under `su` on minimal disk images where all binaries are hardlinks to a `cheribsdbox` tool generated with crunchgen. This also updates the bootstrapping check in Makefile.inc1 to bootstrap crunchgen up to the next version bump. Reviewed By: kevans Differential Revision: https://reviews.freebsd.org/D27474 Notes: svn path=/head/; revision=368337
* crashinfo: Add references to the gdb port/packageEd Maste2020-12-022-1/+3
| | | | | | | | | | | We intend to remove the obsolete GDB 6.1.1 from FreeBSD before FreeBSD 13. Reviewed by jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27447 Notes: svn path=/head/; revision=368282
* rtsold: Fix bugs reported by CoverityMark Johnston2020-12-024-15/+21
| | | | | | | | | | | | | - Avoid leaking a socket if llflags_get() fails. - Avoid leaking a file handle if rtsold_init_dumpfile() fails. - Tighten the check in if_nametosdl() which determines whether we failed to find the specified interface. - Fix errno handling in an error path in rtsock_open(). MFC after: 1 week Notes: svn path=/head/; revision=368278
* rtsold: Fix multiple buffer overflowsMark Johnston2020-12-011-6/+18
| | | | | | | | | Approved by: so Security: CVE-2020-25577 MFC after: now Notes: svn path=/head/; revision=368248
* efibootmgr: fix an incorrect error handling checkMitchell Horne2020-11-301-1/+1
| | | | | | | | | | | | | | efivar_device_path_to_unix_path() returns standard error codes on failure and zero on success. Checking for a return value less than zero means that the actual failure cases won't be handled. This could manifest as a segfault during the subsequent call to printf(). Reviewed by: imp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D27424 Notes: svn path=/head/; revision=368200
* Suspend I/O on ahci-cd devices during a snapshot.John Baldwin2020-11-281-1/+1
| | | | | | | Submitted by: Vitaliy Gusev <gusev.vitaliy@gmail.com> Notes: svn path=/head/; revision=368119
* bhyve: Add snapshot support for virtio-rnd.John Baldwin2020-11-282-1/+5
| | | | | | | | | | This uses the same snapshot routine as other VirtIO devices. Submitted by: Vitaliy Gusev <gusev.vitaliy@gmail.com> Differential Revision: https://reviews.freebsd.org/D26265 Notes: svn path=/head/; revision=368118
* bhyve: 'xhci,tablet' snapshot fixesJohn Baldwin2020-11-281-10/+11
| | | | | | | | | | | Permit suspend/resume of a XHCI device model that has not been attached to by a driver in a guest OS. Submitted by: Vitaliy Gusev <gusev.vitaliy@gmail.com> Differential Revision: https://reviews.freebsd.org/D26264 Notes: svn path=/head/; revision=368117
* fix casper initialization for setting scripts.Hajimu UMEMOTO2020-11-271-2/+3
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=368111
* Fix bhyve SMBIOS type 19 handling to avoid misreporting total RAM amountRebecca Cran2020-11-271-1/+1
| | | | | | | | | | | | This fixes the amount of memory displayed in the EDK2 UiApp to be the same as passed on the bhyve command line. Otherwise, 8GB is displayed as 4GB, 32GB as 28GB etc. Reviewed by: jhb, kib, rgrimes Differential Revision: https://reviews.freebsd.org/D27348 Notes: svn path=/head/; revision=368093
* bhyve: fix smbiostbl.c style issues and add comment about date formatRebecca Cran2020-11-271-2/+3
| | | | | | | | | Fix a couple of style issues introduced in my previous commit. Add a comment explaining that the SMBIOS specification defines the date format to be mm/dd/yyyy, which is why we don't use ISO 8601. Notes: svn path=/head/; revision=368092
* ping: fix some man pages and tests after r368045Alan Somers2020-11-261-2/+1
| | | | | | | MFC-with: r368045 Notes: svn path=/head/; revision=368046
* Honor the disabled setting for MSI-X interrupts for passthrough devices.John Baldwin2020-11-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | Add a new ioctl to disable all MSI-X interrupts for a PCI passthrough device and invoke it if a write to the MSI-X capability registers disables MSI-X. This avoids leaving MSI-X interrupts enabled on the host if a guest device driver has disabled them (e.g. as part of detaching a guest device driver). This was found by Chelsio QA when testing that a Linux guest could switch from MSI-X to MSI interrupts when using the cxgb4vf driver. While here, explicitly fail requests to enable MSI on a passthrough device if MSI-X is enabled and vice versa. Reported by: Sony Arpita Das @ Chelsio Reviewed by: grehan, markj MFC after: 2 weeks Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D27212 Notes: svn path=/head/; revision=368003
* Replace paths in ctladm(8) examples with something sensible.Edward Tomasz Napierala2020-11-231-11/+5
| | | | | | | | | | | PR: 251181 Reviewed by: 0mp, rm, ygy MFC after: 2 weeks Sponsored by: EPSRC Differential Revision: https://reviews.freebsd.org/D27249 Notes: svn path=/head/; revision=367956
* netmap: valectl: switch to libnetmapVincenzo Maffione2020-11-222-131/+298
| | | | | | | | | | Use the newer libnetmap (included in base) rather than the older nm_open()/nm_close() defined in netmap_user.h MFC after: 3 days Notes: svn path=/head/; revision=367935
* Update man page for new TLS export options.Rick Macklem2020-11-201-4/+58
| | | | | | | | | | | | | | NFS over TLS uses three new export options, added by r364979. This patch updates the exports.5 man page for these new options. Once assigned by IETF, "NNNN" will be replaced with the RFC number. This is a content change. Reviewed by: gbe Differential Revision: https://review.freebsd.org/D26241 Notes: svn path=/head/; revision=367912
* hostapd.conf(5): Add missing 'l'Gordon Bergling2020-11-201-1/+1
| | | | | | | | | | In r367901 I accidentally deleted the 'l' while fixing a few mandoc erros. Spotted by: Yuri Pankov Notes: svn path=/head/; revision=367904
* moused(8): Fix a few mandoc warningsGordon Bergling2020-11-201-12/+14
| | | | | | | - new sentence, new line Notes: svn path=/head/; revision=367903
* crashinfo(8): Fix a few mandoc warningsGordon Bergling2020-11-201-2/+4
| | | | | | | - new sentence, new line Notes: svn path=/head/; revision=367902
* hostapd.conf(5): Fix a mandoc warningGordon Bergling2020-11-201-2/+3
| | | | | | | - new sentence, new line Notes: svn path=/head/; revision=367901
* syslog.conf(5): Fix a few mandoc warningsGordon Bergling2020-11-201-4/+4
| | | | | | | | - new sentence, new line - skipping paragraph macro: Pp at the end of Sh Notes: svn path=/head/; revision=367900
* snmp_wlan(3): Fix mandoc warningsGordon Bergling2020-11-201-15/+17
| | | | | | | - new sentence, new line Notes: svn path=/head/; revision=367899
* Advance RIP after userspace instruction decodePeter Grehan2020-11-191-7/+13
| | | | | | | | | | | | | | Add update to RIP after a userspace instruction decode (as is done for the in-kernel counterpart of this case). Submitted by: adam_fenn.io Reviewed by: cem, markj Approved by: grehan (bhyve) MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D27243 Notes: svn path=/head/; revision=367834
* jail: introduce per jail suser_enabled settingMariusz Zaborski2020-11-181-1/+9
| | | | | | | | | | | | | | The suser_enable sysctl allows to remove a privileged rights from uid 0. This change introduce per jail setting which allow to make root a normal user. Reviewed by: jamie Previous version reviewed by: kevans, emaste, markj, me_igalic.co Discussed with: pjd Differential Revision: https://reviews.freebsd.org/D27128 Notes: svn path=/head/; revision=367819
* Make use of the getlocalbase() function for run-time adjustment of theStefan Eßer2020-11-184-8/+7
| | | | | | | | | | | | | | | | | | 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
* mergemaster: handle symbolic links during update.Warner Losh2020-11-181-2/+116
| | | | | | | | | | | | | | /etc/os-release is now a symbolic link to a generated file. Make mergemaster cope with symbolic links generically. I'm no longer a big mergemaster user, so this has only been lightly tested by me, though Kimura-san has ran it through its paces. Submitted by: Yasushiro KIMURA-san PR: 242212 MFC After: 2 weeks Notes: svn path=/head/; revision=367810
* Add legacy debug/test interfaces for kvm unit tests.Peter Grehan2020-11-175-4/+344
| | | | | | | | | | | | | | | Implement the legacy debug/test interfaces expected by KVM-unit-tests' realmode, emulator, and ioapic tests. Submitted by: adam_fenn.io Reviewed by: markj, grehan Approved by: grehan (bhyve) MFC after: 3 weeks Relnotes: Yes Differential Revision: https://reviews.freebsd.org/D27130 Notes: svn path=/head/; revision=367762