freebsd-skq/usr.sbin/ntp
ian 86596b2682 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
..
doc MFV r330102: ntp 4.2.8p11 2018-02-28 07:59:55 +00:00
libntp Simplify idioms in Makefiles further 2017-03-01 05:19:35 +00:00
libntpevent Simplify/improve idioms in usr.sbin/ntp Makefiles 2017-03-01 04:54:06 +00:00
libopts Simplify/improve idioms in usr.sbin/ntp Makefiles 2017-03-01 04:54:06 +00:00
libparse Simplify/improve idioms in usr.sbin/ntp Makefiles 2017-03-01 04:54:06 +00:00
ntp-keygen MFV r330102: ntp 4.2.8p11 2018-02-28 07:59:55 +00:00
ntpd DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
ntpdate DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
ntpdc DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
ntpq DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
ntptime MFV r330102: ntp 4.2.8p11 2018-02-28 07:59:55 +00:00
scripts MFV r330102: ntp 4.2.8p11 2018-02-28 07:59:55 +00:00
sntp DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
config.h Make it possible to run ntpd as a non-root user, add ntpd uid and gid. 2018-07-19 23:55:29 +00:00
Makefile
Makefile.inc