summaryrefslogtreecommitdiff
path: root/debian/patches/77_close-the-server-side-of-TLS.diff
blob: ca7c9bb7788bfd97d19790a0bf2b19e9a58486ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From a400eccf287c55558ae7197c831828cf10b0a35c Mon Sep 17 00:00:00 2001
From: Tony Finch <dot@dotat.at>
Date: Tue, 5 Nov 2013 12:18:02 +0000
Subject: [PATCH 2/8] Correctly close the server side of TLS when forking for
 delivery.

---
 src/daemon.c |    2 +-
 src/exim.c   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/daemon.c b/src/daemon.c
index 3467f14..8e61dcf 100644
--- a/src/daemon.c
+++ b/src/daemon.c
@@ -639,7 +639,7 @@ if (pid == 0)
         the data structures if necessary. */
 
         #ifdef SUPPORT_TLS
-        tls_close(FALSE, FALSE);
+        tls_close(TRUE, FALSE);
         #endif
 
         /* Reset SIGHUP and SIGCHLD in the child in both cases. */
diff --git a/src/exim.c b/src/exim.c
index a715c0b..856e655 100644
--- a/src/exim.c
+++ b/src/exim.c
@@ -526,7 +526,7 @@ close_unwanted(void)
 if (smtp_input)
   {
   #ifdef SUPPORT_TLS
-  tls_close(FALSE, FALSE);      /* Shut down the TLS library */
+  tls_close(TRUE, FALSE);      /* Shut down the TLS library */
   #endif
   (void)close(fileno(smtp_in));
   (void)close(fileno(smtp_out));
-- 
1.7.10.4