]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
nts: close reusable sockets in helper process
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 20 Nov 2023 12:34:59 +0000 (13:34 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 21 Nov 2023 11:38:41 +0000 (12:38 +0100)
Close all reusable sockets when the NTS-KE server helper is forked. It
is not supposed to have access to any of the server sockets, just the
socket for getting requests from the main process and the syslog socket.

nts_ke_server.c

index 5e25c504a3dc50982c943d95a84552a747ff1030..3fe99dbf7311819e4c19315bc633231c08175ed4 100644 (file)
@@ -685,6 +685,8 @@ run_helper(uid_t uid, gid_t gid, int scfilter_level)
 
   DEBUG_LOG("Helper started");
 
+  SCK_CloseReusableSockets();
+
   /* Suppress a log message about disabled clock control */
   log_severity = LOG_GetMinSeverity();
   LOG_SetMinSeverity(LOGS_ERR);