freebsd-skq/sys
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
..
amd64 Have preload_delete_name() free pages backing preloaded data. 2018-07-19 20:00:28 +00:00
arm arm: Implement cpu_est_clockrate for armv[67] 2018-07-19 11:27:11 +00:00
arm64 arm64: Add vt_efifb to GENERIC 2018-07-19 21:59:52 +00:00
bsm
cam
cddl Fix a couple of typos in r334844 noticed by Richard Kojedzinszky. 2018-07-18 16:03:40 +00:00
compat
conf Make it possible to run ntpd as a non-root user, add ntpd uid and gid. 2018-07-19 23:55:29 +00:00
contrib
crypto Remove unused variable 2018-07-18 04:44:11 +00:00
ddb
dev ofwfb: Check for /chosen/stdout-path in addition to /chosen/stdout 2018-07-19 20:22:46 +00:00
dts
fs Modify the reasons for not issuing a delegation in the NFSv4.1 server. 2018-07-16 21:32:50 +00:00
gdb
geom OpenCrypto: Convert sessions to opaque handles instead of integers 2018-07-18 00:56:25 +00:00
gnu
i386 Have preload_delete_name() free pages backing preloaded data. 2018-07-19 20:00:28 +00:00
isa
kern Raise the size of L3 table for early devmap on arm64 2018-07-19 21:58:06 +00:00
kgssapi OpenCrypto: Convert sessions to opaque handles instead of integers 2018-07-18 00:56:25 +00:00
libkern
mips OpenCrypto: Convert sessions to opaque handles instead of integers 2018-07-18 00:56:25 +00:00
modules Make it possible to run ntpd as a non-root user, add ntpd uid and gid. 2018-07-19 23:55:29 +00:00
net Move invoking of callout_stop(&lle->lle_timer) into llentry_free(). 2018-07-17 11:33:23 +00:00
net80211
netgraph
netinet Whitespace changes due to changes in ident. 2018-07-19 20:16:33 +00:00
netinet6 Whitespace changes due to changes in ident. 2018-07-19 20:16:33 +00:00
netipsec OpenCrypto: Convert sessions to opaque handles instead of integers 2018-07-18 00:56:25 +00:00
netpfil pf: Fix synproxy 2018-07-14 10:14:59 +00:00
netsmb
nfs
nfsclient
nfsserver
nlm
ofed Use __FBSDID() for RCS tags in ibcore. 2018-07-17 09:47:14 +00:00
opencrypto OpenCrypto: Convert sessions to opaque handles instead of integers 2018-07-18 00:56:25 +00:00
powerpc Revert r336509. Fails buildworld. 2018-07-19 21:06:58 +00:00
riscv Remove VM_FREELIST_ISADMA. It's not needed on these architectures. 2018-07-17 21:07:53 +00:00
rpc
security Make it possible to run ntpd as a non-root user, add ntpd uid and gid. 2018-07-19 23:55:29 +00:00
sparc64 Fix a typo: change lists to list to match rest of sentence. 2018-07-17 21:18:49 +00:00
sys Make the definition of struct kevent in event.h match what the man page for kevent(2) says. 2018-07-18 13:04:03 +00:00
teken
tests epoch_test: fix compile 2018-07-15 00:31:17 +00:00
tools
ufs Add needed locking for um_flags added in -r335808. 2018-07-17 04:43:58 +00:00
vm Have preload_delete_name() free pages backing preloaded data. 2018-07-19 20:00:28 +00:00
x86 xen: implement early init helper for PVHv2 2018-07-19 08:44:52 +00:00
xdr
xen xen: add missing file from r336474 2018-07-19 10:14:52 +00:00
Makefile