~ubuntu-branches/ubuntu/hardy/exim4/hardy-proposed

« back to all changes in this revision

Viewing changes to debian/patches/63_nomorecrashongnutlserror.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Marc Haber
  • Date: 2005-07-02 06:08:34 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050702060834-qk17pd52kb9nt3bj
Tags: 4.52-1
* new upstream version 4.51. (mh)
  * adapt 70_remove_exim-users_references
  * remove 37_gnutlsparams
  * adapt 36_pcre
  * adapt 31_eximmanpage
* fix package priorities to have them in sync with override again. (mh)
* Fix error in nb (Norwegian) translation.
  Thanks to Helge Hafting. (mh). Closes: #315775
* Standards-Version: 3.6.2, no changes needed. (mh)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh -e
2
 
## 63_nomorecrashongnutlserror.dpatch by Philip Hazel <ph10@cus.cam.ac.uk>
3
 
##
4
 
## All lines beginning with `## DP:' are a description of the patch.
5
 
## DP: Fix unitialized variable and a thinko in tls-gnu.c.
6
 
## DP: #280647
7
 
## DP: Pulled from 4.40
8
 
## DP: 18. If a server dropped the connection unexpectedly when an Exim client
9
 
## DP:     was using GnuTLS and trying to read a response, the client delivery
10
 
## DP:     process crashed while trying to generate an error log message.
11
 
 
12
 
 
13
 
if [ $# -lt 1 ]; then
14
 
    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
15
 
    exit 1
16
 
fi
17
 
 
18
 
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
19
 
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
20
 
 
21
 
case "$1" in
22
 
    -patch) patch -p1 ${patch_opts} < $0;;
23
 
    -unpatch) patch -R -p1 ${patch_opts} < $0;;
24
 
    *)
25
 
        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
26
 
        exit 1;;
27
 
esac
28
 
 
29
 
exit 0
30
 
 
31
 
@DPATCH@
32
 
Index: 4exp-exim/src/tls-gnu.c
33
 
===================================================================
34
 
RCS file: /cvsroot/pkg-exim4/exim/exim/src/tls-gnu.c,v
35
 
retrieving revision 1.5
36
 
retrieving revision 1.6
37
 
diff -u -r1.5 -r1.6
38
 
--- 4exp-exim/src/tls-gnu.c     5 May 2004 16:34:08 -0000       1.5
39
 
+++ 4exp-exim/src/tls-gnu.c     9 Nov 2004 12:25:05 -0000       1.6
40
 
@@ -923,6 +923,7 @@
41
 
 
42
 
 DEBUG(D_tls) debug_printf("initializing GnuTLS as a client\n");
43
 
 
44
 
+client_host = host;
45
 
 verify_requirement = (verify_certs == NULL)? VERIFY_NONE : VERIFY_REQUIRED;
46
 
 rc = tls_init(host, certificate, privatekey, verify_certs, verify_crl);
47
 
 if (rc != OK) return rc;
48
 
@@ -1008,6 +1009,7 @@
49
 
 record_io_error(int ec, uschar *when, uschar *text)
50
 
 {
51
 
 uschar *additional = US"";
52
 
+
53
 
 if (ec == GNUTLS_E_FATAL_ALERT_RECEIVED)
54
 
   additional = string_sprintf(": %s",
55
 
     gnutls_alert_get_name(gnutls_alert_get(tls_session)));
56
 
@@ -1020,7 +1022,7 @@
57
 
 else
58
 
   log_write(0, LOG_MAIN, "TLS %s error on connection to %s [%s]: %s%s", when,
59
 
     client_host->name, client_host->address,
60
 
-    (text == 0)? text : US gnutls_strerror(ec), additional);
61
 
+    (ec == 0)? text : US gnutls_strerror(ec), additional);
62
 
 }
63
 
 
64
 
 
65
 
@@ -1117,7 +1119,6 @@
66
 
 
67
 
 inbytes = gnutls_record_recv(tls_session, CS buff, len);
68
 
 if (inbytes > 0) return inbytes;
69
 
-
70
 
 if (inbytes == 0)
71
 
   {
72
 
   DEBUG(D_tls) debug_printf("Got TLS_EOF\n");