mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-05 11:45:06 -05:00
Don't leak descriptors to sendmail
This commit is contained in:
3
ntp_io.c
3
ntp_io.c
@@ -121,6 +121,9 @@ prepare_socket(int family)
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Close on exec */
|
||||
UTI_FdSetCloexec(sock_fd);
|
||||
|
||||
/* Make the socket capable of re-using an old address */
|
||||
if (setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, (char *)&on_off, sizeof(on_off)) < 0) {
|
||||
LOG(LOGS_ERR, LOGF_NtpIO, "Could not set reuseaddr socket options");
|
||||
|
||||
Reference in New Issue
Block a user