Remove residual blank line at start of MakefileThis is a residual of the $FreeBSD$ removal.MFC After: 3 days (though I'll just run the command on the branches)Sponsored by: Netflix
sys: Remove $FreeBSD$: one-line sh patternRemove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
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 onlyprivileged operations performed by ntpd are adjusting
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 onlyprivileged 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 anyprocess running with uid 123.This also adds a new user and group, ntpd:ntpd, (uid:gid 123:123), and makesthem the owner of the /var/db/ntp directory, so that it can be used as alocation where the non-privileged daemon can write files such as thedriftfile, and any optional logfile or stats files.Because there are so many ways to configure ntpd, the question of how toconfigure it to run without root privs can be a bit complex, so that will beaddressed in a separate commit. These changes are just what's required togrant the limited subset of privs to ntpd, and the small change to ntpd toprevent it from exiting with an error if running as non-root.Differential Revision: https://reviews.freebsd.org/D16281
show more ...