JH/14 Bug 1895: TLS: Deprecate RFC 5114 Diffie-Hellman parameters.
+JH/15 Fix a resource leak in *BSD. An off-by-one error resulted in the daemon
+ failing to close the certificates directory, every hour or any time it
+ was touched.
+
Exim version 4.95
-----------------
{
if ((fd1 = open(CCS filename, O_RDONLY | O_NOFOLLOW)) < 0)
{ s = US"open file"; goto bad; }
- DEBUG(D_tls) debug_printf("watch file '%s'\n", filename);
- EV_SET(&kev[++kev_used],
+ DEBUG(D_tls) debug_printf("watch file '%s':\t%d\n", filename, fd1);
+ EV_SET(&kev[kev_used++],
(uintptr_t)fd1,
EVFILT_VNODE,
EV_ADD | EV_ENABLE | EV_ONESHOT,
NULL);
cnt++;
}
- DEBUG(D_tls) debug_printf("watch dir '%s'\n", s);
- EV_SET(&kev[++kev_used],
+ DEBUG(D_tls) debug_printf("watch dir '%s':\t%d\n", s, fd2);
+ EV_SET(&kev[kev_used++],
(uintptr_t)fd2,
EVFILT_VNODE,
EV_ADD | EV_ENABLE | EV_ONESHOT,
/* Close the files we had open for kevent */
for (int i = 0; i < kev_used; i++)
{
+ DEBUG(D_tls) debug_printf("closing watch fd: %d\n", (int) kev[i].ident);
(void) close((int) kev[i].ident);
kev[i].ident = (uintptr_t)-1;
}
next if /^watch dir/;
next if /^watch file .*\/usr\/local/;
next if /^watch file .*\/etc\/ssl/;
+ next if /^closing watch fd:/;
# TLS preload
# there happen in different orders for OpenSSL/GnuTLS/noTLS