mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 20:35:06 -05:00
sys_macosx: drop root privileges
Run chronyd as a non-privileged user, using the privops helper to perform adjtime(), settimeofday() and bind() functions on its behalf.
This commit is contained in:
committed by
Miroslav Lichvar
parent
139fc667aa
commit
750d82f1d1
2
sys.c
2
sys.c
@@ -92,6 +92,8 @@ void SYS_DropRoot(uid_t uid, gid_t gid)
|
||||
SYS_Linux_DropRoot(uid, gid);
|
||||
#elif defined(NETBSD) && defined(FEAT_PRIVDROP)
|
||||
SYS_NetBSD_DropRoot(uid, gid);
|
||||
#elif defined(MACOSX) && defined(FEAT_PRIVDROP)
|
||||
SYS_MacOSX_DropRoot(uid, gid);
|
||||
#else
|
||||
LOG_FATAL(LOGF_Sys, "dropping root privileges not supported");
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user