mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:35:06 -05:00
sys_netbsd: use privileged helper for socket binding
When dropping root privileges, start the helper to allow binding of server sockets later.
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include "sys_netbsd.h"
|
||||
#include "sys_timex.h"
|
||||
#include "logging.h"
|
||||
#include "privops.h"
|
||||
#include "util.h"
|
||||
|
||||
/* Maximum frequency offset accepted by the kernel (in ppm) */
|
||||
@@ -124,6 +125,8 @@ SYS_NetBSD_DropRoot(uid_t uid, gid_t gid)
|
||||
{
|
||||
int fd;
|
||||
|
||||
PRV_StartHelper();
|
||||
|
||||
if (setgroups(0, NULL))
|
||||
LOG_FATAL(LOGF_SysNetBSD, "setgroups() failed : %s", strerror(errno));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user