mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 17:35:06 -05:00
privops: refactor initialisation/finalisation
Rename PRV_Initialise() to PRV_StartHelper() and add a new initialisation function, which just sets the helper fd to -1. Move the initialision/finalisation calls from the system drivers to main.c. If privops is not included in the build, define empty macros for the function names, so their calls don't have to be wrapped in #ifdefs.
This commit is contained in:
3
main.c
3
main.c
@@ -49,6 +49,7 @@
|
||||
#include "refclock.h"
|
||||
#include "clientlog.h"
|
||||
#include "nameserv.h"
|
||||
#include "privops.h"
|
||||
#include "smooth.h"
|
||||
#include "tempcomp.h"
|
||||
#include "util.h"
|
||||
@@ -111,6 +112,7 @@ MAI_CleanupAndExit(void)
|
||||
NCR_Finalise();
|
||||
NIO_Finalise();
|
||||
CAM_Finalise();
|
||||
PRV_Finalise();
|
||||
KEY_Finalise();
|
||||
RCL_Finalise();
|
||||
SRC_Finalise();
|
||||
@@ -484,6 +486,7 @@ int main
|
||||
SRC_Initialise();
|
||||
RCL_Initialise();
|
||||
KEY_Initialise();
|
||||
PRV_Initialise();
|
||||
|
||||
/* Open privileged ports before dropping root */
|
||||
CAM_Initialise(address_family);
|
||||
|
||||
Reference in New Issue
Block a user