mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 16:05:07 -05:00
sys: keep cap_net_bind_service capability
This will be needed to allow opening of NTP server socket after root privileges are dropped.
This commit is contained in:
@@ -397,7 +397,7 @@ SYS_Linux_DropRoot(char *user)
|
|||||||
LOG_FATAL(LOGF_SysLinux, "setuid(%d) failed", pw->pw_uid);
|
LOG_FATAL(LOGF_SysLinux, "setuid(%d) failed", pw->pw_uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((cap = cap_from_text("cap_sys_time=ep")) == NULL) {
|
if ((cap = cap_from_text("cap_net_bind_service,cap_sys_time=ep")) == NULL) {
|
||||||
LOG_FATAL(LOGF_SysLinux, "cap_from_text() failed");
|
LOG_FATAL(LOGF_SysLinux, "cap_from_text() failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user