freebsd-dev/sys/security
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
..
audit auditon(2): fix A_SETPOLICY with 64-bit values 2018-07-15 21:10:19 +00:00
mac Use an accessor function to access ifr_data. 2018-03-30 18:50:13 +00:00
mac_biba sys/security: minor spelling fixes. 2016-05-06 16:59:04 +00:00
mac_bsdextended Correct bitwise test in mac_bsdextended ugidfw_rule_valid() 2017-06-13 01:17:58 +00:00
mac_ifoff
mac_lomac sys/security: minor spelling fixes. 2016-05-06 16:59:04 +00:00
mac_mls sys/security: minor spelling fixes. 2016-05-06 16:59:04 +00:00
mac_none
mac_ntpd Make it possible to run ntpd as a non-root user, add ntpd uid and gid. 2018-07-19 23:55:29 +00:00
mac_partition
mac_portacl mac_portacl(4): stop panicing INVARIANTS-enabled kernel by loading .ko 2018-02-25 23:10:13 +00:00
mac_seeotheruids
mac_stub
mac_test
mac_veriexec Add mpo_vnode_check_setmode MAC method to MAC/veriexec. 2018-07-14 17:21:16 +00:00