[evolution-patches] 44295, workaround for glibc nss_hosts bug
- From: Not Zed <notzed ximian com>
- To: evolution-patches ximian com
- Subject: [evolution-patches] 44295, workaround for glibc nss_hosts bug
- Date: 20 Jun 2003 13:48:26 +0930
seems comments can upset reverse name lookup via /etc/hosts ...
simple patch just canonicalises the hostname to match the SMTP rfc
(which uses an rfc822 domain).
Z
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/camel/ChangeLog,v
retrieving revision 1.1834
diff -u -3 -r1.1834 ChangeLog
--- ChangeLog 20 Jun 2003 03:53:33 -0000 1.1834
+++ ChangeLog 20 Jun 2003 04:09:37 -0000
@@ -1,3 +1,13 @@
+2003-06-20 Not Zed <NotZed Ximian com>
+
+ ** See bug #44295.
+
+ * providers/smtp/camel-smtp-transport.c (smtp_helo): canonicalise
+ the hostname before sending it to the world.
+
+ * camel-mime-utils.c (header_domain_decode): external api to
+ header_decode_domain, decode an rfc822 domain into canonical form.
+
2003-06-18 Not Zed <NotZed Ximian com>
* camel-service.c (get_hostbyaddr, get_hostbyname): if we got
Index: camel-mime-utils.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-mime-utils.c,v
retrieving revision 1.183
diff -u -3 -r1.183 camel-mime-utils.c
--- camel-mime-utils.c 15 May 2003 23:30:06 -0000 1.183
+++ camel-mime-utils.c 20 Jun 2003 04:09:39 -0000
@@ -2290,6 +2290,15 @@
return ret;
}
+char *
+header_domain_decode(const char *in)
+{
+ if (in == NULL)
+ return NULL;
+
+ return header_decode_domain(&in);
+}
+
static char *
header_decode_addrspec(const char **in)
{
Index: camel-mime-utils.h
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-mime-utils.h,v
retrieving revision 1.42
diff -u -3 -r1.42 camel-mime-utils.h
--- camel-mime-utils.h 20 Mar 2003 16:43:26 -0000 1.42
+++ camel-mime-utils.h 20 Jun 2003 04:09:39 -0000
@@ -111,6 +111,8 @@
void header_address_list_append(struct _header_address **, struct _header_address *);
void header_address_list_clear(struct _header_address **);
+char *header_domain_decode(const char *in);
+
struct _header_address *header_address_decode(const char *in, const char *charset);
struct _header_address *header_mailbox_decode(const char *in, const char *charset);
/* for mailing */
Index: providers/smtp/camel-smtp-transport.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/providers/smtp/camel-smtp-transport.c,v
retrieving revision 1.138
diff -u -3 -r1.138 camel-smtp-transport.c
--- providers/smtp/camel-smtp-transport.c 16 May 2003 18:47:59 -0000 1.138
+++ providers/smtp/camel-smtp-transport.c 20 Jun 2003 04:09:40 -0000
@@ -892,7 +892,7 @@
camel_exception_clear (&err);
if (host && host->h_name && *host->h_name) {
- name = g_strdup (host->h_name);
+ name = header_domain_decode(host->h_name);
} else {
#ifdef ENABLE_IPv6
char ip[MAXHOSTNAMELEN + 1];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]