aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
Commit message (Collapse)AuthorAgeFilesLines
* Fix the --guid flag descriptionMateusz Piotrowski2020-06-181-4/+5
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=362325
* Improve periodic(8) manual page presentationMateusz Piotrowski2020-06-181-9/+12
| | | | | | | | | | | | | | | | | - Update synopsis to present all available arguments. - Consistently call the argument specifying an arbitrary directory a "directory". - Do not put macros into -width argument to Bl. They do not expand there. - Stylize command modifiers like "daily" with Cm instead of Pa. While technically periodic(8) operates on directories with such names, it is confusing from the perspective of the manual page reader as Pa and Ar are stylized the same way. Also, I cannot recall a single manual page where Pa would be used to describe the syntax of command-line arguments. MFC after: 2 weeks Notes: svn path=/head/; revision=362321
* Improve unit parsing of mpsutil.Juli Mallett2020-06-161-1/+15
| | | | | | | | | | | | | | | | | | Previously, it used atoi(3) to parse the unit parameter, which would silently yield a unit of 0 in the presence of an invalid unit number. As most users of mpsutil(8) are likely to have at least a unit 0, this is could have confusing results. This behaviour was particularly unintuitive if one incorrectly passed an adapter device name, or a device path, instead of a unit number. In addition to using strtoumax(3) instead of atoi(3) to parse unit numbers, support stripping a device name (e.g. mps1) or path (e.g. /dev/mps2) to just its unit number. Reviewed by: scottl (earlier version) Notes: svn path=/head/; revision=362236
* newsyslog(8): make configuration parser more robust.Eugene Grosbein2020-06-161-23/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently newsyslog supports <include> directive that is used in our default /etc/newsyslog.conf in the following form: <include> /usr/local/etc/newsyslog.conf.d/* While this is suitable for ports installing their own rules for logs rotation, this also makes newsyslog break entire processing of all files if it encounters single line it cannot parse. This includes lines referring to nonexistent username/group for log ownership, so newsyslog stops calling errx() function in the parser. With this fix, newsyslog uses warnx() instead of errx() in such cases to print a warning, recover gracefully and continue with execution. Among other cases, this unbreaks initial creation of log files having flag "C" at boot time (newsyslog -CN). This is most important for systems having RAM-based /var file system like nanobsd(8)-based that rely on newsyslog to bring system log files into existence. MFC after: 1 month Notes: svn path=/head/; revision=362233
* Make use of the UID_NOBODY and GID_NOGROUP definitions in sys/conf.h.Rick Macklem2020-06-161-4/+5
| | | | | | | | | | | r362214 exposed UID_NOBODY and GID_NOGROUP to userspace, so use them instead of the numbers. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D25281 Notes: svn path=/head/; revision=362215
* Move font related data structured to sys/font.c and update vtfontcvtToomas Soome2020-06-141-18/+9
| | | | | | | | | | | | | | | Prepare support to be able to handle font data in loader, consolidate data structures to sys/font.h and update vtfontcvt. vtfontcvt update is about to output set of glyphs in form of C source, the implementation does allow to output compressed or uncompressed font bitmaps. Reviewed by: bcr Differential Revision: https://reviews.freebsd.org/D24189 Notes: svn path=/head/; revision=362172
* Modify mountd to use the new struct export_args committed by r362158.Rick Macklem2020-06-141-60/+80
| | | | | | | | | | | | | | | | | r362158 modified struct export_args for make the ex_flags field 64bits and also changed the anonymous credentials to allow more than 16 groups. This patch fixes mountd.c to use the new structure. It does allocate larger exportlist and grouplist structures now. That will be fixed in a future commit. The only visible change will be that the credentials provided for the -maproot and -mapall exports options can now have more than 16 groups. Reviewed by: kib, freqlabs Relnotes: yes Differential Revision: https://reviews.freebsd.org/D25088 Notes: svn path=/head/; revision=362163
* Add le_read_channel_map and le_read_remote_features commandTakanori Watanabe2020-06-105-2/+188
| | | | | | | | PR: 247051 Submitted by: Marc Veldman marc at bumblingdork.com Notes: svn path=/head/; revision=362005
* Fix a bug where XU_NGROUPS + 1 groups might be copied.Rick Macklem2020-06-091-0/+2
| | | | | | | | | | | | | | r361780 fixed the code so that it would only remove the duplicate when it actually existed. However, that might have resulted in XU_NGROUPS + 1 groups being copied, running off the end of the array. This patch fixes the problem. Spotted during code inspection for other mountd changes. MFC after: 2 weeks Notes: svn path=/head/; revision=361956
* crashinfo: stop looking for gdb in /usr/bin/gdbEd Maste2020-06-081-1/+1
| | | | | | | | | As of r359457 we removed the GDB_LIBEXEC option, always installing in-tree gdb into /usr/libexec/. Thus, there is now no need for crashinfo to include /usr/bin/gdb in the list of pathnames to check when looking for gdb. Notes: svn path=/head/; revision=361930
* services: Add SSDP to service databasePedro F. Giffuni2020-06-071-0/+2
| | | | | | | | | | This is used for UPnP and is registered in the IANA database. MFC after: 2 weeks PR: 241573 Notes: svn path=/head/; revision=361898
* Fix mountd so that it will not lose SIGHUPs that indicate "reload exports".Rick Macklem2020-06-061-6/+46
| | | | | | | | | | | | | | | | | | | | | | | Without this patch, if a SIGHUP is handled while the process is executing get_exportlist(), that SIGHUP is essentially ignored because the got_sighup variable is reset to 0 after get_exportlist(). This results in the exports file(s) not being reloaded until another SIGHUP signal is sent to mountd. This patch fixes this by resetting got_sighup to zero before the get_exportlist() call while SIGHUP is blocked. It also defines a delay time of 250msec before doing another exports reload if there are RPC request(s) to process. This prevents repeated exports reloads from delaying handling of RPC requests significantly. PR: 246597 Reported by: patrykkotlowski@gmail.com Tested by: patrykkotlowski@gmail.com Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25127 Notes: svn path=/head/; revision=361854
* Fix mountd to handle getgrouplist() not returning groups[0] == groups[1].Rick Macklem2020-06-041-3/+9
| | | | | | | | | | | | | | | | | | Prior to r174547, getgrouplist(3) always returned a groups list with element 0 and 1 set to the basegid argument, so long as ngroups was > 1. Post-r174547 this is not the case. r328304 disabled the deduplication that removed the duplicate, but the duplicate still does not occur unless the group for a user in the password database is also entered in the group database. This patch fixes mountd so that it handles the case where a user specified with the -maproot or -mapall exports option has a getgrouplist(3) groups list where groups[0] != groups[1]. Found while testing another mountd patch. MFC after: 2 weeks Notes: svn path=/head/; revision=361780
* pkgbase: resolve mailer.conf conflict WITHOUT_SENDMAILKyle Evans2020-06-021-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When WITHOUT_SENDMAIL is set, we end up with two different mailer.conf that conflict, and hilarity ensues. There's currently three different places that we might install mailer.conf: - ^/etc/Makefile (package=runtime, contingent on MK_MAIL != no) - ^/libexec/dma/dmagent/Makefile (package=dma, contingent on MK_SENDMAIL != no) - ^/usr.sbin/mailwrapper/Makefile (package=utilities, contingent on not-installed) The mailwrapper installation will effectively never happen because the ^/etc one will first. This patch simplifies the whole situation; remove the ^/etc/Makefile version and install it primarily in mailwrapper if MK_MAILWRAPPER != "no". The scenarios covered in mailwrapper are: - sendmail(8) is installed, dma(8) may or may not be installed - neither sendmail(8) nor dma(8) is installed In the first scenario, sendmail(8) is dominant so we can go ahead and install the version in ^/etc/mail. In the unlisted scenario, sendmail(8) is not installed but dma(8) is, we'll let ^/libexec/dma/dmagent do the installation. In the second listed scenario, we still want to install an example mailer.conf so just install the base sendmail(8) version. Reviewed by: bapt MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D24924 Notes: svn path=/head/; revision=361720
* certctl: fix test syntaxKyle Evans2020-06-011-1/+1
| | | | | | | | | test doesn't understand &&, but it does understand -a. MFC after: 1 week Notes: svn path=/head/; revision=361683
* certctl.8: Correct the HISTORY section.Mark Johnston2020-05-301-2/+2
| | | | | | | | | | | certctl was merged to stable/12 after 12.1 was branched. PR: 246190 Reported by: Michael Osipov <michael.osipov@siemens.com> MFC after: 3 days Notes: svn path=/head/; revision=361655
* ctld: Fix a memory leak in uclparse_conf().Mark Johnston2020-05-301-1/+6
| | | | | | | | | PR: 246596 Submitted by: Patryk <patrykkotlowski@gmail.com> MFC after: 1 week Notes: svn path=/head/; revision=361654
* Report STATUS_QUEUED/SENT in `ctladm dumpooa` output.Alexander Motin2020-05-291-3/+6
| | | | | | | | MFC after: 2 weeks Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=361625
* rename in-tree libevent v1 to libevent1Ed Maste2020-05-282-2/+2
| | | | | | | | | | | | | | | | r316063 installed pf's embedded libevent as a private lib, with headers in /usr/include/private/event. Unfortunately we also have a copy of libevent v2 included in ntp, which needed to be updated for compatibility with OpenSSL 1.1. As unadorned 'libevent' generally refers to libevent v2, be explicit that this one is libevent v1. Reviewed by: vangyzen (earlier) Differential Revision: https://reviews.freebsd.org/D17275 Notes: svn path=/head/; revision=361607
* Fix connection event message string (n->\n)Takanori Watanabe2020-05-281-1/+1
| | | | | | | | | PR: 246664 Submitted by: Marc Veldman (marc@bumblngdork.com) Reported by: Jose Luis Duran (jlduran@gmail.com) Notes: svn path=/head/; revision=361586
* Add le_connect command to connect to an LE device.Takanori Watanabe2020-05-264-0/+189
| | | | | | | | PR:246664 Submitted by:MarcVeldman Notes: svn path=/head/; revision=361520
* Add example usage for formatting a floppy disk. Adding a more selfMurray Stokely2020-05-251-3/+28
| | | | | | | | | | | | | | | | contained example here in the fdformat man page will allow us to modernize and streamline the FreeBSD Handbook by cutting out some of this legacy material. While here, address some other minor grammatical nits in this man page. Reviewed by: bcr (mentor) Approved by: bcr (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24971 Notes: svn path=/head/; revision=361443
* Fix pci-passthru MSI issues with OpenBSD guestsPeter Grehan2020-05-253-28/+30
| | | | | | | | | | | | | | | | | | | | | | | - Return 2 x 16-bit registers in the correct byte order for a 4-byte read that spans the CMD/STATUS register. This reversal was hiding the capabilities-list, which prevented the MSI capability from being found for XHCI passthru. - Reorganize MSI/MSI-x config writes so that a 4-byte write at the capability offset would have the read-only portion skipped. This prevented MSI interrupts from being enabled. Reported and extensively tested by Anatoli (me at anatoli dot ws) PR: 245392 Reported by: Anatoli (me at anatoli dot ws) Reviewed by: jhb (bhyve) Approved by: jhb, bz (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D24951 Notes: svn path=/head/; revision=361442
* Chase r361344. Update unbound version strings.Cy Schubert2020-05-241-2/+2
| | | | | | | | Reported by: mike tancsa <mike@sentex.net> MFC after: 1 day Notes: svn path=/head/; revision=361438
* Add an unprivileged mode where calls to install are passed appropriateBrooks Davis2020-05-222-11/+28
| | | | | | | | | | | | | | | | flags. For ease of integration, use the same flags as install: -U unprivileged mode -D <destdir> Specify DESTDIR (overrides the environment) -M <metalog> Full path to METALOG file Reviewed by: kevans Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24932 Notes: svn path=/head/; revision=361397
* Deduplicate fsid comparisonsRyan Moeller2020-05-212-12/+6
| | | | | | | | | | | | | | | | Comparing fsid_t objects requires internal knowledge of the fsid structure and yet this is duplicated across a number of places in the code. Simplify by creating a fsidcmp function (macro). Reviewed by: mjg, rmacklem Approved by: mav (mentor) MFC after: 1 week Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D24749 Notes: svn path=/head/; revision=361313
* Fix indentation in bsdinstall-created wpa_supplicant.confDevin Teske2020-05-201-50/+49
| | | | | | | | | | | | PR: base/221982 Reported by: emaste Reviewed by: emaste, allanjude MFC after: 0 days X-MFC-to: stable/11 Differential Revision: https://reviews.freebsd.org/D23641 Notes: svn path=/head/; revision=361300
* Update leap-seconds to leap-seconds.3676924800.Xin LI2020-05-191-4/+4
| | | | | | | | Obtained from: ftp://ftp.nist.gov/pub/time/leap-seconds.3676924800 MFC after: 3 days Notes: svn path=/head/; revision=361260
* bsdinstall: do a `certctl rehash` upon installation of configurationKyle Evans2020-05-191-0/+3
| | | | | | | | | | | | | | | | | If certctl is installed on the system we're configuring, do a certctl rehash. Note that certctl may not be present if the world we've installed was built either WITHOUT_OPENSSL or WITHOUT_CAROOT. In this scenario, we don't currently see if the host has a certctl as this may be an indication that the system *shouldn't* have certs installed into /etc/ssl. Reviewed by: allanjude, dteske MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D24640 Notes: svn path=/head/; revision=361257
* Add LE Whitelist commands to hccontrolTakanori Watanabe2020-05-192-0/+201
| | | | | | | | PR: 214555 Submitted by Marc Veldman Notes: svn path=/head/; revision=361251
* Allow the FACS and XFACS to be zero in acpidump.Andrew Turner2020-05-181-5/+11
| | | | | | | | | | These are allowed to be zero when the hardware reduced APCI flag is set Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D23207 Notes: svn path=/head/; revision=361216
* bhyve(8): Add the netgraph network backend decription to the manpage.Aleksandr Fedorov2020-05-181-2/+26
| | | | | | | | | | Reviewed by: vmaffione, bcr Approved by: vmaffione (mentor) Sponsored by: vstack.com Differential Revision: https://reviews.freebsd.org/D24846 Notes: svn path=/head/; revision=361215
* certctl: don't fall over flat with relative DESTDIRKyle Evans2020-05-181-5/+3
| | | | | | | | | | | | | | Up until now, all of our DESTDIR use has been with absolute paths. It turned out that the cd in/out dance we do here breaks us down later on, as the relative path no longer resolves. Convert EXTENSIONS to an ERE that we'll use to grep ls -1 of the dir we're inspecting, rather than cd'ing into it and globbing it up. MFC after: 3 days Notes: svn path=/head/; revision=361148
* vmm(4), bhyve(8): Expose kernel-emulated special devices to userspaceConrad Meyer2020-05-154-0/+135
| | | | | | | | | | | | | | | Expose the special kernel LAPIC, IOAPIC, and HPET devices to userspace for use in, e.g., fallback instruction emulation (when userspace has a newer instruction decode/emulation layer than the kernel vmm(4)). Plumb the ioctl through libvmmapi and register the memory ranges in bhyve(8). Reviewed by: grehan Differential Revision: https://reviews.freebsd.org/D24525 Notes: svn path=/head/; revision=361082
* bhyve: Fix processing of netgraph backend options.Aleksandr Fedorov2020-05-151-2/+0
| | | | | | | After r360820, additional parameters are passed through the argument 'opts', and the name of the backend through the argument 'devname'. So, there is no need to skip the backend name from the 'opts' argument. Notes: svn path=/head/; revision=361072
* jail: Add exec.prepare and exec.release command hooksRyan Moeller2020-05-145-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | This change introduces new jail command hooks that run before and after any other actions. The exec.prepare hook can be used for example to invoke a script that checks if the jail's root exists, creating it if it does not. Since arbitrary variables in jail.conf can be passed to the command, it can be pretty useful for templating jails. An example use case for exec.release would be to remove the filesystem of an ephemeral jail. The names "prepare" and "release" are borrowed from the names of similar hooks in libvirt. Reviewed by: jamie, manpages, mmacy Approved by: mmacy (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D24829 Notes: svn path=/head/; revision=361066
* inetd(8): Add comments to all examplesKyle Evans2020-05-141-2/+16
| | | | | | | | | | Submitted by: debdrup (with some minor changes by kevans) Reviewed by: bcr (manpages) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D24818 Notes: svn path=/head/; revision=361036
* certctl: follow-up to r361022, prune blacklist as wellKyle Evans2020-05-141-3/+10
| | | | | | | | | | | | Otherwise, removals from the blacklist may not get processed as they should. While we're here, restructure these to not bother with mkdir(1) if we've already tested them to exist. MFC after: 3 days Notes: svn path=/head/; revision=361023
* certctl(8): don't completely nuke $CERTDESTDIRKyle Evans2020-05-141-3/+5
| | | | | | | | | | | | | | | | | | | | | It's been reported/noted that a well-timed `certctl rehash` will completely obliterate $CERTDESTDIR, which may get used by ports or system administrators. While we can't guarantee the certctl semantics when other non-certctl-controlled bits live here, we should make some amount of effort to play nice. Pruning all existing links, which we'll subsequently rebuild as needed, is sufficient for our needs. This can still be destructive, but it's perhaps less likely to cause issues. I also note that we should probably be pruning /etc/ssl/blacklisted upon rehash as well. Reported by: cem's dovecot server MFC after: 3 days Notes: svn path=/head/; revision=361022
* vfs_extattr: Allow extattr names up to the full maxConrad Meyer2020-05-141-3/+0
| | | | | | | | | | | | | | | | Extattr names are allowed to be 255 bytes -- not 254 bytes plus trailing NUL. Provide a 256 buffer so that copyinstr() has room for the trailing NUL. Re-enable test for maximal name lengths. PR: 208965 Reported by: asomers Reviewed by: asomers Differential Revision: https://reviews.freebsd.org/D24584 Notes: svn path=/head/; revision=361021
* inetd(8): Provide HTTP proxy example using netcatKyle Evans2020-05-131-1/+4
| | | | | | | | | | | | | | One of the fortunes that are included in freebsd-tips talks about how the superserver can be used to proxy connections with netcat, but there are no examples provided. This commit adds an example with comment explaining what it does. Submitted by: debdrup MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D24800 Notes: svn path=/head/; revision=361000
* Remove tests for obsolete compilers in the build systemEric van Gyzen2020-05-123-8/+2
| | | | | | | | | | | | | | Assume gcc is at least 6.4, the oldest xtoolchain in the ports tree. Assume clang is at least 6, which was in 11.2-RELEASE. Drop conditions for older compilers. Reviewed by: imp (earlier version), emaste, jhb MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D24802 Notes: svn path=/head/; revision=360964
* Add a new bhyve network backend that allow to connect the VM to the ↵Aleksandr Fedorov2020-05-122-0/+197
| | | | | | | | | | | | | | | | | netgraph(4) network. The backend uses the socket API with the PF_NETGRAPH protocol family, which is provided by the ng_socket(4). To use the new backend, provide the following bhyve option: -s X:Y:Z,[virtio-net|e1000],netgraph,socket=[ng_socket name],path=[destination node],hook=[our socket src hook],peerhook=[dst node hook] Reviewed by: vmaffione, lutz_donnerhacke.de Approved by: vmaffione (mentor) Sponsored by: vstack.com Differential Revision: https://reviews.freebsd.org/D24620 Notes: svn path=/head/; revision=360958
* Add le_scan subcommand to hccontrol.Takanori Watanabe2020-05-117-81/+427
| | | | | | | | PR: 246141 Submitted by: Marc Veldman Notes: svn path=/head/; revision=360899
* bhyve: update man page to describe the virtio-net mtu optionVincenzo Maffione2020-05-091-3/+8
| | | | | | | | | | | r359704 introduced an 'mtu' option for the virtio-net device emulation. Update the man page to describe the new option. Reviewed by: bcr Differential Revision: https://reviews.freebsd.org/D24723 Notes: svn path=/head/; revision=360837
* bhyve: Pass the full string of options to the network backends.Aleksandr Fedorov2020-05-084-18/+37
| | | | | | | | | | Reviewed by: vmaffione Approved by: vmaffione (mentor) Sponsored by: vstack.com Differential Revision: https://reviews.freebsd.org/D24735 Notes: svn path=/head/; revision=360820
* Document le_enable subcommandTakanori Watanabe2020-05-081-0/+1
| | | | Notes: svn path=/head/; revision=360806
* Initial support for bhyve save and restore.John Baldwin2020-05-0534-42/+3799
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Save and restore (also known as suspend and resume) permits a snapshot to be taken of a guest's state that can later be resumed. In the current implementation, bhyve(8) creates a UNIX domain socket that is used by bhyvectl(8) to send a request to save a snapshot (and optionally exit after the snapshot has been taken). A snapshot currently consists of two files: the first holds a copy of guest RAM, and the second file holds other guest state such as vCPU register values and device model state. To resume a guest, bhyve(8) must be started with a matching pair of command line arguments to instantiate the same set of device models as well as a pointer to the saved snapshot. While the current implementation is useful for several uses cases, it has a few limitations. The file format for saving the guest state is tied to the ABI of internal bhyve structures and is not self-describing (in that it does not communicate the set of device models present in the system). In addition, the state saved for some device models closely matches the internal data structures which might prove a challenge for compatibility of snapshot files across a range of bhyve versions. The file format also does not currently support versioning of individual chunks of state. As a result, the current file format is not a fixed binary format and future revisions to save and restore will break binary compatiblity of snapshot files. The goal is to move to a more flexible format that adds versioning, etc. and at that point to commit to providing a reasonable level of compatibility. As a result, the current implementation is not enabled by default. It can be enabled via the WITH_BHYVE_SNAPSHOT=yes option for userland builds, and the kernel option BHYVE_SHAPSHOT. Submitted by: Mihai Tiganus, Flavius Anton, Darius Mihai Submitted by: Elena Mihailescu, Mihai Carabas, Sergiu Weisz Relnotes: yes Sponsored by: University Politehnica of Bucharest Sponsored by: Matthew Grooms (student scholarships) Sponsored by: iXsystems Differential Revision: https://reviews.freebsd.org/D19495 Notes: svn path=/head/; revision=360648
* Add RISC-V interpreter exampleMitchell Horne2020-05-011-1/+12
| | | | | | | | | | | | Now that RISC-V support has landed in qemu-user-static, add to the list of examples in the binmiscctl(8) manpage. Reviewed by: kevans MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D24646 Notes: svn path=/head/; revision=360519
* config: Add no-ctfconvert support.Bryan Drewery2020-04-283-4/+12
| | | | | | | | | | | | | | | | Bump CONFIGVERS to 600018 for this support. Some files may purposely have debug info disabled or are *source files* that attempt to run ctfconvert on them. Currently ctfconvert ignores these errors but I have a change to make the errors real so we can catch real problems like exceeding type limits. Sponsored by: Dell EMC Reviewed by: imp, cem, kevans Differential Revision: https://reviews.freebsd.org/D24535 Notes: svn path=/head/; revision=360443