aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
Commit message (Collapse)AuthorAgeFilesLines
* Bump .Dd for earlier update (should have been part of r353024).Ian Lepore2019-10-021-1/+1
| | | | Notes: svn path=/head/; revision=353025
* Clarify how the -f option for daemon(8) interacts with other optionsIan Lepore2019-10-021-0/+5
| | | | | | | related to redirecting stdout and stderr. Notes: svn path=/head/; revision=353024
* Add a comment explaining why the opensolaris_load line in loader.confGlen Barber2019-10-021-0/+2
| | | | | | | | | | | | is explicitly added. Requested by: rgrimes MFC after: 3 days MFC with: r353004 Sponsored by: Rubicon Communications, LLC (Netgate) Notes: svn path=/head/; revision=353012
* Explicitly add opensolaris_load="YES" to loader.conf through theGlen Barber2019-10-021-0/+1
| | | | | | | | | | | | | | | installer when installing the system on a ZFS root filesystem. For arm64, zfs_load="YES" does not add opensolaris.ko as a kld dependency, so add it explicitly to prevent boot-time failures out-of-box. PR: 240478 MFC after: 3 days Sponsored by: Rubicon Communications, LLC (Netgate) Notes: svn path=/head/; revision=353004
* Unbreak etcupdate(8) and mergemaster(8) after r352950Kyle Evans2019-10-022-4/+2
| | | | | | | | | | r352950 introduced improper case fall-through for shell scripts. Fix it with a pipe. Reported by: lwhsu, David Wolfskill Notes: svn path=/head/; revision=353002
* Use size_t for byte_to_write variable when comparing to eeprom_info_out_lenHans Petter Selasky2019-10-021-2/+3
| | | | | | | | | | | which is also size_t in mlx5tool(8). Submitted by: slavash@ MFC after: 3 days Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=352992
* Add the ability to query the EEPROM information in mlx5tool(8).Hans Petter Selasky2019-10-022-15/+109
| | | | | | | | | Submitted by: slavash@ MFC after: 3 days Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=352984
* [3/3] etcupdate and mergemaster support for certctlKyle Evans2019-10-022-0/+28
| | | | | | | | | | | | | | | This commit add support for certctl in mergemaster and etcupdate. Both will either rehash or prompt for rehash as new certificates are trusted/blacklisted. This work was done primarily by allanjude@, with minor contributions by myself. No objection from: secteam Differential Revision: https://reviews.freebsd.org/D17389 Notes: svn path=/head/; revision=352950
* [2/3] Add certctl(8)Kyle Evans2019-10-024-0/+358
| | | | | | | | | | | | | | | This is a simple utility to hash all trusted on the system into /etc/ssl/certs. It also allows the user to blacklist certificates they do not trust. This work was done primarily by allanjude@, with minor contributions by myself. No objection from: secteam Differential Revision: https://reviews.freebsd.org/D16857 Notes: svn path=/head/; revision=352949
* Move httpd to simple_httpd...Kyle Evans2019-10-014-3/+2
| | | | | | | | | This avoids PATH conflicts with a real httpd, as a user will likely almost always prefer the more fully-featured httpd. This also lines up with the historical name of the program. Notes: svn path=/head/; revision=352935
* Move simple_httpd out of picobsd, add HTTPD option (default OFF)Kyle Evans2019-10-014-0/+677
| | | | | | | | | | | | | | | | | | picobsd/tinyware has had this compact HTTPD server for a long time, and some people do use it. Move it out into usr.sbin well in advance of any action being taken on picobsd. This has been gated behind an HTTPD option defaulted to *off*, primarily for two reasons: 1.) This code likely needs a good audit, as it's been living off in picobsd land for a long time, and 2.) We don't currently ship an httpd and this may not be a welcome surprise. Reviewed by: eugen Differential Revision: https://reviews.freebsd.org/D21724 Notes: svn path=/head/; revision=352927
* bhyve: support for enabling/disabling the net backendVincenzo Maffione2019-09-283-8/+87
| | | | | | | | | | | | | | | | | | Extend the net backend interface with two functions, namely netbe_rx_disable() and netbe_rx_enable(), which can be used by the net device emulators to stop the backend from invoking the receive callback. This is useful for device emulators, i.e., on hardware resets or to implement receive backpressure. The mevent module has been extendede to support the addition of a disabled event. To prevent race conditions, the net backends will start with receive operation disabled. A follow-up patch will use the new functionalities in the virtio-net device. Reviewed by: jhb, markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D20973 Notes: svn path=/head/; revision=352841
* efibootmgr(8): fix markup and style issuesYuri Pankov2019-09-251-59/+123
| | | | | | | | | | | | - split synopsis into separate options that can't be used together - sort options - fix (style) issues reported by mandoc lint Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D21710 Notes: svn path=/head/; revision=352726
* cron: add log suppression and mail suppression for successful runsKyle Evans2019-09-255-57/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds two new extensions to crontab, ported from OpenBSD: - -n: suppress mail on succesful run - -q: suppress logging of command execution The -q option appears decades old, but -n is relatively new. The original proposal by Job Snijder can be found here [1], and gives very convincing reasons for inclusion in base. This patch is a nearly identical port of OpenBSD cron for -q and -n features. It is written to follow existing conventions and style of the existing codebase. Example usage: # should only send email, but won't show up in log * * * * * -q date # should not send email * * * * * -n date # should not send email or log * * * * * -n -q date # should send email because of ping failure * * * * * -n -q ping -c 1 5.5.5.5 [1]: https://marc.info/?l=openbsd-tech&m=152874866117948&w=2 PR: 237538 Submitted by: Naveen Nathan <freebsd_t.lastninja.net> Reviewed by: bcr (manpages) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D20046 Notes: svn path=/head/; revision=352668
* freebsd-update: Add `updatesready' and `showconfig' commandsMichael Gmelin2019-09-242-3/+39
| | | | | | | | | | | | | | | | | | | | | | `freebsd-update updatesready' can be used to check if there are any pending fetched updates that can be installed. `freebsd-update showconfig' writes freebsd-update's configuration to stdout. This also changes the exit code of `freebsd-update install' to 2 in case there are no updates pending to be installed and there wasn't a fetch phase in the same invocation. This allows scripts to tell apart these error conditions without breaking existing jail managers. See freebsd-update(8) for details. PR: 240757, 240177, 229346 Reviewed by: manpages (bcr), sectam (emaste), yuripv Differential Revision: https://reviews.freebsd.org/D21473 Notes: svn path=/head/; revision=352662
* - Revert WARNS to 2 because of mismatch between (xdrproc_t) and xdr_void().Hiroki Sato2019-09-212-2/+6
| | | | | | | - Add prototype of from_addr(). Notes: svn path=/head/; revision=352574
* Fix warnings and set WARNS=6.Hiroki Sato2019-09-213-12/+11
| | | | Notes: svn path=/head/; revision=352572
* Fix build errors of test.c, which had been broken for a long time.Hiroki Sato2019-09-212-19/+20
| | | | | | | | This is a temporary fix and should be converted to a complete test scenarios by using this tool. Notes: svn path=/head/; revision=352570
* Fix src component detectionMichael Gmelin2019-09-191-0/+9
| | | | | | | | | Reviewed by: emaste MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D21579 Notes: svn path=/head/; revision=352542
* Apply r346792 (cperciva) from stable/12 to head. The original commitGlen Barber2019-09-191-0/+10
| | | | | | | | | | | | | | | | | | | | | | message: On non-x86 systems, use "quarterly" packages. x86 architectures have "latest" package builds on stable/*, so keep using those (they'll get switched over to "quarterly" during releases). The original commit was a direct commit to stable/12, as at the time it was presumed it would not be necessary for head. However, when it is time to create a releng branch or switch from PRERELEASE/STABLE to BETA/RC, the pkg(7) Makefile needs further adjusting. This commit includes those further adjustments, evaluating the BRANCH variable from release/Makefile to determine the pkg(7) repository to use. MFC after: immediate (if possible) Sponsored by: Rubicon Communications, LLC (Netgate) Notes: svn path=/head/; revision=352520
* Reduce calls to close(2) at startup through the use of closefrom(2).Cy Schubert2019-09-191-1/+1
| | | | | | | | | | Submitted by: pawel.biernacki@gmail.com Reviewed by: mjg, cy MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D21715 Notes: svn path=/head/; revision=352518
* freebsd-update: make usage output consistentEd Maste2019-09-191-1/+1
| | | | | | | | | | Drop trailing . which appeared only on description of IDS. Submitted by: grembo Event: EuroBSDCon Norway FreeBSD DevSummit Notes: svn path=/head/; revision=352514
* freebsd-update.8: appease igorEd Maste2019-09-191-1/+1
| | | | | | | | | | | | igor follows American style guides in the belief that abbreviations i.e. and e.g. are always followed by a comma. Make that change now so that future updates to freebsd-update.8 do not complain about this. Submitted by: grembo Event: EuroBSDCon Norway FreeBSD DevSummit Notes: svn path=/head/; revision=352513
* Use correct filename in newsyslog.confSteve Wills2019-09-171-1/+1
| | | | | | | | Approved by: bapt (implicit) Differential Revision: https://reviews.freebsd.org/D21561 Notes: svn path=/head/; revision=352461
* log daemon.info to /var/log/daemon.log by defaultSteve Wills2019-09-172-0/+2
| | | | | | | | | | | | log daemon facility now that daemon(8) has syslog support which defaults to daemon facility, info priority Reviewed by: bapt Approved by: bapt Differential Revision: https://reviews.freebsd.org/D21561 Notes: svn path=/head/; revision=352460
* No longer mlock() ntpd pages by default in memory thus allowing itsCy Schubert2019-09-132-1/+9
| | | | | | | | | | | | | | | | pages to page as necessary. To restore historic BSD behaviour add the following to ntp.conf: rlimit memlock 32 Discussed on: freebsd-current@ between Sept 6-9, 2019 Reported by: Users using ASLR with stack gap != 0 Reviewed by: ian, kib, rgrimes (all previous versions) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D21581 Notes: svn path=/head/; revision=352304
* [jail] removal by jid doesn't trigger pre/post stop scriptsMichael Zhilin2019-09-125-23/+194
| | | | | | | | | | | | | This commit fixes bug: command "jail -r" didn't trigger pre/post stop commands (and others) defined in config file if jid is specified insted of name. Also it adds basic tests for usr.sbin/jail to avoid regression. Reviewed by: jamie, kevans, ray MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D21328 Notes: svn path=/head/; revision=352263
* mtree: Fix -f -f not considering type changes.Bryan Drewery2019-09-121-1/+1
| | | | | | | | | | | | | | This only lists the changed type and not other attributes so that it matches the behavior of -C as done in r66747 for fmtree. The NetBSD -ff implementation was copied from fmtree. Reviewed by: imp MFC after: 2 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D21623 Notes: svn path=/head/; revision=352261
* Get the readline header from the installed header instead of the from the sourceBaptiste Daroussin2019-09-121-1/+1
| | | | | | | | | | | location. With newer import of libedit, the path to be able to access readline/readline.h will also include header which name will conflict with some expected by ntp in another path and end up breaking the build. Notes: svn path=/head/; revision=352248
* Remove useless extra definition of libedit flagsBaptiste Daroussin2019-09-122-5/+0
| | | | | | | Note that all the line editor part is done in the libntp Notes: svn path=/head/; revision=352247
* buf: Add B_INVALONERR flag to discard dataConrad Meyer2019-09-115-0/+5
| | | | | | | | | | | | | | | | | | | | | | Setting the B_INVALONERR flag before a synchronous write causes the buf cache to forcibly invalidate contents if the write fails (BIO_ERROR). This is intended to be used to allow layers above the buffer cache to make more informed decisions about when discarding dirty buffers without successful write is acceptable. As a proof of concept, use in msdosfs to handle failures to mark the on-disk 'dirty' bit during rw mount or ro->rw update. Extending this to other filesystems is left as future work. PR: 210316 Reviewed by: kib (with objections) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D21539 Notes: svn path=/head/; revision=352233
* Stop linking to libl by specifying we do not need yywrapBaptiste Daroussin2019-09-104-3/+3
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=352124
* Stop linking to libl by specifying we do not need yywrapBaptiste Daroussin2019-09-102-2/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=352123
* Stop linking to libl by specifying we do not need yywrapBaptiste Daroussin2019-09-102-1/+2
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=352122
* Stop linking to libl by specifying we do not need yywrapBaptiste Daroussin2019-09-102-2/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=352121
* by specifyng we do not use yywrap we can avoid linking to libl and libyBaptiste Daroussin2019-09-102-1/+2
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=352120
* config: do not link against libl, it is not neededBaptiste Daroussin2019-09-101-1/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=352119
* pkgbase: Put a lot of binaries and lib in FreeBSD-runtimeEmmanuel Vadot2019-09-056-0/+7
| | | | | | | | | | | | All of them are needed to be able to boot to single user and be able to repair a existing FreeBSD installation so put them directly into FreeBSD-runtime. Reviewed by: bapt, gjb Differential Revision: https://reviews.freebsd.org/D21503 Notes: svn path=/head/; revision=351855
* mpsutil slot set statusAndriy Gapon2019-09-044-1/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code has been written as a proof of concept, but I think that it can be useful in general. It allows to set the status of an enclosure slot. Practically, this means controlling whatever slot status LEDs the enclosure provides. At present, the new command does not have sanity checks or any conveniences. That means that it is possible to issue the command for an invalid slot and an enclosure. But the worst I have seen happening is either the command failing or simply being ignored. Also, at the moment, the status has to be specified as a numeric bit mask. The bit definitions can be found in sys/dev/mps/mpi/mpi2_init.h, they are prefixed with MPI2_SEP_REQ_SLOTSTATUS_. The only way to address a slot is by the enclosure handle and the slot number. Both are readily available from mpsutil show commands. So, future enhancements could include alternative ways to address a slot (e.g., by a disk handle or a disk device name) and human friendly names for slot statuses. The new command is useful alternative to 'sas2ircu locate' command. First, sas2ircu is a proprietary blob. Second, it supports setting only locate / identify status bit. Tested on HP H220 running LSI IT firmware 20.x. Reviewed by: bapt MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D20535 Notes: svn path=/head/; revision=351812
* - Retire pc-sysinstall(8)Kris Moore2019-09-0388-11083/+0
| | | | | | | | | | https://reviews.freebsd.org/D21094 Submitted by: kmoore@FreeBSD.org Approved by: imp@FreeBSD.org Notes: svn path=/head/; revision=351781
* makefs: share msdosfsmount.h between kernel msdosfs and makefsEd Maste2019-09-018-208/+7
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=351665
* Replace -Werror with ${WERROR} in pmcstudyWarner Losh2019-08-251-1/+1
| | | | Notes: svn path=/head/; revision=351498
* mixer(8): Report an error if the passed value is an empty stringMateusz Piotrowski2019-08-254-0/+138
| | | | | | | | | | | | | | | | | This patch fixes a bug that made the mixer command enter an infinite loop when instructed to set the value of a device to an empty string (e.g., `mixer vol ""`). Additionally, some tests for mixer(8) are being added. PR: 240039 Reviewed by: hselasky, mav Approved by: src (hselasky, mav) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D21409 Notes: svn path=/head/; revision=351481
* Report Clock Power Management support and status.Alexander Motin2019-08-231-0/+5
| | | | | | | | | | Since we already report ASPM, why not to go further. MFC after: 2 weeks Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=351422
* Properly update FSInfo block after generation.Xin LI2019-08-233-0/+33
| | | | | | | | | | | | After populating the filesystem, write a FSInfo block with proper information. Reviewed by: emaste, cem MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D21363 Notes: svn path=/head/; revision=351415
* makefs: diff reduction to sys/fs/msdosfsEd Maste2019-08-228-24/+33
| | | | | | | No functional change. Notes: svn path=/head/; revision=351396
* makefs: Verify that the BPB media descriptor and FAT ID matchEd Maste2019-08-211-6/+16
| | | | | | | From r322982 in sys/fs/msdosfs. Notes: svn path=/head/; revision=351347
* makefs: share denode.h between kernel msdosfs and makefsEd Maste2019-08-219-276/+33
| | | | | | | | | | | There is no need to duplicate this file when it can be trivially shared (just exposing sections previously under #ifdef _KERNEL). MFC with: r351273 Differential Revision: The FreeBSD Foundation Notes: svn path=/head/; revision=351346
* makefs: share fat.h between kernel msdosfs and makefsEd Maste2019-08-218-127/+16
| | | | | | | | | | | | | There is no reason to duplicate this file when it can be trivially shared (just exposing one section previously under #ifdef _KERNEL). Reviewed by: imp, cem MFC with: r351273 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21346 Notes: svn path=/head/; revision=351321
* makefs: use `char *` not `void *` for buf b_data, drop casts in msdosEd Maste2019-08-212-23/+23
| | | | | | | | | | | | | (The kernel uses caddr_t.) Suggested by: cem Reviewed by: cem MFC with: r351273 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21348 Notes: svn path=/head/; revision=351319