Commit graph

7105 commits

Author SHA1 Message Date
Dimitry Andric 0b37c15904 * Bump version numbers to 10.0.0
* Update UPDATING
* Update (Optional)ObsoleteFiles.inc
* Update VCS(Revision|Version) files
* Update generated config headers
* Update clang internal headers Makefile
2020-01-25 16:23:49 +00:00
Ed Maste d3c87514db Tag NLS aliases with pkgbase package
POSIX and en_US.US_ASCII are aliases (symlinks) to the C locale.  They were
not previously tagged with a pkgbase pacakge.  Add the tag so that they are
handled correctly on pkgbase-installed/updated systems.

[This is r356990 reapplied with a corrected commit message.]

Discussed with:	manu
2020-01-24 14:41:51 +00:00
Ed Maste 3407334ae2 revert r356990 to reapply with correct commit message
Requested by:	rgrimes
2020-01-24 14:40:37 +00:00
Ed Maste 6ed1dc004a Tag NLS aliases with package=runtime
POSIX and en_US.US_ASCII are aliases (symlinks) to the C locale.  They were
not previously tagged with a pkgbase pacakge.  Add the tag so that they are
handled correctly on pkgbase-installed/updated systems.

Discussed with:	manu
2020-01-22 18:40:19 +00:00
Kyle Evans 156ebad647 Tag os-release symlink with package=runtime
This ensures it gets into pkgbase-(installed/updated) systems.
2020-01-22 14:07:27 +00:00
Jung-uk Kim a9e3baa562 Install man5 and man7 for OpenSSL.
Note config.5 and crypto.7 are not installed because we have conflicts.

Requested by:	phk
MFC after:	1 month
2020-01-22 01:15:57 +00:00
Dimitry Andric c14a5a8800 Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
9.0.1 final release c1a0a213378a458fbea1a5c77b315c7dce08fd05.

Release notes for llvm, clang, lld and libc++ 9.0.1 will become
available here:

https://releases.llvm.org/9.0.1/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.1/tools/clang/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.1/tools/lld/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.1/projects/libcxx/docs/ReleaseNotes.html

PR:		240629
MFC after:	1 month
2019-12-22 11:50:44 +00:00
Alan Somers 67f72211dd gmultipath: add ATF tests
Add ATF tests for most gmultipath operations. Add some dtrace probes too,
primarily for configuration changes that happen in response to provider
errors.

PR:		178473
MFC after:	2 weeks
Sponsored by:	Axcient
Differential Revision:	https://reviews.freebsd.org/D22235
2019-12-06 00:12:14 +00:00
Warner Losh 6467506baf Create /etc/os-release file.
Each boot, regenerate /var/run/os-release based on the currently running
system. Create a /etc/os-release symlink pointing to this file (so that this
doesn't create a new reason /etc can not be mounted read-only).

This is compatible with what other systems do and is what the sysutil/os-release
port attempted to do, but in an incomplete way. Linux, Solaris and DragonFly all
implement this natively as well. The complete standard can be found at
https://www.freedesktop.org/software/systemd/man/os-release.html

Moving this to the base solves both the non-standard location problem with the
port, as well as the lack of update of this file on system update.

Bump __FreeBSD_version to 1300060

PR: 238953
Differential Revision:  https://reviews.freebsd.org/D22271
2019-11-20 23:45:31 +00:00
Warner Losh 599d032a6d Standardize EFI's ESP mount point.
Mount the UEFI ESP on /boot/efi. No current system uses this by default, but
there are many ad-hoc schemes that do this in /efi or /esp or /uefi and adding a
new directory at the top-level would have a much higher likelihood of
collision. Document this in /etc/mtree/BSD.root.mtree and create EFIDIR and
related variables in bsd.own.mk.

Differential Revision: https://reviews.freebsd.org/D21344
2019-11-20 21:06:29 +00:00
Conrad Meyer 470182bb6e Link in NetBSD's unifdef(1) tests
Skip one, is it currently fails.
2019-11-18 04:03:11 +00:00
Conrad Meyer 43e9023f2d libexecinfo: Integrate NetBSD test into FreeBSD 2019-10-27 05:32:08 +00:00
Bjoern A. Zeeb f74e6e494f frag6: import a set of test cases
In order to ensure that changing the frag6 code does not change behaviour
or break code a set of test cases were implemented.

Like some other test cases these use Scapy to generate packets and possibly
wait for expected answers.  In most cases we do check the global and
per interface (netstat) statistics output using the libxo output and grep
to validate fields and numbers.  This is a bit hackish but we currently have
no better way to match a selected number of stats only (we have to ignore
some of the ND6 variables; otherwise we could use the entire list).

Test cases include atomic fragments, single fragments, multi-fragments,
and try to cover most error cases in the code currently.
In addition vnet teardown is tested to not panic.

A separate set (not in-tree currently) of probes were used in order to
make sure that the test cases actually test what they should.

The "sniffer" code was copied and adjusted from the netpfil version
as we sometimes will not get packets or have longer timeouts to deal with.

Sponsored by:	Netflix
2019-10-21 09:33:45 +00:00
Dimitry Andric 8b3bc70a2b Merge ^/head r352764 through r353315. 2019-10-08 18:17:02 +00:00
Kyle Evans f27f39db77 [1/3] Initial infrastructure for SSL root bundle in base
This setup will add the trusted certificates from the Mozilla NSS bundle
to base.

This commit includes:
- CAROOT option to opt out of installation of certs
- mtree amendments for final destinations
- infrastructure to fetch/update certs, along with instructions

A follow-up commit will add a certctl(8) utility to give the user control
over trust specifics. Another follow-up commit will actually commit the
initial result of updatecerts.

This work was done primarily by allanjude@, with minor contributions by
myself.

No objection from:	secteam
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D16856
2019-10-02 01:05:29 +00:00
Dimitry Andric 61c1328eb0 Merge ^/head r352105 through r352307. 2019-09-13 21:15:01 +00:00
Michael Zhilin cd38a86c63 [jail] removal by jid doesn't trigger pre/post stop scripts
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
2019-09-12 18:53:29 +00:00
Yuri Pankov 42249ef234 locale: handle day, abday, mon, abmon, am_pm keywords
All of these are defined as mandatory by POSIX.

While here, mark all non-standard ones as FreeBSD-only as
other systems (at least, GNU/Linux and illumos) do not handle
them, so we should not encourage their use.

PR:		237752
Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D21490
2019-09-10 15:09:46 +00:00
Dimitry Andric f993ed2fbd Merge ^/head r351732 through r352104. 2019-09-09 19:58:46 +00:00
Kyle Evans b27524973c patch(1): add some basic tests
Summary:
- basic: test application of patches created by diff -u at the
  beginning/middle/end of file, which have differing amounts of context
  before and after chunks being added
- limited_ctx: stems from PR 74127 in which a rogue line was getting added
  when the patch should have been rejected. Similar behavior was
  reproducible with larger contexts near the beginning/end of a file. See
  r326084 for details
- file_creation: patch sourced from /dev/null should create the file
- file_nodupe: said patch sourced from /dev/null shouldn't dupe the contents
  when re-applied (personal vendetta, WIP, see comment)
- file_removal: this follows from nodupe; the reverse of a patch sourced
  from /dev/null is most naturally deleting the file, as is expected based
  on GNU patch behavior (WIP)
2019-09-05 03:16:14 +00:00
Kris Moore 59e50df3cd - Retire pc-sysinstall(8)
https://reviews.freebsd.org/D21094

Submitted by: kmoore@FreeBSD.org
Approved by: imp@FreeBSD.org
2019-09-03 19:42:04 +00:00
Dimitry Andric c5c3ba6b43 Merge ^/head r351317 through r351731. 2019-09-03 05:58:43 +00:00
Dimitry Andric 1db4d87c40 Fix mtree syntax. 2019-09-01 19:13:20 +00:00
Dimitry Andric 2f3724e658 Update Makefile and mtree for clang internal headers, and update
OptionalObsoleteFiles.inc for added and removed files.
2019-08-31 18:04:33 +00:00
Hiroki Sato 3eeebb94f1 Fix build (r351481). 2019-08-25 19:27:14 +00:00
Mateusz Piotrowski babc4e8145 mixer(8): Report an error if the passed value is an empty string
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
2019-08-25 17:55:31 +00:00
Dimitry Andric 72e1e27118 Change clang lib dir to 9.0.0. 2019-08-23 22:12:20 +00:00
Alan Somers 8e0f76c8f4 ping6: add a basic functional test
Submitted by:	Ján Sučan <sucanjan@gmail.com>
MFC after:	2 weeks
Sponsored by:	Google, inc. (Google Summer of Code 2019)
Differential Revision:	https://reviews.freebsd.org/D21292
2019-08-22 15:08:04 +00:00
Alan Somers c43633c6a1 ping: Add tests of the Internet checksum function
Submitted by:	Ján Sučan <sucanjan@gmail.com>
MFC after:	2 weeks
Sponsored by:	Google LLC (Google Summer of Code 2019)
Differential Revision:	https://reviews.freebsd.org/D21340
2019-08-20 21:59:48 +00:00
Alan Somers 0b4275accb fusefs: merge from projects/fuse2
This commit imports the new fusefs driver. It raises the protocol level
from 7.8 to 7.23, fixes many bugs, adds a test suite for the driver, and
adds many new features. New features include:

* Optional kernel-side permissions checks (-o default_permissions)
* Implement VOP_MKNOD, VOP_BMAP, and VOP_ADVLOCK
* Allow interrupting FUSE operations
* Support named pipes and unix-domain sockets in fusefs file systems
* Forward UTIME_NOW during utimensat(2) to the daemon
* kqueue support for /dev/fuse
* Allow updating mounts with "mount -u"
* Allow exporting fusefs file systems over NFS
* Server-initiated invalidation of the name cache or data cache
* Respect RLIMIT_FSIZE
* Try to support servers as old as protocol 7.4

Performance enhancements include:

* Implement FUSE's FOPEN_KEEP_CACHE and FUSE_ASYNC_READ flags
* Cache file attributes
* Cache lookup entries, both positive and negative
* Server-selectable cache modes: writethrough, writeback, or uncached
* Write clustering
* Readahead
* Use counter(9) for statistical reporting

PR:		199934 216391 233783 234581 235773 235774 235775
PR:		236226 236231 236236 236291 236329 236381 236405
PR:		236327 236466 236472 236473 236474 236530 236557
PR:		236560 236844 237052 237181 237588 238565
Reviewed by:	bcr (man pages)
Reviewed by:	cem, ngie, rpokala, glebius, kib, bde, emaste (post-commit
		review on project branch)
MFC after:	3 weeks
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Pull Request:	https://reviews.freebsd.org/D21110
2019-08-07 00:38:26 +00:00
Tom Jones f97a8a3615 Add common firewall test suite
Add a common test suite for the firewalls included in the base system. The test
suite allows common test infrastructure to test pf, ipfw and ipf firewalls from
test files containing the setup for all three firewalls.

Add the pass block test for pf, ipfw and ipf. The pass block test checks the
allow/deny functionality of the firewalls tested.

Submitted by:   Ahsan Barkati
Sponsored by:   Google, Inc. (GSoC 2019)
Reviewed by:    kp
Approved by:    bz (co-mentor)
MFC after:      2 weeks
Differential Revision: https://reviews.freebsd.org/D21065
2019-08-05 11:47:34 +00:00
Alan Somers ad13e15e1d MFHead @350453
Sponsored by:	The FreeBSD Foundation
2019-07-30 19:42:46 +00:00
Ian Lepore ecb12757ba Create the /var/account dir with mode 0750; this is a followup to r349974.
The rc.d/account script contains code to create the /var/account dir, so
it hadn't occurred to me that it is normally created via mtree; thanks to
jilles@ for pointing it out.
2019-07-30 15:51:28 +00:00
Alan Somers 7f49ce7a0b MFHead @349476
Sponsored by:	The FreeBSD Foundation
2019-06-27 23:50:54 +00:00
Warner Losh f5a95d9a07 Remove NAND and NANDFS support
NANDFS has been broken for years. Remove it. The NAND drivers that
remain are for ancient parts that are no longer relevant. They are
polled, have terrible performance and just for ancient arm
hardware. NAND parts have evolved significantly from this early work
and little to none of it would be relevant should someone need to
update to support raw nand. This code has been off by default for
years and has violated the vnode protocol leading to panics since it
was committed.

Numerous posts to arch@ and other locations have found no actual users
for this software.

Relnotes:	Yes
No Objection From: arch@
Differential Revision: https://reviews.freebsd.org/D20745
2019-06-25 04:50:09 +00:00
Alan Somers e532a99901 MFHead @349234
Sponsored by:	The FreeBSD Foundation
2019-06-20 15:56:08 +00:00
Conrad Meyer 403c041316 random(4): Add regression tests for uint128 implementation, Chacha CTR
Add some basic regression tests to verify behavior of both uint128
implementations at typical boundary conditions, to run on all architectures.

Test uint128 increment behavior of Chacha in keystream mode, as used by
'kern.random.use_chacha20_cipher=1' (r344913) to verify assumptions at edge
cases.  These assumptions are critical to the safety of using Chacha as a
PRF in Fortuna (as implemented).

(Chacha's use in arc4random is safe regardless of these tests, as it is
limited to far less than 4 billion blocks of output in that API.)

Reviewed by:	markm
Approved by:	secteam(gordon)
Differential Revision:	https://reviews.freebsd.org/D20392
2019-06-17 14:59:45 +00:00
Antoine Brodin 76cab88458 Remove tabs from BSD.var.dist
Reported by:	zeising
2019-06-16 20:01:45 +00:00
Ian Lepore 71fb373934 Move/rename the sys/pwm.h header file to dev/pwm/pwmc.h. The file contains
ioctl definitions and related datatypes that allow userland control of pwm
hardware via the pwmc device.  The new name and location better reflects its
assocation with a single device driver.
2019-06-15 19:46:59 +00:00
Dimitry Andric efc5c4420a Upgrade our copies of clang, llvm, lld, lldb, compiler-rt, libc++,
libunwind and openmp to the upstream release_80 branch r363030
(effectively, 8.0.1 rc2).  The 8.0.1 release should follow this within a
week or so.

MFC after:	2 weeks
2019-06-12 21:10:37 +00:00
Emmanuel Vadot 2e01fdb266 mtree: Restore mode for /var/spool/lock and opielocks
mode was dropped unintentionally in r348981 for those two directories.

Reviewed by:	rgrimes
MFC after:	1 month
X-MFC-With:	r348981
2019-06-12 11:34:16 +00:00
Emmanuel Vadot 1577943439 pkgbase: Add some tags to files installed in distribution target
Add the MK_MAIL dependant file to the runtime package as well as the
MK_KERBEROS ones the empty locate database, the FreeBSD copyright file
and the GENERIC.hints.
Tag the unbound link from /etc to /var to belong in the unbound package.

Reviewed by:	bapt
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D20607
2019-06-12 09:18:23 +00:00
Emmanuel Vadot 24e1c3e196 pkgbase: Add the correct package for sendmail configuration files
Reviewed by:	bapt
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D20606
2019-06-12 09:17:32 +00:00
Emmanuel Vadot 7155299509 pkgbase: Set a default package=runtime for var directories
This way every directory is at least present in packages.
While here tag some directory from being in sendmail or dma

Reviewed by:	bapt
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D20605
2019-06-12 09:16:42 +00:00
Alan Somers 0269ae4c19 MFHead @348740
Sponsored by:	The FreeBSD Foundation
2019-06-06 16:20:50 +00:00
Mariusz Zaborski 75ed05ef7d DTrace: create an amd64 test suit
Create two tests checking if we can read urgs registers and if the
rax register returns a correct number.

Reviewed by:	markj
Discussed with:	lwhsu
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D20364
2019-06-05 22:32:26 +00:00
Maxim Sobolev 6c4448b394 Put back MTREE_CMD here for now. Doh, not my day, perhaps.
Reported by:	markj, mav
2019-06-03 21:40:42 +00:00
Maxim Sobolev 5d280640cd Leave mtree hardcoded for now. Reverting partially 348521 and also
the followup stopgap change, because I don't think it's a correct. I still
need to figure out where to stick it in. In cannot be in Makefile.inc1
and it cannot be in etc/Makefile from the looks of it to avoid
chicken-and-egg problem.
2019-06-03 15:12:44 +00:00
Maxim Sobolev 5ec57af4b2 Fix several places where tool name has been hardcoded:
install -> ${INSTALL}
    mtree -> ${MTREE_CMD}
    services_mkdb -> ${SERVICES_MKDB_CMD}
    cap_mkdb -> ${CAP_MKDB_CMD}
    pwd_mkdb -> ${PWD_MKDB_CMD}
    kldxref -> ${KLDXREF_CMD}

If you do custom FreeBSD builds you may want to override those
in some cases.

Sponsored by:	Sippy Software, Inc.
2019-06-02 23:38:19 +00:00
Baptiste Daroussin 45a13fd899 Move back group, master.passwd and shells to etc directory
Use the .PATH mechanism instead so keep installing them from lib/libc/gen

While here revert 347961 and 347893 which are no longer needed

Discussed with:	manu
Tested by:	manu
ok manu@
2019-05-23 18:37:05 +00:00
Emmanuel Vadot d3bb120822 pkgbase: Really move login.access
Messed up with git->svn r348102
2019-05-22 07:41:58 +00:00
Emmanuel Vadot 43fb1e3e4b pkgbase: Really move termcap.small
Messed up with git->svn in r348101
2019-05-22 07:41:20 +00:00
Emmanuel Vadot 19dad0edbe pkgbase: Really move rc.sendmail
Messed up with git->svn in r348100
2019-05-22 07:40:39 +00:00
Emmanuel Vadot 410304e347 pkgbase: Really move rc.bsdextended
Messed up with git->svn in r348099
2019-05-22 07:39:59 +00:00
Emmanuel Vadot 5d8c2d4c4f pkgbase: Really move rc.firewall
Messed up with git->svn in r348098
2019-05-22 07:38:54 +00:00
Emmanuel Vadot a8b94f3d79 pkgbase: Move login.access to usb.bin/login
Also remove the etc-examples target as we don't have any files
to handle here.

Reviewed by:	bapt
2019-05-22 07:23:03 +00:00
Emmanuel Vadot 6a42f8ddf5 pkgbase: Move termcap.small to share/termcap
Reviewed by:	bapt
2019-05-22 07:22:34 +00:00
Emmanuel Vadot 424383210b pkgbase: Move rc.sendmail to libexec/rc
Reviewed by:	bapt
2019-05-22 07:22:08 +00:00
Emmanuel Vadot f4022639ae pkgbase: Move rc.bsdextended to libexec/rc
Reviewed by:	bapt
2019-05-22 07:21:39 +00:00
Emmanuel Vadot f0f0053abc pkgbase: Move rc.firewall to libexec/rc
Put it with all the other rc files

Reviewed by:	bapt
2019-05-22 07:21:05 +00:00
Mark Johnston f0e2814d34 Hook up the existing i386 DTrace tests to the build.
Now that it's relatively easy to do so, we might as well.

MFC after:	1 week
Event:		Waterloo Hackathon 2019
2019-05-22 03:42:03 +00:00
Brad Davis 871b6b10ce Move master.passwd and group to lib/libc/gen/
libc was picked as the destination location for these because of the syscalls
that use these files as the lowest level place they are referenced.

Approved by:	will (mentor), rgrimes, manu
Differential Revision:	https://reviews.freebsd.org/D16728
2019-05-16 01:09:13 +00:00
Alan Somers 7648bc9fee MFHead @347527
Sponsored by:	The FreeBSD Foundation
2019-05-13 18:25:55 +00:00
Emmanuel Vadot eb4c63f731 Revert r347356 and r347371
passwd related files need to be tagged as config file so pkg update
will attempt merging them when we install a new package.
We should use CONFS for that.
Revert for now until I come up with a better version of this patch as
it breaks pkgbase for users.
2019-05-13 12:38:33 +00:00
Emmanuel Vadot e599c3d449 etc/Makefile: Remove empty newline
This was commited accidently in r347356 and cause distribution with
NO_ROOT set to fail.

Reported by:	ci, kib
MFC after:	2 weeks
X-MFC-With:	r347356
2019-05-08 21:26:11 +00:00
Emmanuel Vadot 3d4dafef99 pkgbase: Deal with the last etc files
Add tags=package=runtime for password related files.
Add tags=package=sendmail for rc.sendmail
Add tags=package=ipfw for rc.firewall

Reviewed by:	bapt
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D20173
2019-05-08 17:46:59 +00:00
Emmanuel Vadot 12ef023dce mtree: Add more runtime package tag
When using pkgbase those empty directories aren't packaged otherwise.

Reviewed by:	bapt
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D20056
2019-04-25 16:45:24 +00:00
Kyle Evans cddbc3b408 libbe(3): Add a test for be creation
Submitted by:	Rob Fairbanks <rob.fx907 gmail com>
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D18564
2019-04-22 13:45:08 +00:00
Alan Somers 9821f1d323 fusefs: adapt the tests to the fuse => fusefs rename
Sponsored by:	The FreeBSD Foundation
2019-03-21 00:11:43 +00:00
Alan Somers 2aaf9152a8 MFHead@r345275 2019-03-18 19:21:53 +00:00
Enji Cooper 9bfc4020c4 Compile and install most of the googletest examples
sample9_unittest is not compiled/installed, because it intentionally fails
and would result in red test runs until broken to always pass.
2019-03-11 19:50:44 +00:00
Enji Cooper b18a4ccab9 MFhead@r344786 2019-03-05 01:00:38 +00:00
Dimitry Andric 844fc3e907 Merge ^/head r344549 through r344775. 2019-03-04 19:14:32 +00:00
Alan Somers 44154e682a Begin a fuse(4) test suite
It only tests the kernel portion of fuse, not the userspace portion (which
comes from sysutils/fusefs-libs).  The kernel-userspace interface is
de-facto standardized, and this test suite seeks to validate FreeBSD's
implementation.

It uses GoogleMock to substitute for a userspace daemon and validate the
kernel's behavior in response to filesystem access.  GoogleMock is
convenient because it can validate the order, number, and arguments of each
operation, and return canned responses.

But that also means that the test suite must use GoogleTest, since
GoogleMock is incompatible with atf-c++ and atf.test.mk does not allow C++
programs to use atf-c.

This commit adds the first 10 test cases out of an estimated 130 total.

PR:		235775, 235773
Sponsored by:	The FreeBSD Foundation
2019-03-01 23:53:05 +00:00
Simon J. Gerraty eb12b8ea5e Add verifying manifest loader for mac_veriexec
This tool will verify a signed manifest and load contents into
mac_veriexec for storage

Sponsored by:	Juniper Networks
Differential Revision:	D16575
2019-02-26 06:17:23 +00:00
Dimitry Andric a8fe8db49a Merge ^/head r344178 through r344512. 2019-02-25 11:59:29 +00:00
Enji Cooper 5d40b795d0 Fix the pathing for the header files
It needs to be prefixed under /usr/include/private; not /usr/include
2019-02-20 06:52:55 +00:00
Enji Cooper 1ed7b003f6 Add entries in BSD.tests.dist for the googletest test dirs 2019-02-20 05:56:07 +00:00
Enji Cooper 30e009fc3a MFhead@r344270 2019-02-19 03:46:32 +00:00
Justin Hibbits bc4d122db0 powerpc/boot: Move ubldr to /boot/uboot, and make this a separate filesystem
Summary:
Now that mpc85xx can boot via ubldr, move ubldr to a separate
filesystem, mounted on /boot/uboot, so that a fresh install can boot correctly.

Reviewed By: nwhitehorn
Differential Revision: https://reviews.freebsd.org/D18709
2019-02-18 01:57:47 +00:00
Enji Cooper f3c5273d31 Merge build glue for libraries and tests done on github
I need to doublecheck my work vs the port, but I believe that this covers the
initial integration of all upstream tests.

Ref: https://github.com/ngie-eign/freebsd/tree/googletest-integration
2019-02-13 04:58:15 +00:00
Dimitry Andric 9e43c218d5 Merge ^/head r343807 through r343955. 2019-02-10 12:49:34 +00:00
Emmanuel Vadot 057c416c9b mtree: Add dtb subdir to the mtree file
makefs will fails otherwise

Reported by:	emaste
MFC after:	1 week
2019-02-07 18:54:25 +00:00
Dimitry Andric 8e69ae1c97 Merge ^/head r343712 through r343806. 2019-02-05 19:50:46 +00:00
Gregory Neil Shapiro 56335f9994 Add support for the authinfo map
Submitted by:	keramida
2019-02-04 02:18:27 +00:00
Dimitry Andric 0bf31f1fdc Update version numbers, and regenerate config headers for llvm, clang,
lld and lldb.  Update ObsoleteFiles.inc and OptionalObsoleteFiles.inc.
2019-01-20 18:34:30 +00:00
Vincenzo Maffione 2a8682a815 netmap: add suite of unit tests
Import the unit tests from upstream (https://github.com/luigirizzo/netmap
ba02539859d46d33), and make them ready for use with Kyua.
There are currently 38 regression tests, which test the kernel control ABI
exposed by netmap to userspace applications:

  1: test for port info get
  2-5: tests for basic port registration
  6-9: tests for VALE
  10-11: tests for getting netmap allocator info
  12-15: tests for netmap pipes
  16: test on polling mode
  17-18: tests on options
  19-27: tests for sync-kloop subsystem
  28-39: tests for null ports
  31-38: tests for the legacy NIOCREGIF registers

Reviewed by:	ngie
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D18490
2018-12-31 11:17:58 +00:00
Mateusz Guzik 405c3050f1 Remove iBCS2, part1: userspace
iBCS2 was disconnected from the build in 2015 (see r291419)

bsdconfig parts submitted by dteske.

Reviewed by:	kib (previous version)
Sponsored by:	The FreeBSD Foundation
2018-12-19 21:56:54 +00:00
Dag-Erling Smørgrav 32ab5aa1fd Create /etc/authpf, used by authpf(8) and authpf-noip(8).
MFC after:	1 week
2018-12-13 12:58:42 +00:00
Dimitry Andric 67350cb56a Merge ^/head r340918 through r341763. 2018-12-09 11:39:45 +00:00
Ed Maste b9de82a654 BSD.debug.dist: add newly added nvmecontrol directory 2018-12-07 16:52:52 +00:00
Warner Losh 228c425533 Dynamically load .so modules to expand functionality
o Dynamically load all the .so files found in /libexec/nvmecontrol and
  /usr/local/libexec/nvmecontrol.
o Link nvmecontrol -rdynamic so that its symbols are visible to the
  libraries we load.
o Create concatinated linker sets that we dynamically expand.
o Add the linked-in top and logpage linker sets to the mirrors for them
  and add those sets to the mirrors when we load a new .so.
o Add some macros to help hide the names of the linker sets.
o Update the man page.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D18455

fold
2018-12-06 22:58:26 +00:00
Yuri Pankov ea22b5bd75 Add ga_IE.UTF-8 locale.
PR:		228587
Submitted by:	Micil <micheal.maclochlainn@oegaillimh.ie> (LC_TIME)
Reviewed by:	bapt
Approved by:	kib (mentor, implicit)
MFC after:	3 days
Differential revision:	https://reviews.freebsd.org/D17997
2018-11-26 19:39:49 +00:00
Dimitry Andric 3d5db45595 Merge ^/head r340427 through r340868. 2018-11-24 14:46:06 +00:00
Kyle Evans 9c1535e9ab bectl(8): Add some regression tests
These tests operate on a file-backed zpool that gets created in the kyua
temp dir. root and ZFS support are both required for these tests. Current
tests cover create, destroy, export/import, jail, list (kind of), mount,
rename, and jail.

List tests should later be extended to cover formatting and the different
list flags, but for now only covers basic "are create/destroy actually
reflected properly"

MFC after:	3 days
2018-11-19 02:30:12 +00:00
Dimitry Andric 2a22df74e9 Merge ^/head r339813 through r340125. 2018-11-04 15:49:06 +00:00
Dimitry Andric 689486003b Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_70 branch
r346007 (effectively 7.0.1 rc2), resolve conflicts, and bump version
numbers.

PR:		230240, 230355
2018-11-04 15:46:30 +00:00
Baptiste Daroussin 874e7db1f7 Simplify NLS alias handling by using native make(1) multi variable for loops 2018-11-04 10:14:08 +00:00
Baptiste Daroussin 4dd729a55b Fix bad copy/paste 2018-11-04 06:59:13 +00:00
Baptiste Daroussin 97dc79f29a Simplify a bit distrib-dirs target
Reviewed by:	bdrewery
Differential Revision:	https://reviews.freebsd.org/D3915
2018-11-04 06:47:21 +00:00
Andrew Turner 6ec0ee844c Run the csu tests on a DSO. This builds the tests into a shared library,
then runs these from the base test programs. With this we can check
crtbeginS.o and crtendS.o are working as expected.

MFC with:	r339738
Sponsored by:	DARPA, AFRL
2018-10-30 09:43:26 +00:00
Andrew Turner 5f2c388230 Include the csu test directories in BSD.tests.dist
MFC with:	r339738
Sponsored by:	DARPA, AFRL
2018-10-29 17:13:12 +00:00
Dimitry Andric ce44d80853 Merge ^/head r338731 through r338987. 2018-09-27 20:00:07 +00:00
Brad Davis b8fdf58807 Move hosts.allow to lib/libwrap/
This leverages CONFS to handle the install.

Approved by:	re (blanket, pkgbase), bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D17240
2018-09-22 13:17:30 +00:00
Brad Davis d465a4b0b3 Move the openssl.cnf install to secure/usr.bin/openssl/
This leverages CONFS to do the install

Approved by:	re (pkgbase, blanket), bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D17245
2018-09-20 09:34:55 +00:00
Brad Davis 27e35a09ef Move nsmb.conf to lib/libsmb/
This leverages CONFS to do the install

Approved by:	re (pkgbase, blanket), bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D17243
2018-09-20 09:31:27 +00:00
Brad Davis 6999b78550 Move opieaccess to lib/libopie/
This leverages CONFS to do the install

Approved by:	re (blanket, pkgbase), bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D17241
2018-09-20 09:26:10 +00:00
Brad Davis 80994f8119 Move hosts.lpd and printcap to usr.sbin/lpr/lpd/
This leverages CONFS to handle the install

Approved by:	re (blanket, pkgbase), bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D17238
2018-09-20 09:21:05 +00:00
Brad Davis bca3325319 Move remote & phones to usr.bin/tip/tip/
Approved by:	re (blanket, pkgbase), will (mentor)
Differential Revision:	https://reviews.freebsd.org/D17219
2018-09-19 14:56:53 +00:00
Brad Davis f803ec1ef5 Move regdomain.xml to lib/lib80211/
This leverages CONFS to handle the install.  lib80211 was picked because it is
where this file is actually used from.

Approved by:	re (blanket, pkgbase), will (mentor)
Differential Revision:	https://reviews.freebsd.org/D17229
2018-09-19 09:29:06 +00:00
Brad Davis 02b69379ea Move libalias.conf to lib/libalias/libalias/
This leveages CONFS to handle the install.

Approved by:	re (blanket, pkgbase), bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D17218
2018-09-18 20:54:37 +00:00
Brad Davis a0bc3b5965 Move disktab to sbin/bsdlabel/
This leverages CONFS to handle the install.

Approved by:	re (blanket, pkgbase), will (mentor)
Differential Revision:	https://reviews.freebsd.org/D17217
2018-09-18 20:52:24 +00:00
Brad Davis 1b491096a4 Move install of locate.rc to usr.bin/locate/locate/
This leverages CONFS to handle the install and purges an old comment.

Approved by:	re (blanket, pkgbase), bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D17215
2018-09-18 20:50:07 +00:00
Brad Davis 22917b7e0e Move mail.rc install to usr.bin/mail.
This leverages CONFS to do the install

Approved by:	re (blanket, pkgbase), bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D17216
2018-09-18 20:47:06 +00:00
Brad Davis b6af74d289 Move mac.conf to lib/libc/posix1e/
This leverages CONFS to handle the install of the config file.

Approved by:	re (blanket, pkgbase), will (mentor)
Differential Revision:	https://reviews.freebsd.org/D17162
2018-09-18 01:40:37 +00:00
Brad Davis af734c7746 Move amd.map to usr.sbin/amd/amd/
This leverages CONFS to handle the install of the config file.

Approved by:	re (gjb), will (mentor)
Differential Revision:	https://reviews.freebsd.org/D17159
2018-09-18 00:32:10 +00:00
Brad Davis 9a537769d6 Move libmap.conf to libexec/rtld-elf/
This leverages CONFS to handle the config file install.

Approved by:	re (gjb), will (mentor)
Differential Revision:	https://reviews.freebsd.org/D17161
2018-09-18 00:25:00 +00:00
Brad Davis 62e23a4781 Move dhclient.conf to sbin/dhclient/.
This also leverages CONFS for handling config files.

Approved by:	re (gjb), will (mentor)
Differential Revision:	https://reviews.freebsd.org/D17160
2018-09-18 00:11:45 +00:00
Brad Davis 77e4a39103 Move rpc and netconfig to lib/libc/rpc/
This uses relative paths to make it more specific to avoid any potential
future problems with .PATH and leverages CONFS.

libc was picked as the destination location for these because of the syscalls
that use these files as the lowest level place they are referenced.

Approved by:	re (gjb), will (mentor)
Differential Revision:	https://reviews.freebsd.org/D17163
2018-09-17 19:20:50 +00:00
Dimitry Andric 0a13c83028 Merge ^/head r338690 through r338730. 2018-09-17 19:05:32 +00:00
Brad Davis 03452a498c Move hosts, hosts.equiv, networks, nsswitch.conf, protocols to lib/libc/net/
This uses relative paths to make it more specific to avoid any potential
future problems with .PATH and leverages CONFS.

libc was picked as the destination location for these because of the syscalls
that use these files as the lowest level place they are referenced.

Approved by:	re (gjb), will (mentor)
Differential Revision:	https://reviews.freebsd.org/D17164
2018-09-17 18:56:47 +00:00
Dimitry Andric c0b5e99154 Merge ^/head r338595 through r338689, and resolve conflicts. 2018-09-14 19:50:36 +00:00
Brad Davis 219cf81b4d Move all pam related config to lib/libpam/
Approved by:	re (rgrimes), will (mentor), des
Differential Revision:	https://reviews.freebsd.org/D17122
2018-09-13 04:08:48 +00:00
Ed Maste 19b4f0dca0 Fix unlink(1) for files starting with -
Restore the original behavior of unlink(1), passing the provided filename
directly to unlink(2), handling the first argument being "--" correctly.

This fixes "unlink -foo", broken in r97533.

PR:		228448
Submitted by:	Brennan Vincent <brennan@umanwizard.com> (original version)
Submitted by:	Yuri Pankov
Reported by:	Brennan Vincent <brennan@umanwizard.com>
Reviewed by:	emaste, kevans, vangyzen, 0mp
Approved by:	re (delphij)
Differential Revision: https://reviews.freebsd.org/D17132
2018-09-12 19:41:16 +00:00
Dimitry Andric 3af64f0311 Merge ^/head r338392 through r338594. 2018-09-11 18:41:00 +00:00
Brad Davis 2d7bc6b39b Move etc/crontab to usr.sbin/cron/cron/
Approved by:	re (gjb), will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16786
2018-09-06 14:55:54 +00:00
Brad Davis ce9e223ebd Move gettytab to libexec/getty/
Approved by:	re (gjb), will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16953
2018-09-05 15:25:23 +00:00
Brad Davis 966f2a6f27 Move etc/ttys to sbin/init/.
And simplify this a little by flattening the directory structure.

Approved by:	re (gjb), will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16955
2018-09-04 15:48:13 +00:00
Brad Davis d3b764acc6 Move fbtab, login.conf, and motd to usr.bin/login/
Approved by:	Approved by: re (gjb), bapt (mentor), will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16947
2018-08-30 15:52:03 +00:00
Dimitry Andric da2d1e9d25 Merge ^/head r338298 through r338391. 2018-08-29 20:54:56 +00:00
Brad Davis 94ec7ec758 Finish moving dot.cshrc and dot.profile to bin/csh/ and bin/sh/.
Approved by:	re (gjb), will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16770
2018-08-29 16:59:19 +00:00
Dimitry Andric 7847e04111 Merge ^/head r338026 through r338297, and resolve conflicts. 2018-08-24 18:09:23 +00:00
Brad Davis 376a4e3255 Move services to usr.sbin/services_mkdb/
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
2018-08-22 21:22:40 +00:00
Brad Davis 39cec25ba7 Move all devfs related files to sbin/devfs/
This is related to pkgbase as it uses CONFS to properly tag these as config
files.

Approved by:	will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16785
2018-08-22 15:55:23 +00:00
Brad Davis c8e7055577 Move all bluetooth related config files out of etc
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
2018-08-21 19:28:53 +00:00
Brad Davis 541075a618 Move ftpusers to libexec/ftpd/
Thsi helps with pkgbase by switching to CONFS so that ftpusers will be
properly tagged as a config file.

Approved by:	will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16787
2018-08-21 17:07:52 +00:00
Brad Davis 64be79ef76 Move all syslogd related configs to usr.sbin/syslogd/
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
2018-08-21 17:01:47 +00:00
Brad Davis 44e1285c7b Move all devd related configs to sbin/devd/
This helps with pkgbase as it switches these to using CONFS so they are
properly tagged as config files.

Approved by:	will (mentor), imp
Differential Revision:	https://reviews.freebsd.org/D16781
2018-08-21 16:51:45 +00:00
Dimitry Andric 3611ec6048 Merge ^/head r337646 through r338014. 2018-08-18 12:15:54 +00:00
Alan Somers c85b199444 Add Modbus Application Protocol to /etc/services
IANA reassigned ports 502 and 802 on 2014-06-10

PR:		213276
Submitted by:	Mark.Martinec@ijs.si
MFC after:	2 weeks
2018-08-17 15:18:57 +00:00
Brad Davis 3349f8bb8f Revert parts of r337849 and r337857
This fixes the build and I will redo these changes as part of a future review
that organizes them differently.  The way I tried to do it here could be done
better.  Sorry for the noise.

Approved by:	will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16737
2018-08-15 23:18:34 +00:00
Brad Davis 1da0bddb6d Fix build after r337849
This moves the symlink creation to after where the files are installed.

This also inverts the shell change so that it only happens if MK_TCSH is on.

Approved by:	will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16725
2018-08-15 16:22:12 +00:00
Brad Davis f0a51d9df4 Move ssh config file handling into the ssh Makefiles.
This helps with pkgbase by using CONFS and tagging these as config files.

Approved by:	allanjude (mentor), des
Differential Revision:	https://reviews.freebsd.org/D16678
2018-08-15 14:53:42 +00:00
Brad Davis b26c7f7fee Move all sh and csh files into bin/sh/ or bin/csh/
This simplifies pkgbase by migrating these to CONFS so they are properly
tagged as config files.

Approved by:	will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16708
2018-08-15 14:41:24 +00:00
Will Andrews 450e5a4378 zfs: add ztest to the kyua test suite.
This program is currently failing, and has been for >6 months on HEAD.
Ideally, this should be run 24x7 in CI, to discover hard-to-find bugs that
only manifest with concurrent i/o.

Requested by:	lwhsu, mmacy
2018-08-15 13:05:04 +00:00
Brad Davis eecd09850d Move inetd.conf to usr.sbin/inetd/
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
2018-08-12 13:29:40 +00:00
Brad Davis 31ef5c6891 Move all the newsyslog related configs to usr.sbin/newsyslog/
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
2018-08-12 13:24:53 +00:00
Brad Davis 9488993b1d Move all NTP related files to usr.sbin/ntp/ntpd.
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
2018-08-11 17:42:42 +00:00
Brad Davis 81ea85a884 Move all periodic related config and scripts to usr.sbin/periodic/
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
2018-08-11 17:11:08 +00:00
Dimitry Andric e35e6a3d71 Merge ^/head r337619 through r337645. 2018-08-11 16:41:08 +00:00
Brad Davis 6d76ed56a0 Move pf.os to sbin/pfctl/
Approved by:	will (mentor)
Glanced at by:	kp
Sponsored by:	Essen Hackathon
Differential Revision:	https://reviews.freebsd.org/D16557
2018-08-11 13:58:26 +00:00
Brad Davis bf8a86cd14 Move cron.d/at to usr.bin/at/
This helps with pkgbase as it tags this as a config file so it is handled as
such

Approved by:	allanjude (mentor)
Sponsored by:	Essen Hackathon
Differential Revision:	https://reviews.freebsd.org/D16673
2018-08-11 13:52:23 +00:00
Brad Davis c2d948fa77 Move snmpd.config to usr.sbin/bsnmpd/bsnmpd/
This helps with pkgbase as this config file will now be tagged as a config
file

Approved by:	allanjude (mentor)
Sponsored by:	Essen Hackathon
Differential Revision:	https://reviews.freebsd.org/D16674
2018-08-11 13:47:28 +00:00
Brad Davis 40557b99f5 Move sysctl.conf to sbin/sysctl/ and switch to CONFS.
This helps with pkgbase to tag this config file as a config file.

Approved by:	allanjude (mentor), will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16559
2018-08-11 13:28:03 +00:00
Brad Davis cea9c033f2 Move ddb.conf to sbin/ddb/ and switch to CONFS.
This helps pkgbase as this config file will now be tagged as a config file.

Approved by:	allanjude (mentor)
Differential Revision:	https://reviews.freebsd.org/D16675
2018-08-11 13:25:39 +00:00
Brad Davis 9584f61992 Move OpenBSM to CONFS
This helps with pkgbase as these config files will be properly tagged as
config files.

Approved by:	allanjude (mentor), oshogbo
Differential Revision:	https://reviews.freebsd.org/D16679
2018-08-11 13:23:09 +00:00
Dimitry Andric f9c0a51283 Merge ^/head r337286 through r337585. 2018-08-10 21:02:28 +00:00
Alan Somers 47cc9ee1b1 Switch the default pager for most commands to less
Finally, a pager for the nineties.

MFC after:	Never
Relnotes:	Yes
Differential Revision:	https://reviews.freebsd.org/D13465
Poll:		https://reviews.freebsd.org/V7
2018-08-08 19:24:20 +00:00
Mark Johnston 976e100378 dhclient: Don't chroot if we are in capability mode.
The main dhclient process is Capsicumized but also chroots to
restrict filesystem access.  With r322369, pidfile(3) maintains a
directory descriptor for the pidfile, which can cause the chroot
to fail in certain cases.  To minimize the problem, only chroot
if we fail to enter capability mode, and store dhclient pidfiles
in a subdirectory of /var/run, thus restricting access via
pidfile(3)'s directory descriptor.

PR:		223327
Reviewed by:	cem, oshogbo
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D16584
2018-08-06 16:22:01 +00:00
Brad Davis 624a22b84e Fix build after r337340.
Approved by:	will (mentor)
2018-08-05 04:20:52 +00:00
Brad Davis 0ab0a723ed Move autofs related configs to usr.sbin/autofs/
This is prep for pkgbase to have config files tagged as such.

Approved by:	will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16492
2018-08-04 22:41:17 +00:00
Brad Davis 99a84b826f Move portsnap.conf to head/usr.sbin/portsnap/portsnap/
This is prep for pkgbase to have config files tagged as such.

Approved by:	will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16554
2018-08-04 22:31:29 +00:00
Brad Davis 6e6d254d7c Move freebsd-update.conf to usr.sbin/freebsd-update.
This is prep for pkgbase so that config files are tagged as such.

Approved by:	will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16556
2018-08-04 22:25:41 +00:00
Brad Davis 4d2cf170d3 Move etc/minfree to sbin/savecore/.
This is prep for pkgbase to have config files tagged as such.

Approved by:	will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16558
2018-08-04 22:15:59 +00:00
Dimitry Andric bbd7a9298f Merge ^/head r336870 through r337285, and resolve conflicts. 2018-08-04 11:53:41 +00:00
Dimitry Andric 6dfa117f67 Update llvm/clang version numbers in various files. 2018-07-31 18:13:44 +00:00
Brad Davis 5836319ae6 Move pkg/FreeBSD.conf to usr.sbin/pkg/
Approved by:	bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D16491
2018-07-31 16:42:03 +00:00
Brad Davis 6d88443da1 Move blacklistd.conf to usr.sbin/blacklistd/
This is prep for pkging base and helps tag and install config files with the
correct packages.

Approved by:	bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D16493
2018-07-31 16:39:38 +00:00
Brad Davis 4f1521406b Move nscd.conf from etc/ to usr.sbin/nscd/
Approved by:	will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16490
2018-07-28 23:29:36 +00:00
Brad Davis df89e31712 Opps, I missed moving a couple of files in r336845.
Approved by:	will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16466
2018-07-28 20:41:33 +00:00
Brad Davis 1135e97b7c Move rc startup scripts from etc/ to sbin/init/
This keeps most startup scripts as CONFS per discussion on src-committers from
back during BSDCan.

Approved by:	will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16466
2018-07-28 20:36:23 +00:00
Brad Davis a0a1ffcb16 Move etc/shells to lib/libc/gen with getusershell(3).
Approved by:	will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16467
2018-07-28 20:21:23 +00:00
Brad Davis 74c3bf4ac0 Move apmd.conf to CONFS in usr.sbin/apmd which simplifies this nicely.
Approved by:	bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D16431
2018-07-26 16:51:23 +00:00
Brad Davis 5166d20d98 Move dumpdates creation to CONFS=
Approved by:	bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D16435
2018-07-26 16:45:25 +00:00
Alan Somers 3468bf40ce Introduce test program for auditpipe(4)
Submitted by:	aniketp
MFC after:	2 weeks
Sponsored by:	Google, Inc. (GSoC 2018)
Differential Revision:	https://reviews.freebsd.org/D16395
2018-07-26 00:16:41 +00:00
Ian Lepore 9a23cbc4d4 Add ntpd to the list of users not allowed to log into ftp. 2018-07-22 16:17:45 +00:00
Brad Davis 31ad99a4af Revert r336572 and wrap them in machine checks so they are only installed on
i386.

Approved by:	allanjude (mentor), imp
Differential Revision:	https://reviews.freebsd.org/D16380
2018-07-21 17:13:39 +00:00
Brad Davis a3b6b79f57 Purge some old apmd files
Approved by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D16373
2018-07-21 00:12:41 +00:00
Alan Somers 5717aa2d2a Allow mounting FUSE filesystems in jails
Reviewed by:	jamie
MFC after:	2 weeks
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D16371
2018-07-20 21:35:31 +00:00
Ian Lepore d11f4dfd21 Automatically run ntpd as non-root when possible.
Ntpd needs only a subset of full root privileges to do its job. Specifically
it needs the ability to manipulate system time, and to re-bind to a
privileged UDP port after interface changes. The mac_ntpd(4) policy module
(see r336525) can grant these privs.

These changes detect the availability of mac_ntpd(4). If enabled, and if the
ntpd configuration is fairly vanilla, it automatically runs ntpd as the
non-root user 'ntpd' (uid 123). "Vanilla" means the config doesn't include
command line or ntp.conf options changing the location of files or using any
files/dirs likely to be inaccessible to user ntpd.  Ntpd can still run as
non-root when using such options, but the admin must ensure all required
files and dirs are accessible, and then set ntpd_user=ntpd in rc.conf.

Note that these changes also address PR 199127 by using the command_args
technique suggested in the patch. They also tangentially address PR 113552,
which is primarily about inconsistent filenames in documentation, but some
of the inconsistancy was caused by old code in rc.d/ntpd which is leftover
from the intial import from netbsd. There was code to do chroot setup which
required the use of the netbsd clockctl(4) device; that code never had any
effect on freebsd, because we lack that device and don't build ntpd with the
options that would allow using it.

PR:		113552 199127
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D16050
2018-07-20 13:59:29 +00:00
Ian Lepore 3496c981ac Make it possible to run ntpd as a non-root user, add ntpd uid and gid.
Code analysis and runtime analysis using truss(8) indicate that the only
privileged operations performed by ntpd are adjusting system time, and
(re-)binding to privileged UDP port 123. These changes add a new mac(4)
policy module, mac_ntpd(4), which grants just those privileges to any
process running with uid 123.

This also adds a new user and group, ntpd:ntpd, (uid:gid 123:123), and makes
them the owner of the /var/db/ntp directory, so that it can be used as a
location where the non-privileged daemon can write files such as the
driftfile, and any optional logfile or stats files.

Because there are so many ways to configure ntpd, the question of how to
configure it to run without root privs can be a bit complex, so that will be
addressed in a separate commit. These changes are just what's required to
grant the limited subset of privs to ntpd, and the small change to ntpd to
prevent it from exiting with an error if running as non-root.

Differential Revision:	https://reviews.freebsd.org/D16281
2018-07-19 23:55:29 +00:00
Ian Lepore 9d6c74a0d9 Create an aarch64 subdir under man4, now that we have aarch64 manpages.
Reported by:	Mark Millard
2018-07-08 01:29:48 +00:00
Sean Bruno 6f077571b9 WITHOUT_SERVICESDB:
Add src.conf knob to disable the installation of /var/db/services.db

Default to leaving services.db in place, but allow the removal of the
file and its creation with a src.conf knob.

This file ends up being 2MB in size.  For small systems this is a waste
of space but its a tradeoff.

Reviewed by:	bdrewery
Differential Revision:	https://reviews.freebsd.org/D9655
2018-07-04 17:18:35 +00:00
Dimitry Andric 55458465af More follow-up to r335799 (llvm/clang 6.0.1 update), where I forgot to
update mtree files, ObsoleteFiles and a number of other paths.  Sorry
about all the breakage.

Pointy hat to:	me
MFC after:	2 weeks
X-MFC-With:	r335799
2018-06-30 15:03:22 +00:00
Alex Richardson 53ed3b32ae Fix missing files in METALOG with -DNO_ROOT
By using INSTALL_LINK instead of calling ln during install the files
end up in the METALOG file as well if we use -DNO_ROOT and will be
included in a disk image when using makefs with METALOG as the input.
The other file that was not included in METALOG was /var/db/services.db
which is now also included for -DNO_ROOT.

Approved By:	brooks (mentor)
Differential Revision: https://reviews.freebsd.org/D15665
2018-06-29 21:15:17 +00:00
Ian Lepore 795c4eaa37 When being verbose about various leapfile versions, also mention expiration.
The expiration date is actually more of a version number than the version
date, because expiration changes twice a year, whereas the version only
changes when actual leap second events occur (except in USNO leapfiles,
which inappropriately bump the version with every expiration date change).
2018-06-28 22:13:32 +00:00
Ian Lepore b5a278bcf4 Rename variable ntp_tmp_leapfile to have a leading underbar, to distinguish
it from variables with similar names which are set in rc.conf.  This will
make more sense as the script grows more similar-name local variables in
some upcoming changes.
2018-06-28 22:05:29 +00:00
Warner Losh 0a463958e7 Fix quoting in sending the NOMATCH event to devmatch
The NOMATCH event was previously quoted to protect it from shell
expansion. However, that quoting now interferes with the quoting devd
is doing. Quote to protect just the ?.
2018-06-28 15:00:18 +00:00
Brad Davis f59e535254 Simplify using bsd.endian.mk and have it provide CAP_MKDB_ENDIAN, since it is
the most common usage.

Approved by:	bapt (mentor)
2018-06-28 13:48:59 +00:00
Ben Woods 217df2da08 geli attach multiple providers
Allow attaching of multiple geli providers at once if they use same
passphrase and keyfiles.

This is helpful when the providers being attached are not used for boot,
and therefore the existing code to first try the cached password when
tasting the providers during boot does not apply.

Multiple providers with the same passphrase and keyfiles can be attached
at the same time during system start-up by adding the following to
rc.conf:
  geli_groups="storage backup"
  geli_storage_flags="-k /etc/geli/storage.keys"
  geli_storage_devices="ada0 ada1"
  geli_backup_flags="-j /etc/geli/backup.passfile -k /etc/geli/backup.keys"
  geli_backup_devices="ada2 ada3"

Reviewed by:	wblock, delphij, jilles
Approved by:	sobomax (src), bcr (doc)
Differential Revision:	https://reviews.freebsd.org/D12644
2018-06-26 18:07:16 +00:00
Brooks Davis e4b0a90e77 Normalize the g(eom,cache,part,...) build.
Rather then combining hardlink creation for the geom(8) binary with
shared library build, move libraries to src/lib/geom so they are
built and installed normally.  Create a common Makefile.classes
which is included by both lib/geom/Makefile and sbin/geom/Makefile
so the symlink and libraries stay in sync.

The relocation of libraries allows libraries to be build for 32-bit
compat.  This also reduces the number of non-standard builds in
the system.

This commit is not sufficent to run a 32-bit /sbin/geom on a 64-bit
system out of the box as it will look in the wrong place for libraries
unless GEOM_LIBRARY_PATH is set appropriatly in the environment.

Reviewed by:	bdrewery
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D15360
2018-06-25 19:55:15 +00:00
Ian Lepore 0d88e3b240 Fix a comment; the ntp leaplist file is updated periodically, but not weekly
(it's only updated when a check shows it's within 30 days of expiring).

PR:		207138
2018-06-24 03:31:23 +00:00
Ian Lepore 4b4a865284 Modernize usage of "restrict" keyword in ntp.conf
It is no longer necessary to specify a -4/-6 flag on any ntp.conf
keyword.  The address type is inferred from the address itself as
necessary.  "restrict default" statements always apply to both address
families regardless of any -4/-6 flag that may be present.

So this change just tidies up our default config by removing the redundant
restrict -6 statement and comment, and by removing the -6 flag from the
restrict keyword that allows access from localhost.

This change was inspired by the patches provided in PRs 201803 and 210245,
and included some contrib/ntp code inspection to verify that the -4/-6
keywords are basically no-ops in all contexts now.

PR:		201803 210245
Differential Revision:	https://reviews.freebsd.org/D15974
2018-06-24 03:29:00 +00:00
Ian Lepore 6014f3c446 Use 'mv -f' in rc.d/ntpd to avoid spuriously halting the boot.
The final 'mv' to install a fetched leap-list file can fail (due to a
readonly fs, or schg flags, for example), and that leads to mv(1)
prompting the user, stopping the boot process.  Instead, use mv -f
to supress the prompting, and if verbose mode is on, emit a warning
that the existing file cannot be replaced.

PR:		219255
2018-06-23 02:42:08 +00:00
Rick Macklem 9d48901e34 Add "mountcritremote" to the REQUIRE line for nfsd.
For a pNFS MDS server, there must be mounts done to the DSs before the
nfsd is started. Adding the REQUIRE line makes sure these are done.
If there are NFS mounts in /etc/fstab that cannot be completed before
the nfsd starts, the "bg" mount option can still be used to handle that.
I do not believe this should cause problems for non-pNFS NFS servers.
(I have requested a review by rc@, but it is still pending.)
2018-06-22 20:58:51 +00:00
Alan Somers f1ed5c000c praudit(1): add tests
Submitted by:	aniketp
MFC after:	2 weeks
X-MFC-With:	335287
Sponsored by:	Google, Inc. (GSoC 2018)
Differential Revision:	https://reviews.freebsd.org/D15751
2018-06-17 17:31:16 +00:00
Kyle Evans 9d3730e514 devmatch: Address some rc nits
- devmatch_enable in rc.conf(5) was not gating the start of devmatch

- Use quietstart in devd/devmatch to suppress dozens of 'Cannot start'
  messages and other spurious messages from rc.subr(8) that aren't
  necessarily helpful.

Discussed with:	imp
2018-06-14 16:09:29 +00:00
Warner Losh b5e2ff92e5 User service foo rather than /etc/rc.d/foo.
devd predates service in the system. Modernize usage to use service to
start/stop things in reaction to events rather than calling the rc
file directly.

This was pointed out in my talk at BSDcan as well as indirectly
referrred to as a barrier to entry for OpenRC in that working group.
2018-06-11 22:48:34 +00:00
Warner Losh 1e9d36676f Set the $PATH in /etc/crontab like it is set by the cron(8)
daemon, for consistency.

Submitted by: Ben RUBSON
Pull Request: https://github.com/freebsd/freebsd/pull/155
2018-06-10 02:13:30 +00:00
Kristof Provost af9f0aa430 ipfw: fix status if ipfw.ko is not loaded
If the ipfw module is not loaded the net.inet.ip.fw.enable OID does not exist,
which leads the script to report errors and incorrectly report that ipfw is
enabled.
2018-06-07 13:16:53 +00:00
Kristof Provost 42faa80be3 ipfw: fix whitespace
No functional changes.
2018-06-07 13:14:09 +00:00
Kristof Provost fa1d4439f9 pf: Return non-zero from 'status' if pf is not enabled
In the pf rc.d script the output of `/etc/rc.d/pf status` or `/etc/rc.d/pf
onestatus` always provided an exit status of zero. This made it fiddly to
programmatically determine if pf was running or not.

Return a non-zero status if the pf module is not loaded, extend pfctl to have
an option to return an error status if pf is not enabled.

PR:		228632
Submitted by:	James Park-Watt <jimmypw AT gmail.com>
MFC after:	1 week
2018-06-06 19:36:37 +00:00
Brad Davis 64fe1b5e1d Only create /var/log/sendmail.st if start sendmail.
For those of us that never use or start sendmail, it is unneeded.

Approved by:	bapt (mentor)
2018-06-06 01:51:05 +00:00
Brad Davis 8dc84f09e0 Move /sys symlink creating out of etc/Makefile.
This is prep for etc/Makefile going away.

Approved by:	bapt (mentor)
2018-06-04 15:17:24 +00:00
Alan Somers f7f4e0f7a8 Add initial set of tests for audit(4)
This change includes the framework for testing the auditability of various
syscalls, and includes changes for the first 12.  The tests will start
auditd(8) if needed, though they'll be much faster if it's already running.
The syscalls tested in this commit include mkdir(2), mkdirat(2), mknod(2),
mknodat(2), mkfifo(2), mkfifoat(2), link(2), linkat(2), symlink(2),
symlinkat(2), rename(2), and renameat(2).

Submitted by:	aniketp
MFC after:	2 weeks
Sponsored by:	Google, Inc (GSoC 2018)
Differential Revision:	https://reviews.freebsd.org/D15286
2018-05-29 23:08:33 +00:00
Niclas Zeising 539e1e58af Complete removal of lmc(4)
The lmc(4) driver was removed in r333144 and relevant files added to
ObsoleteFiles.inc, however, include/sys/dev/lmc was not removed from mtree
and is recreated on every install.  Remove it from mtree.

Reviewed by:	imp, emaste
Approved by:	emaste
Differential Revision:	https://reviews.freebsd.org/D15590
2018-05-28 17:08:37 +00:00
Edward Tomasz Napierala a5efdbd0c9 Make the cfumass rc script support USB template 10.
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2018-05-27 10:48:21 +00:00
Edward Tomasz Napierala a4ccdf9091 Revert r333493, which was a temporary fix for 11.2-RELEASE, and instead
switch the default kldxref_enable to YES.

The reason is that it's required for every image that's being cross-built,
as kldxref(8) cannot handle files for non-native architectures.  For the
one that is not - amd64 - having it on by default doesn't change anything;
the script is noop if the linker.hints already exists.

MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-05-26 11:13:17 +00:00
Mark Felder 75a315f6d2 rc.subr: Support loading environmental variables from a file
The current support for setting environment via foo_env="" in rc.conf is
not scalable and does not handle envs with spaces in the value. It seems
a common pattern for some newer software is to skip configuration files
altogether and rely on the env. This is well supported in systemd unit
files and may be the inspiration for this trend.

MFH:		1 week
Differential Revision:	https://reviews.freebsd.org/D14453
2018-05-25 19:36:26 +00:00
Emmanuel Vadot 729ba386f0 devd: Always install devmatch.conf
It allows devd to run devmatch to find the correct driver based on pnp info.

No Objection from:    imp
2018-05-21 21:44:47 +00:00
Edward Tomasz Napierala 57b1f8183c Set label when setting up USB LUNs, it looks nicer this way.
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2018-05-16 20:44:08 +00:00
Edward Tomasz Napierala 463b6ed54f Change the cfumass rc script to stop pretending the USB LUN is a virtual
CD; for some reason OSX can't deal with it.

MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2018-05-16 20:39:15 +00:00
Dag-Erling Smørgrav b70d78d6e8 Rename all Unbound binaries and man pages from unbound* to local-unbound*.
PR:		222902
2018-05-12 17:10:36 +00:00
Dag-Erling Smørgrav 9d0ade3630 Remove the ability to generate long since useless SSH1 RSA keys. 2018-05-12 08:23:17 +00:00
Edward Tomasz Napierala 2b55bea538 Make /etc/rc.d/kldxref not print anything for directories that don't
contain any kernel modules.  This makes the common case completely silent,
as it should be.

Reviewed by:	imp@
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D14694
2018-05-11 14:43:21 +00:00
Xin LI b6f7731dba Remove "All rights reserved" from my files.
See r333391 for the rationale.

MFC after:	1 week
2018-05-10 06:41:08 +00:00
Warner Losh e310437971 For video consoles, only launch a getty if the device exists.
Differential Revision: https://reviews.freebsd.org/D15169
2018-05-09 20:49:00 +00:00
Mark Johnston e505460228 Import the netdump client code.
This is a component of a system which lets the kernel dump core to
a remote host after a panic, rather than to a local storage device.
The server component is available in the ports tree. netdump is
particularly useful on diskless systems.

The netdump(4) man page contains some details describing the protocol.
Support for configuring netdump will be added to dumpon(8) in a future
commit. To use netdump, the kernel must have been compiled with the
NETDUMP option.

The initial revision of netdump was written by Darrell Anderson and
was integrated into Sandvine's OS, from which this version was derived.

Reviewed by:	bdrewery, cem (earlier versions), julian, sbruno
MFC after:	1 month
X-MFC note:	use a spare field in struct ifnet
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D15253
2018-05-06 00:38:29 +00:00
Eitan Adler 0722b4b00e [etc] Update newsyslog.conf default comment
Remove line about allowed flags. It was missing 'pRTY' and is duplicative
of the man page. It didn't describe the flags in any detail to help
remind users of how to configure newsylog.
2018-05-03 00:57:19 +00:00
Warner Losh e4eef18848 Use M. Warner Losh everywhere on my copyrights.
Remove 'All Rights Reserved' where I can.
2018-05-01 16:29:22 +00:00
Vladimir Kondratyev 44af5666d9 bthidd(8): Add evdev protocol support for bluetooth keyboards and mouses
User-visible changes:

"-u" is added to to list of command line options supported by bthidd.
Use it to enable evdev support. uinput and evdev modules should be
kld-loaded or compiled into the kernel in that case.

bthidd_evdev_support rc.conf variable is added to control enabling of
evdev support in bthidd startup script. Possible values are: "YES", "NO",
"AUTO"(default). Setting bthidd_evdev_support to "AUTO" inserts "-u" option
if kernel is compiled with EVDEV_SUPPORT option enabled.

Support for consumer HID usage page keyboard events is implemented. Most of
them are available only through evdev protocol.

kern.evdev.rcpt_mask sysctl is checked, so "sysctl kern.evdev.rcpt_mask=12"
should be executed if EVDEV_SUPPORT is compiled into kernel.

It is recommended to regenerate bthidd.conf entries with bthidcontrol(8)
"Query" command to set user-friendly names of bluetooth devices.

Reviewed by:	emax, gonzo, wblock (docs), bcr (docs, early version)
Differential Revision:	https://reviews.freebsd.org/D13456
2018-04-30 12:16:54 +00:00
Edward Tomasz Napierala e73154c1d7 Add cfumass rc script, to create a LUN for cfumass(4).
MFC after:	2 weeks
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D14844
2018-04-21 14:56:41 +00:00
Kyle Evans addc1b6ce4 Fix ddb rc script
r288291 added a call to limits(1), which isn't available before partitions
are mounted. This broke the ddb rc script, which does not provide its own
start_cmd.

Alleviate the situation here by providing a start_cmd. We still have other
problems with diskless setups that need to be considered, but this is a
start.

PR:		206291
Submitted by:	cy
Discussed with:	rgrimes
MFC after:	3 days
2018-04-19 15:02:53 +00:00
John Baldwin 8ce99bb405 Properly do a deep copy of the ioctls capability array for fget_cap().
fget_cap() tries to do a cheaper snapshot of a file descriptor without
holding the file descriptor lock.  This snapshot does not do a deep
copy of the ioctls capability array, but instead uses a different
return value to inform the caller to retry the copy with the lock
held.  However, filecaps_copy() was returning 1 to indicate that a
retry was required, and fget_cap() was checking for 0 (actually
'!filecaps_copy()').  As a result, fget_cap() did not do a deep copy
of the ioctls array and just reused the original pointer.  This cause
multiple file descriptor entries to think they owned the same pointer
and eventually resulted in duplicate frees.

The only code path that I'm aware of that triggers this is to create a
listen socket that has a restricted list of ioctls and then call
accept() which calls fget_cap() with a valid filecaps structure from
getsock_cap().

To fix, change the return value of filecaps_copy() to return true if
it succeeds in copying the caps and false if it fails because the lock
is required.  I find this more intuitive than fixing the caller in
this case.  While here, change the return type from 'int' to 'bool'.

Finally, make filecaps_copy() more robust in the failure case by not
copying any of the source filecaps structure over.  This avoids the
possibility of leaking a pointer into a structure if a similar future
caller doesn't properly handle the return value from filecaps_copy()
at the expense of one more branch.

I also added a test case that panics before this change and now passes.

Reviewed by:	kib
Discussed with:	mjg (not a fan of the extra branch)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D15047
2018-04-17 18:07:40 +00:00
Kristof Provost 98c5f9884e pf tests: Basic ioctl validation tests
Validate the DIOCRADDTABLES and DIOCRDELTABLES ioctls with invalid size
values. All of these requests should fail.

MFC after:	1 week
2018-04-06 15:03:48 +00:00
Ruslan Bukin cde6fa2857 Add new shared library -- libopencsd.
OpenCSD is an ARM CoreSight(tm) trace packets decoder.

- Connect libopencsd to the arm64 build.
- Install opencsd headers to /usr/include/opencsd/

Sponsored by:	DARPA, AFRL
2018-04-04 14:31:56 +00:00
Kristof Provost b93a1086cf pf: reload and resync do the same thing
The reload and resync commands for the startup script do exactly the same
thing, so implement one as a call to the other.

MFC after:	3 weeks
2018-03-26 09:36:22 +00:00
Jonathan T. Looney 2529f56ed3 Add the "TCP Blackbox Recorder" which we discussed at the developer
summits at BSDCan and BSDCam in 2017.

The TCP Blackbox Recorder allows you to capture events on a TCP connection
in a ring buffer. It stores metadata with the event. It optionally stores
the TCP header associated with an event (if the event is associated with a
packet) and also optionally stores information on the sockets.

It supports setting a log ID on a TCP connection and using this to correlate
multiple connections that share a common log ID.

You can log connections in different modes. If you are doing a coordinated
test with a particular connection, you may tell the system to put it in
mode 4 (continuous dump). Or, if you just want to monitor for errors, you
can put it in mode 1 (ring buffer) and dump all the ring buffers associated
with the connection ID when we receive an error signal for that connection
ID. You can set a default mode that will be applied to a particular ratio
of incoming connections. You can also manually set a mode using a socket
option.

This commit includes only basic probes. rrs@ has added quite an abundance
of probes in his TCP development work. He plans to commit those soon.

There are user-space programs which we plan to commit as ports. These read
the data from the log device and output pcapng files, and then let you
analyze the data (and metadata) in the pcapng files.

Reviewed by:	gnn (previous version)
Obtained from:	Netflix, Inc.
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D11085
2018-03-22 09:40:08 +00:00
Ruslan Bukin 30b3274fff Add new shared library -- libipt.
libipt is the Intel Processor Trace (Intel PT) packets decoder.

- Include libipt to amd64 build.
- Install libipt headers to /usr/include/libipt/

Sponsored by:	DARPA, AFRL
2018-03-21 14:37:04 +00:00
Kyle Evans d5a390e6c7 Move /boot/overlays to /boot/dtb/overlays
The former is fairly vague; these are FDT overlays to be applied to the
running system, so /boot/dtb is a sensible location to put it without
cluttering up /boot/dtb even further if desired.
2018-03-19 16:16:12 +00:00
David Bright cc732b9da5 Modify rc.d/fsck to handle new status from fsck/fsck_ffs
r328013 introduced a new error code from fsck_ffs that indicates that
it could not completely fix the file system; this happens when it
prints the message PLEASE RERUN FSCK. However, this status can happen
when fsck is run in "preen" mode and the rc.d/fsck script does not
handle that error code. Modify rc.d/fsck so that if "fsck -p"
("preen") returns the new status code (16) it will run "fsck -y", as
it currently does for a status code of 8 (the "standard error exit").

Reported by:	markj
Reviewed by:	mckusick, markj, ian, rgrimes
MFC after:	3 days
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D14679
2018-03-15 18:29:56 +00:00
Jamie Gritton d0aee33dc9 Don't warn when the "hostname" rc variable is unset, but the hostname
is already non-empty (common in jails).
2018-03-10 20:13:07 +00:00
Alan Somers c60fdff77d Commit missing file from r330696
MFC after:	3 weeks
X-MFC-With:	330696
2018-03-09 23:17:29 +00:00
Hans Petter Selasky e808190a59 Add kernel and userspace code to dump the firmware state of supported
ConnectX-4/5 devices in mlx5core.

The dump is obtained by reading a predefined register map from the
non-destructive crspace, accessible by the vendor-specific PCIe
capability (VSC). The dump is stored in preallocated kernel memory and
managed by the mlx5tool(8), which communicates with the driver using a
character device node.

The utility allows to store the dump in format
    <address> <value>
into a file, to reset the dump content, and to manually initiate the
dump.

A call to mlx5_fwdump() should be added at the places where a dump
must be fetched automatically. The most likely place is right before a
firmware reset request.

Submitted by:	kib@
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2018-03-08 15:21:56 +00:00
Devin Teske 5bf5ca772c Introduce dwatch(1) as a tool for making DTrace more useful
Reviewed by:	markj, gnn, bdrewery (earlier version)
Relnotes:	yes
Sponsored by:	Smule, Inc.
Differential Revision:	https://reviews.freebsd.org/D10006
2018-03-06 23:44:19 +00:00
Edward Tomasz Napierala fc5acf467c Add example devd.conf(5) entry for notifying init(8) about new USB ttys.
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2018-03-06 21:05:34 +00:00
Ed Maste da95763b3b rc.d/jail: avoid misinterpreting expr arguments
(Due to some misconfiguration) I ended up with _mask set to
"-v<something>", and /etc/rc.d/jail then failed with
"expr: illegal option -- v".

Use "expr --" so that variable content is never interpreted as an
option.

Reviewed by:	jamie
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D14535
2018-02-28 17:20:10 +00:00
Kristof Provost 6b8bcdc1e8 pf: Apply $pf_flags when verifying the pf.conf file
When checking the validity of the pf.conf file also include the user supplied
pf_flags. These flags might overrule macros or specify anchors, which we will
apply when actually applying the pf.conf file, so we must also take them into
account when verifying the validity.

Submitted by:	Andreas Longwitz <longwitz at incore.de>
MFC after:	3 weeks
2018-02-28 09:59:58 +00:00
Kristof Provost 5830b90f4b pf: Do not flush on reload
pfctl only takes the last '-F' argument into account, so this never did what
was intended.

Moreover, there is no reason to flush rules before reloading, because pf keeps
track of the rule which created a given state. That means that existing
connections will keep being processed according to the rule which originally
created them. Simply reloading the (new) rules suffices. The new rules will
apply to new connections.

PR:		127814
Submitted by:	Andreas Longwitz <longwitz at incore.de>
MFC after:	3 weeks
2018-02-28 08:53:07 +00:00
Kyle Evans 3eae2a2e40 Add 'usr.bin/seq' to tests mtree after r330086 2018-02-27 22:22:23 +00:00
Alan Somers 4b40bdbd1f Add tests for lagg(4) and other cloned network interfaces
Unfortunately, most of the tests are disabled because they fairly frequently
trigger panics.

MFC after:	3 weeks
Sponsored by:	Spectra Logic Corp
2018-02-23 18:18:42 +00:00
Alan Somers 2fae26bd8b Add the ZFS test suite
It was originally written by Sun as part of the STF (Solaris test framework).
They open sourced it in OpenSolaris, then HighCloud partially ported it to
FreeBSD, and Spectra Logic finished the port.  We also added many testcases,
fixed many broken ones, and converted them all to the ATF framework.  We've had
help along the way from avg, araujo, smh, and brd.

By default most of the tests are disabled.  Set the disks Kyua variable to
enable them.

Submitted by:	asomers, will, justing, ken, brd, avg, araujo, smh
Sponsored by:	Spectra Logic Corp, HighCloud
2018-02-23 16:31:00 +00:00
Marcelo Araujo 61e7e50da9 The firewall_type is ignored if not set in rc.conf or rc.conf.local,
after r190575 there is an option to call rc.firewall with the firewall_type
passed in as an argument.

Submitted by:	David P. Discher <dpd@dpdtech.com>
MFC after:	3 weeks.
Sponsored by:	iXsystems Inc.
Differential Revision:	https://reviews.freebsd.org/D14286
2018-02-22 08:25:39 +00:00
Hans Petter Selasky 974a95948a Fix handling of "one_nomatch" shell variable to preserve its contents
appearing as a single argument passed to devmatch(8).

Don't depend on "sort" utility from usr/bin which might not be
available when devd is started.

Sponsored by:	Mellanox Technologies
2018-02-17 13:32:29 +00:00
Hans Petter Selasky 9a44db43ea Invoke devmatch rc.d script directly instead of depending on "service"
which is installed in usr/sbin and might not be available at the time
devd is started.

Sponsored by:	Mellanox Technologies
2018-02-17 13:13:55 +00:00
Warner Losh 247f52f185 Pass in the NOMATCH event to devmatch
In devd/devmatch.conf, we need to pass the event to the devmatch
serivce. It gets passed to devmatch -p for matching. We always pass
this, unlike hps' original patch, so we kill two birds with one stone
and only match modules to the event passed in.

Submitted by: hps@
Sponsored by: Netflix
2018-02-17 06:57:38 +00:00
Warner Losh 7e1637e491 If we're passed an argument, then treat it as a single NOMATCH event
to parse rather than searching for all events. Pass with new -p arg to
devmatch. devmatch will use that one event rather than walking the
entire tree.

kldload will stop at the first failure. So we need to loop.  Also,
symbolic links may confused kldload into trying (and failing) to load
multiple modules at once, so guard against that.

Noticed by: hps (with similar patch)
Sponsored by: Netflix
2018-02-17 06:57:21 +00:00
Eitan Adler bc43eb228d etc: clean up trailing whitespace in autofs
Obtained from:	DragonFlyBSD (48a93f514f93ff671b7b6c9bbed54d45b3f65180)
2018-02-15 11:41:38 +00:00
Alan Somers ea9c2614cf Add mtree entry for 329275
MFC after:	3 weeks
X-MFC-With:	329275
Sponsored by:	Spectra Logic Corp
2018-02-14 21:02:38 +00:00
Warner Losh b11df8a4a3 Add /boot/lua. 2018-02-13 17:42:10 +00:00