rpms/evolution-data-server/devel evolution-data-server-1.2.0-validatehelo.patch, NONE, 1.1 evolution-data-server.spec, 1.76, 1.77
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Thu Jan 5 20:50:42 UTC 2006
- Previous message (by thread): rpms/hal/devel hal.spec,1.70,1.71
- Next message (by thread): rpms/policycoreutils/devel .cvsignore, 1.92, 1.93 policycoreutils-rhat.patch, 1.141, 1.142 policycoreutils.spec, 1.209, 1.210 sources, 1.96, 1.97
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: dmalcolm
Update of /cvs/dist/rpms/evolution-data-server/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv11367
Modified Files:
evolution-data-server.spec
Added Files:
evolution-data-server-1.2.0-validatehelo.patch
Log Message:
* Thu Jan 5 2006 David Malcolm <dmalcolm at redhat.com> - 1.5.4-2
- added patch from David Woodhouse to validate reverse DNS domain before using
in SMTP greeting (patch 103, #151121)
evolution-data-server-1.2.0-validatehelo.patch:
camel-smtp-transport.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 46 insertions(+), 2 deletions(-)
--- NEW FILE evolution-data-server-1.2.0-validatehelo.patch ---
--- evolution-data-server-1.2.0/camel/providers/smtp/camel-smtp-transport.c~ 2005-01-24 09:16:34.000000000 -0700
+++ evolution-data-server-1.2.0/camel/providers/smtp/camel-smtp-transport.c 2005-03-16 09:23:30.000000000 -0700
@@ -875,6 +875,39 @@ smtp_set_exception (CamelSmtpTransport *
}
}
+static gboolean smtp_helo_is_valid(char *name)
+{
+ enum { ALNUM, DASH, DOT } state = DOT;
+ int dotseen = 0;
+
+ while (*name) {
+ switch(state) {
+ case ALNUM:
+ if (*name == '-') {
+ state = DASH;
+ break;
+ } else if (*name == '.') {
+ dotseen = 1;
+ state = DOT;
+ break;
+ } /* else ... */
+ case DOT:
+ case DASH:
+ if (!isalnum(*name))
+ return FALSE;
+ state = ALNUM;
+ break;
+ }
+ name++;
+ }
+
+ /* If it didn't end with an alphanumeric character, or there were no dots, it's invalid */
+ if (state != ALNUM || !dotseen)
+ return FALSE;
+ else
+ return TRUE;
+}
+
static gboolean
smtp_helo (CamelSmtpTransport *transport, CamelException *ex)
{
@@ -896,8 +929,19 @@ smtp_helo (CamelSmtpTransport *transport
camel_operation_start_transient (NULL, _("SMTP Greeting"));
- /* force name resolution first, fallback to numerical, we need to know when it falls back */
- if (camel_getnameinfo(transport->localaddr, transport->localaddrlen, &name, NULL, NI_NAMEREQD, NULL) != 0) {
+ /* force name resolution first, but check the resulting name is valid according to RFC2821 */
+ if (camel_getnameinfo(transport->localaddr, transport->localaddrlen, &name, NULL, NI_NAMEREQD, NULL) == 0 &&
+ !smtp_helo_is_valid(name)) {
+ g_free(name);
+ name = NULL;
+ }
+ /* camel_getnameinfo() can return an empty string on failure, bizarrely */
+ if (name && !*name) {
+ g_free(name);
+ name = NULL;
+ }
+ /* If the name lookup failed, or the name wasn't acceptable, then try to use a numeric HELO domain */
+ if (!name) {
if (camel_getnameinfo(transport->localaddr, transport->localaddrlen, &name, NULL, NI_NUMERICHOST, NULL) != 0)
name = g_strdup("localhost.localdomain");
else {
Index: evolution-data-server.spec
===================================================================
RCS file: /cvs/dist/rpms/evolution-data-server/devel/evolution-data-server.spec,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -r1.76 -r1.77
--- evolution-data-server.spec 3 Jan 2006 20:56:28 -0000 1.76
+++ evolution-data-server.spec 5 Jan 2006 20:50:40 -0000 1.77
@@ -20,7 +20,7 @@
Summary: Backend data server for evolution
Name: evolution-data-server
Version: 1.5.4
-Release: 1
+Release: 2
License: LGPL
Group: System Environment/Libraries
Source0: ftp://ftp.gnome.org/pub/gnome/sources/evolution-data-server/1.0/%{name}-%{version}.tar.bz2
@@ -36,6 +36,7 @@
Patch98: evolution-1.4.4-ldap-x86_64-hack.patch
Patch101: evolution-data-server-1.2.2-fix_open_calendar_declaration.patch
Patch102: evolution-data-server-1.3.8-fix-implicit-function-declarations
+Patch103: evolution-data-server-1.2.0-validatehelo.patch
# Leak fixes by Mark G. Adams
Patch200: gb-309079-attach-48376.patch
@@ -111,6 +112,7 @@
%patch98 -p1 -b .ldaphack
%patch101 -p1 -b .fix_open_calendar_declaration
%patch102 -p1 -b .fix-implicit-function-declarations
+%patch103 -p1 -b .validatehelo
%patch200 -p0 -b .fix-uid-leak
%patch201 -p0 -b .fix-comp-ref-leak
@@ -228,6 +230,10 @@
%changelog
+* Thu Jan 5 2006 David Malcolm <dmalcolm at redhat.com> - 1.5.4-2
+- added patch from David Woodhouse to validate reverse DNS domain before using
+ in SMTP greeting (patch 103, #151121)
+
* Tue Jan 3 2006 David Malcolm <dmalcolm at redhat.com> - 1.5.4-1
- 1.5.4
- Previous message (by thread): rpms/hal/devel hal.spec,1.70,1.71
- Next message (by thread): rpms/policycoreutils/devel .cvsignore, 1.92, 1.93 policycoreutils-rhat.patch, 1.141, 1.142 policycoreutils.spec, 1.209, 1.210 sources, 1.96, 1.97
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list