mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 17:55:07 -05:00
sys_linux: don't keep CAP_SYS_TIME with -x option
When dropping the root privileges, don't try to keep the CAP_SYS_TIME capability if the -x option was enabled. This allows chronyd to be started without the capability (e.g. in containers) and also drop the root privileges.
This commit is contained in:
2
sys.c
2
sys.c
@@ -97,7 +97,7 @@ SYS_Finalise(void)
|
||||
void SYS_DropRoot(uid_t uid, gid_t gid)
|
||||
{
|
||||
#if defined(LINUX) && defined (FEAT_PRIVDROP)
|
||||
SYS_Linux_DropRoot(uid, gid);
|
||||
SYS_Linux_DropRoot(uid, gid, !null_driver);
|
||||
#elif defined(SOLARIS) && defined(FEAT_PRIVDROP)
|
||||
SYS_Solaris_DropRoot(uid, gid);
|
||||
#elif (defined(NETBSD) || defined(FREEBSD)) && defined(FEAT_PRIVDROP)
|
||||
|
||||
Reference in New Issue
Block a user