Commit Graph

6766 Commits

Author SHA1 Message Date
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
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
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
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
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