summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilip Hazel <ph10@hermes.cam.ac.uk>2007-08-22 14:20:28 +0000
committerPhilip Hazel <ph10@hermes.cam.ac.uk>2007-08-22 14:20:28 +0000
commit48ed62d9a68c4e44c9fbaa6e300f88401bb32d65 (patch)
treed5f41c4260a4f2ddda3651a48ffb4794acce2e67 /src
parent8932dffe21c3b9fc102e0a976660f1ab6d158179 (diff)
Escape funny characters when logging DN=
Diffstat (limited to 'src')
-rw-r--r--src/src/deliver.c5
-rw-r--r--src/src/receive.c5
-rw-r--r--src/src/smtp_in.c5
3 files changed, 9 insertions, 6 deletions
diff --git a/src/src/deliver.c b/src/src/deliver.c
index c712e9aa2..c209e12f2 100644
--- a/src/src/deliver.c
+++ b/src/src/deliver.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/deliver.c,v 1.44 2007/02/06 14:19:00 ph10 Exp $ */
+/* $Cambridge: exim/src/src/deliver.c,v 1.45 2007/08/22 14:20:28 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -944,7 +944,8 @@ if (result == OK)
s = string_append(s, &size, &ptr, 2, US" CV=",
testflag(addr, af_cert_verified)? "yes":"no");
if ((log_extra_selector & LX_tls_peerdn) != 0 && addr->peerdn != NULL)
- s = string_append(s, &size, &ptr, 3, US" DN=\"", addr->peerdn, US"\"");
+ s = string_append(s, &size, &ptr, 3, US" DN=\"",
+ string_printing(addr->peerdn), US"\"");
#endif
if ((log_extra_selector & LX_smtp_confirmation) != 0 &&
diff --git a/src/src/receive.c b/src/src/receive.c
index e97314a20..651121956 100644
--- a/src/src/receive.c
+++ b/src/src/receive.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/receive.c,v 1.40 2007/08/22 10:10:23 ph10 Exp $ */
+/* $Cambridge: exim/src/src/receive.c,v 1.41 2007/08/22 14:20:28 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -3366,7 +3366,8 @@ if ((log_extra_selector & LX_tls_certificate_verified) != 0 &&
s = string_append(s, &size, &sptr, 2, US" CV=",
tls_certificate_verified? "yes":"no");
if ((log_extra_selector & LX_tls_peerdn) != 0 && tls_peerdn != NULL)
- s = string_append(s, &size, &sptr, 3, US" DN=\"", tls_peerdn, US"\"");
+ s = string_append(s, &size, &sptr, 3, US" DN=\"",
+ string_printing(tls_peerdn), US"\"");
#endif
if (sender_host_authenticated != NULL)
diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c
index d336f0eca..6c66a5634 100644
--- a/src/src/smtp_in.c
+++ b/src/src/smtp_in.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/smtp_in.c,v 1.60 2007/08/22 10:10:23 ph10 Exp $ */
+/* $Cambridge: exim/src/src/smtp_in.c,v 1.61 2007/08/22 14:20:28 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -818,7 +818,8 @@ if ((log_extra_selector & LX_tls_certificate_verified) != 0 &&
s = string_append(s, &size, &ptr, 2, US" CV=",
tls_certificate_verified? "yes":"no");
if ((log_extra_selector & LX_tls_peerdn) != 0 && tls_peerdn != NULL)
- s = string_append(s, &size, &ptr, 3, US" DN=\"", tls_peerdn, US"\"");
+ s = string_append(s, &size, &ptr, 3, US" DN=\"",
+ string_printing(tls_peerdn), US"\"");
#endif
sep = (smtp_connection_had[SMTP_HBUFF_SIZE-1] != SCH_NONE)?