aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
Commit message (Collapse)AuthorAgeFilesLines
* Add MPLS LSP-echo (RFC8029, March 2017) port.David E. O'Brien2018-09-061-0/+2
| | | | | | | | | Reviewed by: stevek Approved by: re(gjb) Obtained from: Juniper Networks Notes: svn path=/head/; revision=338503
* Move etc/crontab to usr.sbin/cron/cron/Brad Davis2018-09-062-0/+24
| | | | | | | | Approved by: re (gjb), will (mentor) Differential Revision: https://reviews.freebsd.org/D16786 Notes: svn path=/head/; revision=338497
* Make -a (to make the entry active) apply to creation of a new bootWarner Losh2018-09-021-2/+4
| | | | | | | | | | | variable. Approved by: re@ (rgrimes) PR: 231013 Differential Revision: https://reviews.freebsd.org/D16977 Notes: svn path=/head/; revision=338432
* Move defaults/periodic.conf back to a config file.Brad Davis2018-09-021-2/+2
| | | | | | | | | | Ths prevents etcupdate and mergemaster from deleting it for now. Approved by: re (rgrimes), will (mentor) Differential Revision: https://reviews.freebsd.org/D16975 Notes: svn path=/head/; revision=338429
* userboot: handle guest interpreter mismatches more intelligentlyKyle Evans2018-09-011-9/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The switch to lualoader creates a problem with userboot: the host is inclined to build userboot with Lua, but the host userboot's interpreter must match what's available on the guest. For almost all FreeBSD guests in the wild, Lua is not yet available and a Lua-based userboot will fail. This revision updates userboot protocol to version 5, which adds a swap_interpreter callback to request a different interpreter, and tries to determine the proper interpreter to be used based on how the guest /boot/loader is compiled. This is still a bit of a guess, but it's likely the best possible guess we can make in order to get it right. The interpreter is now embedded in the resulting executable, so we can open /boot/loader on the guest and hunt that down to derive the interpreter it was built with. Using -l with bhyveload will not allow an intepreter swap, even if the loader specified happens to be a userboot with the wrong interpreter. We'll simply complain about the mismatch and bail out. For legacy guests without the interpreter marker, we assume they're 4th. For new guests with the interpreter marker, we'll read it and swap over to the proper interpreter if it doesn't match what the userboot we're using was compiled with. Both flavors of userboot are installed by default, userboot_4th.so and userboot_lua.so. This fixes the build WITHOUT_FORTH as a coincidence, which was broken by userboot being forced to 4th. Reviewed by: imp, jhb, araujo (earlier version) Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D16945 Notes: svn path=/head/; revision=338418
* Add libxo(3) support to lastlogin(8).Philip Paeps2018-08-283-8/+42
| | | | | | | | | | | Reviewed by: kp Approved by: re (gjb) MFC after: 1 week Relnotes: yes Differential Revision: https://reviews.freebsd.org/D16919 Notes: svn path=/head/; revision=338353
* Add missing endpwent() and endgrent() calls to nfsuserd(8).Mark Johnston2018-08-281-0/+2
| | | | | | | | | | | PR: 230937 Submitted by: Peter Eriksson <peter@ifm.liu.se> Reviewed by: rmacklem Approved by: re (gjb) MFC after: 1 week Notes: svn path=/head/; revision=338350
* Fix the install location of hcsecd.confBrad Davis2018-08-261-0/+1
| | | | | | | | Submitted by: vangyzen Approved by: re (marius) Notes: svn path=/head/; revision=338320
* Remove trailing slash in pathname so that valid METALOG is created in theBrad Davis2018-08-251-1/+1
| | | | | | | | | | NO_ROOT case of make packages. Submitted by: Dan McGregor <dan.mcgregor@usask.ca> Approved by: re (rgrimes) Notes: svn path=/head/; revision=338319
* bsdinstall/zfsboot: Enable new UEFI+GELI supportAllan Jude2018-08-231-9/+42
| | | | | | | | | | | | | | | | | | | After r336252 it is no longer necessary to have a separate bootpool when booting from an encrypted disk with UEFI. This change also switches the EFI System Partition contents from the 800 KB boot1.efifat to a new 200 MB filesystem created with newfs_msdos and uses loader.efi directly, instead of boot1.efi. PR: 228916 Reviewed by: dteske MFC after: 1 month Relnotes: yes Sponsored by: Klara Systems Differential Revision: https://reviews.freebsd.org/D12315 Notes: svn path=/head/; revision=338282
* usr.sbin/ndp: Cleanup in preparation to add libxo supportRenato Botelho2018-08-232-37/+42
| | | | | | | | | | | | | | | | | | | * Constify rtpref_str declaration * Remove unused h_errno declaration * Use time_t type for expire * Use strlcpy to set static "?" value to ifname * Rename local variable 's' to stop shadowing global definition * Close socket used in pfx_flush() * Use local variables for sock() in setdefif() and getdefif() * Increase WARNS to 3 Reviewed by: allanjude, kevans Approved by: allanjude Sponsored by: Rubicon Communications, LLC (Netgate) Differential Revision: https://reviews.freebsd.org/D11118 Notes: svn path=/head/; revision=338243
* Add manpage entry for the new bhyve options -s "help" and -l "help".Marcelo Araujo2018-08-231-5/+10
| | | | | | | | Reported by: 0mp Sponsored by: iXsystems Inc. Notes: svn path=/head/; revision=338242
* Create devctl freeze/thaw.Warner Losh2018-08-231-11/+53
| | | | | | | | | | | | This adds it to devctl, libdevctl, defines the two IOCTLs and implements the kernel bits. causes any new drivers that are added via kldload to be deferred until a 'thaw' comes in. These do not stack: it is an error to freeze while frozen, or thaw while thawed. Differential Revision: https://reviews.freebsd.org/D16735 Notes: svn path=/head/; revision=338233
* Fix the nfsuserd.8 man page for the changes made to support uid/gidRick Macklem2018-08-231-2/+7
| | | | | | | | | numbers in owner and owner_group strings. This is a content change. Notes: svn path=/head/; revision=338217
* Move services to usr.sbin/services_mkdb/Brad Davis2018-08-222-0/+2511
| | | | | | | | | | | This is pkgbase related as it switches to CONFS to properly tag this as a config file. Approved by: will (mentor) Differential Revision: https://reviews.freebsd.org/D16848 Notes: svn path=/head/; revision=338212
* Add -s "help" and -l "help" to print a list of supported PCI and LPC devices.Marcelo Araujo2018-08-225-2/+31
| | | | | | | | | | | | | | | | | | | | For tools that uses bhyve such like libvirt, it is important to be able to probe what features are supported by the given bhyve binary. To give more context, libvirt probes bhyve's capabilities in a not very effective way: - Running 'bhyve -h' and parsing output. - To detect devices, it runs 'bhyve -s 0,dev' for every each device and parses error output to identify if the device is supported or not. PR: 2101111 Submitted by: novel MFC after: 2 weeks Relnotes: yes Sponsored by: iXsystems Inc. Notes: svn path=/head/; revision=338210
* Extended pf(4) ioctl interface and pfctl(8) to allow bandwidths ofPatrick Kelsey2018-08-221-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2^32 bps or greater to be used. Prior to this, bandwidth parameters would simply wrap at the 2^32 boundary. The computations in the HFSC scheduler and token bucket regulator have been modified to operate correctly up to at least 100 Gbps. No other algorithms have been examined or modified for correct operation above 2^32 bps (some may have existing computation resolution or overflow issues at rates below that threshold). pfctl(8) will now limit non-HFSC bandwidth parameters to 2^32 - 1 before passing them to the kernel. The extensions to the pf(4) ioctl interface have been made in a backwards-compatible way by versioning affected data structures, supporting all versions in the kernel, and implementing macros that will cause existing code that consumes that interface to use version 0 without source modifications. If version 0 consumers of the interface are used against a new kernel that has had bandwidth parameters of 2^32 or greater configured by updated tools, such bandwidth parameters will be reported as 2^32 - 1 bps by those old consumers. All in-tree consumers of the pf(4) interface have been updated. To update out-of-tree consumers to the latest version of the interface, define PFIOC_USE_LATEST ahead of any includes and use the code of pfctl(8) as a guide for the ioctls of interest. PR: 211730 Reviewed by: jmallett, kp, loos MFC after: 2 weeks Relnotes: yes Sponsored by: RG Nets Differential Revision: https://reviews.freebsd.org/D16782 Notes: svn path=/head/; revision=338209
* Revert r320758, which was the man page update for r320757 just reverted.Rick Macklem2018-08-221-25/+11
| | | | | | | | | This is a content change. PR: 230752 Notes: svn path=/head/; revision=338193
* Revert r320757 since it can cause "excl->shared" panics.Rick Macklem2018-08-221-117/+55
| | | | | | | | | | | | | | | | | | | | | PR#230752 shows a panic where an nfsd thread tries to do soconnect() on the AF_LOCAL socket used by the nfsuserd while already holding an exclusive lock on it. I am not 100% sure how this happens, but since an AF_LOCAL socket is in the file system namespace it is conceivable that it could lock it and then attempt an upcall to the nfsuserd. However, reverting r320757 stops the nfsuserd from using an AF_LOCAL socket, so it should avoid any such panic(). r320757 did fix a problem with running the nfsuserd when jails were enabled, but that can be dealt with less elegantly by allowing the use of an alternate address instead of 127.0.0.1. The gssd daemon also uses an AF_LOCAL socket, but it will do upcalls before the nfsd thread processes the RPC, so I think it should not be suseptible to this problem. PR: 230752 Notes: svn path=/head/; revision=338192
* Use unifdef -x1 instead of ignoring the shell exit codeAlex Richardson2018-08-221-1/+1
| | | | | | | | | | | This way the target fails if unifdef doesn't exist or doesn't modify the file instead of just generating an empty .c file. I found this while building without inherited $PATH (D16815) Approved By: jhb (mentor) Notes: svn path=/head/; revision=338191
* Make NVMe compatible with the original APIChuck Tuffli2018-08-221-17/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | The original NVMe API used bit-fields to represent fields in data structures defined by the specification (e.g. the op-code in the command data structure). The implementation targeted x86_64 processors and defined the bit fields for little endian dwords (i.e. 32 bits). This approach does not work as-is for big endian architectures and was changed to use a combination of bit shifts and masks to support PowerPC. Unfortunately, this changed the NVMe API and forces #ifdef's based on the OS revision level in user space code. This change reverts to something that looks like the original API, but it uses bytes instead of bit-fields inside the packed command structure. As a bonus, this works as-is for both big and little endian CPU architectures. Bump __FreeBSD_version to 1200081 due to API change Reviewed by: imp, kbowling, smh, mav Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D16404 Notes: svn path=/head/; revision=338182
* newsyslog(8): Reject configurations that specify setuid or executable logsConrad Meyer2018-08-212-1/+12
| | | | | | | | | | | | | Prevent some classes of foot-shooting that may result in permissions problems. Reviewed by: dab, delphij, vangyzen (earlier version) Relnotes: yes (behavior change) Sponsored by: Dell EMC Isilon Differential Revision: D16831 Notes: svn path=/head/; revision=338165
* Fix resource leak when using strdup(3).Marcelo Araujo2018-08-211-0/+3
| | | | | | | | | Reported by: Coverity CID: 1394929 Sponsored by: iXsystems Inc. Notes: svn path=/head/; revision=338164
* Move all bluetooth related config files out of etcBrad Davis2018-08-214-14/+121
| | | | | | | | | | | This helps with pkgbase by switching to CONFS so they are properly tagged as config files. Approved by: will (mentor) Differential Revision: https://reviews.freebsd.org/D16833 Notes: svn path=/head/; revision=338155
* Move all syslogd related configs to usr.sbin/syslogd/Brad Davis2018-08-215-0/+57
| | | | | | | | | | | This helps with pkgbase as it switches these to use CONFS which properly tags them as config files. Approved by: will (mentor) Differential Revision: https://reviews.freebsd.org/D16783 Notes: svn path=/head/; revision=338146
* - Add CSV output to gstat via -C flag.Marcelo Araujo2018-08-212-87/+202
| | | | | | | | | | | | | | | Add a -C option, similar to -B, that allows gstat to produce basic CSV output with absolute timestamps (ISO 8601, nearly.) Multiple devices are handled by way of a single-pivot CSV table with duplicated timestamps for each object output. Submitted by: Nick Principe <nap__ixsystems.com> Reviewed by: myself, imp@, asomers (earlier verison), bcr (manpages) Sponsored by: iXsystems Inc. Differential Revision: https://reviews.freebsd.org/D16151 Notes: svn path=/head/; revision=338133
* MFV r338092: ntp 4.2.8p12.Xin LI2018-08-219-29/+49
| | | | | | | Relnotes: yes Notes: svn path=/head/; revision=338126
* config(8): Allow escape-quoted empty stringsKyle Evans2018-08-201-1/+1
| | | | | | | | | | | | | For use with things like BOOT_TAG=\"\" -- there are valid reasons to allow empty strings, especially as these are usually being passed through as options. The same argument could perhaps be made for the unquoted variant in things like MODULES_OVERRIDE="", but it's not immediately clear that this is an issue so I've left it untouched. MFC after: 3 days Notes: svn path=/head/; revision=338120
* mergemaster: better defaults for SOURCEDIRWarner Losh2018-08-201-0/+21
| | | | | | | | | | | If we can't find a Makefile.inc1 in the specified / default SOURCEDIR, and there's a Makefile.inc1 in the current directory, offer the user the choice of using . for SOURCEDIR. Differential Revsion: https://reviews.freebsd.org/D16709 Notes: svn path=/head/; revision=338114
* In r324732 sysinstall was replaced by bsdinstall.Bjoern Heidotting2018-08-201-2/+3
| | | | | | | | | | | | However, for post-install configuration, bsdinstall is not of much use. Point the user to bsdconfig instead. Reviewed by: 0mp, bcr Approved by: 0mp, bcr Differential Revision: https://reviews.freebsd.org/D16751 Notes: svn path=/head/; revision=338110
* iostat: update man page for r277566Will Andrews2018-08-201-2/+8
| | | | | | | | | | | The original commit added granularity to the transaction latency display in the extended device stats mode, but didn't update the man page. Reported by: Miroslav Lachman <000.fbsd@quip.cz> via jmg MFC after: 1 day Notes: svn path=/head/; revision=338103
* NVMe spec version 1.3c says that "serial number" field must be 7-bit ASCII,Marcelo Araujo2018-08-201-19/+14
| | | | | | | | | | | with unused bytes padded by space characters. Same for firmware number and namespace number. Discussed with: imp@ Sponsored by: iXsystems Inc. Notes: svn path=/head/; revision=338089
* Users must set the number of queues from 1 to maximum 16 queues.Marcelo Araujo2018-08-201-6/+4
| | | | | | | Sponsored by: iXsystems Inc. Notes: svn path=/head/; revision=338088
* Fix double mutex lock.Marcelo Araujo2018-08-201-5/+10
| | | | | | | | | | Reported by: Coverity CID: 1394833 Discussed with: Leon Dang Sponsored by: iXsystems Inc. Notes: svn path=/head/; revision=338087
* send-pr: wave goodbyeEitan Adler2018-08-191-1/+0
| | | | | | | | | | Entering into the world of 12.x we no longer need even the placeholder for send-pr. It has not done anything for some time. With Hat: bugmeister Notes: svn path=/head/; revision=338042
* Add the possibility to mark packets urgent based on their length.Nick Hibma2018-08-175-4/+38
| | | | | | | | | | | This allows preferring small (e.g. ACK) packets, in upload heavy environments. It was already possible to mark packets urgent based on destination port. This option piggy backs on that feature. Notes: svn path=/head/; revision=337961
* security.jail.enforce_statfs is handled by jail_set(2), so handling it inJamie Gritton2018-08-163-11/+0
| | | | | | | | | userspace jail(8) is redundant. Differential Revision: D14791 Notes: svn path=/head/; revision=337919
* Fix a resource leak when using strdup(3) and also fix few style(9).Marcelo Araujo2018-08-161-3/+3
| | | | | | | | | | Reported by: Coverity CID: 1394929 MFC after: 1 week Sponsored by: iXsystems Inc. Notes: svn path=/head/; revision=337889
* Remove duplicated code.Marcelo Araujo2018-08-161-5/+0
| | | | | | | | | | Reported by: Coverity CID: 1394893 MFC after: 1 week Sponsored by: iXsystems Inc. Notes: svn path=/head/; revision=337888
* Add a comment explaining how the PSN works and why there is no need forMarcelo Araujo2018-08-161-0/+5
| | | | | | | | | | | | a null terminator. Also mark CID 1394825 as intentional. Reported by: Coverity CID: 1394825 MFC after: 1 week Sponsored by: iXsystems Inc. Notes: svn path=/head/; revision=337887
* Increase the mask from 15 to 255 or otherwise NVME_FEAT_SOFTWARE_PROGRESSMarcelo Araujo2018-08-161-2/+2
| | | | | | | | | | | will never be reached. Discussed with: Leon Dang and Darius Mihai <dariusmihaim@gmail.com> MFC after: 1 week. Sponsored by: iXsystems Inc. Notes: svn path=/head/; revision=337886
* Don't let clobber jailparam values when checking for modification ofJamie Gritton2018-08-151-3/+8
| | | | | | | | | | | | | init-only parameters. Compare string parameter values with strncmp, not memcmp. PR: 230487 Reported by: Jason Mader MFC after: 3 days Notes: svn path=/head/; revision=337867
* - Add exec hook "exec.created". This is called when the jail isAlexander Leidinger2018-08-155-2/+8
| | | | | | | | | | | | | | | | | created and before exec.start is called. [1] - Bump __FreeBSD_version. This allows to attach ZFS datasets and various other things to be done before any command/service/rc-script is started in the new jail. PR: 228066 [1] Reviewed by: jamie [1] Submitted by: Stefan Grönke <stefan@gronke.net> [1] Differential Revision: https://reviews.freebsd.org/D15330 [1] Notes: svn path=/head/; revision=337863
* Add the "autoro" flag to /media. This makes it attempt to mountEdward Tomasz Napierala2018-08-141-1/+1
| | | | | | | | | | | | | it read-only instead of just failing if the media is write-protected. The /net doesn't seem to require the flag. MFC after: 2 weeks Relnotes: yes Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=337749
* Merge ACPICA 20180810.Jung-uk Kim2018-08-131-1/+1
| | | | Notes: svn path=/head/; revision=337713
* Move inetd.conf to usr.sbin/inetd/Brad Davis2018-08-122-0/+124
| | | | | | | | | | | This is pkgbase related as it uses CONFS to tag the file as a config file Approved by: AllanJude (mentor) Sponsored by: Essen Hackathon Differential Revision: https://reviews.freebsd.org/D16693 Notes: svn path=/head/; revision=337687
* Move all the newsyslog related configs to usr.sbin/newsyslog/Brad Davis2018-08-1211-0/+100
| | | | | | | | | | | | This is related to pkgbase and changes these to use CONFS so that these are tagged as config files. Approved by: AllanJude (mentor) Sponsored by: Essen Hackathon Differential Revision: https://reviews.freebsd.org/D16694 Notes: svn path=/head/; revision=337686
* Move all NTP related files to usr.sbin/ntp/ntpd.Brad Davis2018-08-113-0/+358
| | | | | | | | | | | This helps with pkgbase by using CONFS to tag these as config files. Approved by: allanjude (mentor), ian, cy Sponsored by: Essen Hackathon Differential Revision: https://reviews.freebsd.org/D16661 Notes: svn path=/head/; revision=337649
* Move all periodic related config and scripts to usr.sbin/periodic/Brad Davis2018-08-1161-0/+3177
| | | | | | | | | | | | This makes pkgbase easier by tagging these as CONFS so they are properly tagged as config files. Approved by: will (mentor) Sponsored by: Essen Hackathon Differential Revision: https://reviews.freebsd.org/D16553 Notes: svn path=/head/; revision=337648
* Remove unused MAPDESCFILE.Kevin Lo2018-08-111-5/+0
| | | | Notes: svn path=/head/; revision=337628