mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-05 15:35:07 -05:00
Don't leak descriptors to sendmail
This commit is contained in:
3
cmdmon.c
3
cmdmon.c
@@ -199,6 +199,9 @@ prepare_socket(int family)
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Close on exec */
|
||||
UTI_FdSetCloexec(sock_fd);
|
||||
|
||||
/* Allow reuse of port number */
|
||||
if (setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, (char *) &on_off, sizeof(on_off)) < 0) {
|
||||
LOG(LOGS_ERR, LOGF_CmdMon, "Could not set reuseaddr socket options");
|
||||
|
||||
Reference in New Issue
Block a user