mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-05 06:05:07 -05:00
Don't leak descriptors to sendmail
This commit is contained in:
14
util.c
14
util.c
@@ -600,3 +600,17 @@ UTI_FloatHostToNetwork(double x)
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
void
|
||||
UTI_FdSetCloexec(int fd)
|
||||
{
|
||||
int flags;
|
||||
|
||||
flags = fcntl(fd, F_GETFD);
|
||||
if (flags != -1) {
|
||||
flags |= FD_CLOEXEC;
|
||||
fcntl(fd, F_SETFD, flags);
|
||||
}
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
Reference in New Issue
Block a user