aboutsummaryrefslogtreecommitdiff
path: root/etc
Commit message (Collapse)AuthorAgeFilesLines
* netlink: improve interface handlingAlexander V. Chernikov2022-12-141-0/+2
| | | | | | | | | | | | | | | | * Separate interface creation from interface modification code * Support setting some interface attributes (ifdescr, mtu, up/down, promisc) * Improve interaction with the cloners requiring to parse/write custom interface attributes * Add bitmask-based way of checking if the attribute is present in the message * Don't use multipart RTM_GETLINK replies when searching for the specific interface names * Use ENODEV instead of ENOENT in case of failed RTM_GETLINK search * Add python netlink test helpers * Add some netlink interface tests Differential Revision: https://reviews.freebsd.org/D37668
* sendmail: remove leftovers from mta_start_script and rc.sendmailBaptiste Daroussin2022-11-151-1/+1
| | | | | | | | | | Switch /etc/mail/Makefile to use /etc/rc.d/sendmail instead of /etc/rc.sendmail this switch should have been done 20 years ago. While here update the documentation to not refer anymore to mta_start_script Reported by: Jose Luis Duran <jlduran@gmail.com>
* mktemp: add -p/--tmpdir argumentKyle Evans2022-10-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | This matches other mktemp implementations, including OpenBSD and GNU. The -p option can be used to provide a tmpdir prefix for specified templates. Precedence works out like so: -t flag: - $TMPDIR - -p directory - /tmp Implied -t flag (no arguments or only -d flag): - -p directory - $TMPDIR - /tmp Some tests have been added for mktemp(1) in the process. Reviewed by: imp (earlier version), wosch Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D37121
* Import the WireGuard driver from zx2c4.com.John Baldwin2022-10-281-0/+2
| | | | | | | | | | | | | | | This commit brings back the driver from FreeBSD commit f187d6dfbf633665ba6740fe22742aec60ce02a2 plus subsequent fixes from upstream. Relative to upstream this commit includes a few other small fixes such as additional INET and INET6 #ifdef's, #include cleanups, and updates for recent API changes in main. Reviewed by: pauamma, gbe, kevans, emaste Obtained from: git@git.zx2c4.com:wireguard-freebsd @ 3cc22b2 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D36909
* split: add some testsKyle Evans2022-10-251-0/+2
| | | | | | | | | | This should cover all of the basic functionality, as well as the recent enhancement to use a dynamic buffer size rather than limiting patterns and lines to MAXBSIZE. Reviewed by: bapt Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D36324
* kinst: Add a rudimentary regression test caseMark Johnston2022-10-111-0/+2
| | | | | | | The test instruments a number of large, frequently called kernel functions while generating load in the background. MFC after: 3 months
* Put OPIE to rest.Dag-Erling Smørgrav2022-10-021-2/+0
| | | | Differential Revision: https://reviews.freebsd.org/D36592
* sh: read more profile files.Dag-Erling Smørgrav2022-10-011-0/+2
| | | | | Differential Revision: https://reviews.freebsd.org/D36505 MFC after: 1 month
* netlink: add netlink supportAlexander V. Chernikov2022-10-011-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Netlinks is a communication protocol currently used in Linux kernel to modify, read and subscribe for nearly all networking state. Interfaces, addresses, routes, firewall, fibs, vnets, etc are controlled via netlink. It is async, TLV-based protocol, providing 1-1 and 1-many communications. The current implementation supports the subset of NETLINK_ROUTE family. To be more specific, the following is supported: * Dumps: - routes - nexthops / nexthop groups - interfaces - interface addresses - neighbors (arp/ndp) * Notifications: - interface arrival/departure - interface address arrival/departure - route addition/deletion * Modifications: - adding/deleting routes - adding/deleting nexthops/nexthops groups - adding/deleting neghbors - adding/deleting interfaces (basic support only) * Rtsock interaction - route events are bridged both ways The implementation also supports the NETLINK_GENERIC family framework. Implementation notes: Netlink is implemented via loadable/unloadable kernel module, not touching many kernel parts. Each netlink socket uses dedicated taskqueue to support async operations that can sleep, such as interface creation. All message processing is performed within these taskqueues. Compatibility: Most of the Netlink data models specified above maps to FreeBSD concepts nicely. Unmodified ip(8) binary correctly works with interfaces, addresses, routes, nexthops and nexthop groups. Some software such as net/bird require header-only modifications to compile and work with FreeBSD netlink. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D36002 MFC after: 2 months
* Remove obsolete SystemV dir from BSD.usr.distEd Maste2022-09-291-2/+0
| | | | | | | | | /usr/share/zoneinfo/SystemV is removed via ObsoleteFiles as of commits da038df8c92b and 57338837aef5, so do not create it in the first place. PR: 266666 Fixes: da038df8c92b ("share/zoneinfo: don't build obsolete...") MFC after: 3 days
* Fix mergemaster(8) breakage in the 6ad780caa.Maxim Sobolev2022-09-133-0/+39
| | | | | | | | | | Split out termcap.small generation into its own Makefile under etc/termcap, so it's properly executed by the underlying command: make 'SUBDIR_OVERRIDE=etc' everything Reported by: gbe MFC after: 1 month
* libexec/rc: Add var_run rc scriptCy Schubert2022-09-051-0/+2
| | | | | | | | | | | | | | | | | | Users with a tmpfs /var/run will lose the directory tree state of /var/run at reboot. This rc script will optionally (by default) capture the state of the directory structure in /var/run prior to shutdown and recreate it at system boot. Alternatively a user can save the state of the /var/run directories manually using service var_run save and disable the autosaving of /var/run state using the var_run_autosave variable, for those paranoid SSD users. PR: 259585, 259699 Reported by: freebsd@walstatt-de.de, Reviewed by: philip, gbe (previous version) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D36386
* renice: add unit tests.Dag-Erling Smørgrav2022-08-251-0/+2
| | | | Sponsored by: Klara, Inc.
* pkgbase: mtree: Correctly tag /var/db entriesEmmanuel Vadot2022-08-161-3/+3
|
* pkgbase: mtree: Correctly tag /var/run entriesEmmanuel Vadot2022-08-161-4/+4
|
* Install working pkgconfig .pc files for compat librariesAlex Richardson2022-08-111-0/+2
| | | | | | | | | The default ones are install them to /usr/libdata/pkgconfig, and we can't use this path for compat libraries, so we use /usr/lib<suffix>/pkgconfigi here. Test Plan: grep -rn libdir= ./usr/lib32/pkgconfig/*.pc MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D34939
* rc: Start testing the rc(8) framework (beginning with *_oomprotect)Mateusz Piotrowski2022-07-261-0/+2
| | | | | | | | | | | | | This change adds 2 tests to make sure that the *_oomprotect variable sets the protection against OOM killer properly within rc(8) scripts. This is also adding the first tests for the rc(8) framework. More tests will be added as we go. PR: 256148 Approved by: des MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D35745
* etc: Fix distrib-dirs to not rely on a BSDismJessica Clarke2022-07-151-1/+1
| | | | | | | | | FreeBSD and macOS have a test that treats == as an alias for =, but Linux tends to use GNU coreutils (when not a builtin) which does not. Use the standard syntax instead for compatibility. Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D35811
* if_ovpn tests: basic test caseKristof Provost2022-06-281-0/+2
| | | | | | | | Set up an OpenVPN tunnel between two jails, send traffic through them to confirm basic function. Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D35067
* testing: move atf-pytest-wrapper to /usr/libexecAlexander V. Chernikov2022-06-261-0/+2
| | | | | | | | | | | Move pytest wrapper to the collection of the other atf wrappers in libexec. It solves the problem of combining bits & pieces from bsd.test.mk and bgs.prog.mk to address "test binary, but not the suite binary". Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D35604 MFC after: 2 weeks
* routing: add tests/sys/net/routing to mtreeAlexander V. Chernikov2022-06-251-0/+2
| | | | MFC after: 2 weeks
* Merge llvm-project release/14.x llvmorg-14.0.5-0-gc12386ae247cDimitry Andric2022-06-122-2/+2
| | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-14.0.5-0-gc12386ae247c, aka 14.0.5 release. PR: 261742 MFC after: 3 days
* Remove yet another incorrect .. level from BSD.usr.distDimitry Andric2022-06-121-1/+0
| | | | | | | | Since the spacing was off, it was not clear that it descended one level too many. Fixes: 695052e240c7 MFC after: 3 days
* Fix mtree for usr/Xin LI2022-06-121-0/+1
| | | | MFC after: 3 days
* Update rest of llvm-project build glue for 14.0.4Dimitry Andric2022-06-052-2/+2
| | | | | | | | | I completely forgot about updating the generated llvm-project config files, which also contain version numbers, etc. Sorry for the churn. PR: 261742 Fixes: ab9d54731f43 MFC after: 3 days
* Add several sanitizer ignore lists under /usr/lib/clangDimitry Andric2022-05-281-0/+2
| | | | | | | | | | | Some of the sanitizers from compiler-rt can use ignore lists, which are loosely modeled on valgrind's example. Upstream provides default lists for AddressSanitizer, CFI, and MemorySanitizer, so install these in the expected location, /usr/lib/clang/14.0.3/share. Reviewed by: emaste MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D35338
* Merge llvm-project release/14.x llvmorg-14.0.3-0-g1f9140064dfbDimitry Andric2022-05-142-2/+2
| | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-14.0.3-0-g1f9140064dfb. PR: 261742 MFC after: 2 weeks
* Merge llvm-project main llvmorg-14-init-17616-g024a1fab5c35Dimitry Andric2022-05-141-0/+4
| | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-14-init-17616-g024a1fab5c35. PR: 261742 MFC after: 2 weeks
* Merge llvm-project main llvmorg-14-init-11187-g222442ec2d71Dimitry Andric2022-05-141-0/+2
| | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-14-init-11187-g222442ec2d71. PR: 261742 MFC after: 2 weeks
* Merge llvm-project main llvmorg-14-init-10223-g401b76fdf2b3Dimitry Andric2022-05-143-2/+14
| | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-14-init-10223-g401b76fdf2b3. PR: 261742 MFC after: 2 weeks
* bintrans: move files to a new directoryPiotr Pawel Stefaniak2022-04-181-2/+2
| | | | And reflect the change in various places.
* Modularize uuencode and uudecode by wrapping them in bintrans.cPiotr Pawel Stefaniak2022-04-181-2/+0
| | | | | | | | | | | | | | | | | | | | | The program will be installed as bintrans, uuencode, uudecode, b64encode, and b64decode and will be responsible for running the coders according to their historical behavior. Additionally, bintrans will be able to take a parameter designating the coder and accept all its options in this form: bintrans <coder> [options] and the behavior should be the same as if <coder> [options] was invoked. This has the advantage that adding coders won't require installing them as binaries. Move uudecode files to uuencode since the latter is the one that provides the manual page. Reviewed by: delphij (previous version) Differential Revision: https://reviews.freebsd.org/D32943
* etc/mtree: Remove tabsMark Johnston2022-04-152-6/+6
|
* libsysdecode: Add regression tests for sysdecode_cap_rights(3)Mark Johnston2022-04-151-0/+2
| | | | | | | Reviewed by: jhb, emaste MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34900
* Create a new GEOM utility, gunion(8).Kirk McKusick2022-03-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The gunion(8) utility is used to track changes to a read-only disk on a writable disk. Logically, a writable disk is placed over a read-only disk. Write requests are intercepted and stored on the writable disk. Read requests are first checked to see if they have been written on the top (writable disk) and if found are returned. If they have not been written on the top disk, then they are read from the lower disk. The gunion(8) utility can be especially useful if you have a large disk with a corrupted filesystem that you are unsure of how to repair. You can use gunion(8) to place another disk over the corrupted disk and then attempt to repair the filesystem. If the repair fails, you can revert all the changes in the upper disk and be back to the unchanged state of the lower disk thus allowing you to try another approach to repairing it. If the repair is successful you can commit all the writes recorded on the top disk to the lower disk. Another use of the gunion(8) utility is to try out upgrades to your system. Place the upper disk over the disk holding your filesystem that is to be upgraded and then run the upgrade on it. If it works, commit it; if it fails, revert the upgrade. Further details can be found in the gunion(8) manual page. Reviewed by: Chuck Silvers, kib (earlier version) tested by: Peter Holm Differential Revision: https://reviews.freebsd.org/D32697
* Integrate contrib/file/tests with kyua/atfEric van Gyzen2022-02-161-0/+2
| | | | | | | | | | This could be done better by making each test a separate ATF test case. This exercise is left for the reader. Reviewed by: delphij (earlier version) MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D34303
* newfs_msdos: connect the ATF test from NetBSDEric van Gyzen2022-02-161-0/+2
| | | | | | | | | | | NetBSD has an ATF test for newfs_msdos. Connect it to the build. Adapt it for FreeBSD. This would have caught the bug fixed by my previous commit. Reviewed by: delphij, emaste MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D34116
* Append Keyboard Layout specified option for using VNC.Michael Reifenberger2022-01-201-0/+4
| | | | | | | | | | | | | | Part two: Append bhyve -K option for specified keyboard layout with layout setting files every languages. Since the cmd option '-k' was used in the meantime it was changed to '-K' PR: 246121 Submitted by: koinec@yahoo.co.jp Reviewed by: grehan@ Differential Revision: https://reviews.freebsd.org/D29473 MFC after: 4 weeks
* libsoft: Remove support for installing libsoftWarner Losh2022-01-073-22/+0
| | | | | | Remove the infrasturcture needed to create the libsoft directories. Sponsored by: Netflix
* pkgbase: Create a FreeBSD-mtree packageEmmanuel Vadot2021-12-211-0/+2
| | | | | | | | | | And put the mtree binary and files in it. Useful to create small mfsroot using /etc/rc.d/var without having to install FreeBSD-utilities. MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D33442
* Add idle priority scheduling privilege group to MAC/priorityFlorian Walpen2021-12-101-0/+1
| | | | | | | | | | | | | | | Add an idletime user group that allows non-root users to run processes with idle scheduling priority. Privileges are granted by a MAC policy in the mac_priority module. For this purpose, the kernel privilege PRIV_SCHED_IDPRIO was added to sys/priv.h (kernel module ABI change). Deprecate the system wide sysctl(8) knob security.bsd.unprivileged_idprio which lets any user run idle priority processes, regardless of context. While the knob is still working, it is marked as deprecated in the description and in the man pages. MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D33338
* MAC/priority module for realtime privilege groupFlorian Walpen2021-12-041-0/+1
| | | | | | | | | | | | This is a MAC policy module that grants scheduling privileges based on group membership. Users or processes in the group realtime (gid 47) are allowed to run threads and processes with realtime scheduling priority. For timing-sensitive, low-latency software like audio/jack, running with realtime priority helps to avoid stutter and gaps. PR: 239125 MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D33191
* bsddialog: import new TUI widget and utilityBaptiste Daroussin2021-11-241-0/+2
| | | | | | | | | bsddialog is an attempt to write in permissive license a replacement for libdialog. While it is still in early stage it is good enough to already be used in many areas, it is imported as private lib until it matures enough to be considered as having a stable ABI
* Merge llvm-project release/13.x llvmorg-13.0.0-rc1-97-g23ba3732246aDimitry Andric2021-11-131-2/+16
| | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-13.0.0-rc1-97-g23ba3732246a. PR: 258209 MFC after: 2 weeks
* Merge llvm-project main llvmorg-13-init-16847-g88e66fa60ae5Dimitry Andric2021-11-132-2/+2
| | | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-13-init-16847-g88e66fa60ae5, the last commit before the upstream release/13.x branch was created. PR: 258209 MFC after: 2 weeks
* awk: Move to using two sets of testsWarner Losh2021-11-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream one-true-awk has two sets of tests. These are in addition to NetBSD's tests we're using. The 'bugs-fixed' tests from upstream are ready to use as-is (more or less). However, the 'tests' from upstream are not, so for now we'll just use the netbsd and bugs-fixed tests. They provide an OK workout and are better than nothing, though the tests themselves are for specific esoteric things. The upstream bugs-fixed tests are *ALMOST* a drop in. However, 3 test for errors and the upstream test jig mashes stdout and stderr together, which atf doesn't do, so make a tiny tweak to the upstream tests that I hope to upstream. Plus upstream has ../a.out: instead of awk: in the output. Not sure how to deal with this yet, so I've not proposed anything upstream and have changed the test locally. In addition, the system-status.awk test is not suitable to run in ATF. It wants to force sh to dump core, but kyua doesn't seem to allow that sometimes so the test will fail or pass based on whether or not a core dump can be created. Since it's unstable, remove it. This required moving the netbsd tests to a new direcotry, so update mtree files as well. The change is useless for 'make check' without it. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D31376
* sh(1): make it the default shell for the root userBaptiste Daroussin2021-10-201-1/+1
| | | | | | | | | | | | | | | In the recent history sh(1) has gain the missing features for it to become a usable interractive shell: - command completion - persistent history support - improvements on the default bindings in emacs mode - improvements in the vi mode (repect $EDITOR) - print a newline when exiting via ^D - default prompt and improvements on how PS1 can be configured - and more. This changes also simplifies making tiny freebsd images with only sh(1) as a shell
* Add support for jail.conf.dAntranig Vartanian2021-09-101-0/+2
| | | | | | | | | | | | | | Using /etc/jail.{jailname}.conf is nice, however it makes /etc/ very messy if you have many jails. This patch allows one to move these config files out of the way into /etc/jail.conf.d/{jailname}.conf. Note that the same caveat as /etc/jail.*.conf applies: the jail service will not autodiscover all of these for starting 'all' jails. This is considered future work, since the behavior matches. Reviewed by: kevans MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D24570
* Register /usr/tests/usr.bin/diff3Piotr Pawel Stefaniak2021-08-231-0/+2
| | | | | I wasn't able to make check to run diff3 tests, but kevans figured out that I was missing diff3 in mtree.
* vmm: Add credential to cdev objectCyril Zhang2021-08-181-0/+2
| | | | | | | | | | | | | | Add a credential to the cdev object in sysctl_vmm_create(), then check that we have the correct credentials in sysctl_vmm_destroy(). This prevents a process in one jail from opening or destroying the /dev/vmm file corresponding to a VM in a sibling jail. Add regression tests. Reviewed by: jhb, markj MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31156