freebsd-dev/share
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
..
colldef Update to CLDR 32 and Unicode 10 2017-11-03 13:52:34 +00:00
ctypedef Update to CLDR 32 and Unicode 10 2017-11-03 13:52:34 +00:00
dict Sync with NetBSD's /usr/share/dict/words, with the exception of quim 2017-12-16 20:25:50 +00:00
doc Update several more URLs 2017-10-29 08:17:03 +00:00
dtrace Introduce dwatch(1) as a tool for making DTrace more useful 2018-03-06 23:44:19 +00:00
examples bhyve/vmrun.sh: make -L functional. 2018-06-24 15:22:38 +00:00
i18n share: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:26:40 +00:00
keys META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
man Make it possible to run ntpd as a non-root user, add ntpd uid and gid. 2018-07-19 23:55:29 +00:00
misc Update mentor and mentee information. 2018-07-19 12:58:10 +00:00
mk PROFILE, TESTS and CXX build options are no longer broken for RISC-V. 2018-07-19 13:02:29 +00:00
monetdef Update to CLDR 32 and Unicode 10 2017-11-03 13:52:34 +00:00
msgdef Update to CLDR 32 and Unicode 10 2017-11-03 13:52:34 +00:00
numericdef Update to CLDR 32 and Unicode 10 2017-11-03 13:52:34 +00:00
security META MODE: These need object directories to handle staging. 2015-11-26 01:14:27 +00:00
sendmail share: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:26:40 +00:00
skel Simplify this Makefile. 2018-06-08 15:05:26 +00:00
snmp
syscons Don't use CCACHE for linking. 2018-06-27 19:29:15 +00:00
tabset
termcap Simplify using bsd.endian.mk and have it provide CAP_MKDB_ENDIAN, since it is 2018-06-28 13:48:59 +00:00
tests Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
timedef timedef: Update Czech timedef 2018-05-23 10:39:02 +00:00
vt Correct tom-thumb vt font glyphs 2018-04-13 17:37:39 +00:00
zoneinfo We don't actually need env here, so drop it. All shells allow setting 2018-02-09 15:50:32 +00:00
Makefile Convert traditional ${MK_TESTS} conditional idiom for including test 2017-08-02 08:35:51 +00:00
Makefile.inc