rpms/exim/devel exim-4.71-dlopen-localscan.patch, NONE, 1.1 exim-4.71-dynlookup.patch, NONE, 1.1 .cvsignore, 1.15, 1.16 exim-4.50-config.patch, 1.9, 1.10 exim.spec, 1.70, 1.71 sources, 1.15, 1.16 exim-4.52-dynamic-pcre.patch, 1.2, NONE exim-4.62-dlopen-localscan.patch, 1.4, NONE exim-4.69-dynlookup.patch, 1.2, NONE exim-4.69-expand-spamd.patch, 1.1, NONE
David Woodhouse
dwmw2 at fedoraproject.org
Thu Dec 24 20:11:03 UTC 2009
Author: dwmw2
Update of /cvs/pkgs/rpms/exim/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26295
Modified Files:
.cvsignore exim-4.50-config.patch exim.spec sources
Added Files:
exim-4.71-dlopen-localscan.patch exim-4.71-dynlookup.patch
Removed Files:
exim-4.52-dynamic-pcre.patch exim-4.62-dlopen-localscan.patch
exim-4.69-dynlookup.patch exim-4.69-expand-spamd.patch
Log Message:
4.71
exim-4.71-dlopen-localscan.patch:
EDITME | 14 ++++
config.h.defaults | 2
globals.c | 3
globals.h | 3
local_scan.c | 165 ++++++++++++++++++++++++++++++++++++++----------------
readconf.c | 3
6 files changed, 143 insertions(+), 47 deletions(-)
--- NEW FILE exim-4.71-dlopen-localscan.patch ---
--- exim-4.71/src/globals.c.dl 2009-11-16 19:50:37.000000000 +0000
+++ exim-4.71/src/globals.c 2009-12-24 19:27:17.000000000 +0000
@@ -129,6 +129,9 @@ uschar *tls_verify_certificates= NULL;
uschar *tls_verify_hosts = NULL;
#endif
+#ifdef DLOPEN_LOCAL_SCAN
+uschar *local_scan_path = NULL;
+#endif
/* Input-reading functions for messages, so we can use special ones for
incoming TCP/IP. The defaults use stdin. We never need these for any
--- exim-4.71/src/config.h.defaults.dl 2009-11-16 19:50:36.000000000 +0000
+++ exim-4.71/src/config.h.defaults 2009-12-24 19:27:17.000000000 +0000
@@ -27,6 +27,8 @@ it's a default value. */
#define AUTH_VARS 3
+#define DLOPEN_LOCAL_SCAN
+
#define BIN_DIRECTORY
#define CONFIGURE_FILE
--- exim-4.71/src/readconf.c.dl 2009-11-16 19:50:37.000000000 +0000
+++ exim-4.71/src/readconf.c 2009-12-24 19:27:17.000000000 +0000
@@ -269,6 +269,9 @@ static optionlist optionlist_config[] =
{ "local_from_prefix", opt_stringptr, &local_from_prefix },
{ "local_from_suffix", opt_stringptr, &local_from_suffix },
{ "local_interfaces", opt_stringptr, &local_interfaces },
+#ifdef DLOPEN_LOCAL_SCAN
+ { "local_scan_path", opt_stringptr, &local_scan_path },
+#endif
{ "local_scan_timeout", opt_time, &local_scan_timeout },
{ "local_sender_retain", opt_bool, &local_sender_retain },
{ "localhost_number", opt_stringptr, &host_number_string },
--- exim-4.71/src/local_scan.c.dl 2009-11-16 19:50:37.000000000 +0000
+++ exim-4.71/src/local_scan.c 2009-12-24 19:27:17.000000000 +0000
@@ -7,60 +7,131 @@
/* Copyright (c) University of Cambridge 1995 - 2009 */
/* See the file NOTICE for conditions of use and distribution. */
+#include "exim.h"
-/******************************************************************************
-This file contains a template local_scan() function that just returns ACCEPT.
-If you want to implement your own version, you should copy this file to, say
-Local/local_scan.c, and edit the copy. To use your version instead of the
-default, you must set
-
-LOCAL_SCAN_SOURCE=Local/local_scan.c
-
-in your Local/Makefile. This makes it easy to copy your version for use with
-subsequent Exim releases.
-
-For a full description of the API to this function, see the Exim specification.
-******************************************************************************/
-
-
-/* This is the only Exim header that you should include. The effect of
-including any other Exim header is not defined, and may change from release to
-release. Use only the documented interface! */
-
-#include "local_scan.h"
-
-
-/* This is a "do-nothing" version of a local_scan() function. The arguments
-are:
-
- fd The file descriptor of the open -D file, which contains the
- body of the message. The file is open for reading and
- writing, but modifying it is dangerous and not recommended.
-
- return_text A pointer to an unsigned char* variable which you can set in
- order to return a text string. It is initialized to NULL.
-
-The return values of this function are:
-
- LOCAL_SCAN_ACCEPT
- The message is to be accepted. The return_text argument is
- saved in $local_scan_data.
-
- LOCAL_SCAN_REJECT
- The message is to be rejected. The returned text is used
- in the rejection message.
-
- LOCAL_SCAN_TEMPREJECT
- This specifies a temporary rejection. The returned text
- is used in the rejection message.
-*/
+#ifdef DLOPEN_LOCAL_SCAN
+#include <dlfcn.h>
+static int (*local_scan_fn)(int fd, uschar **return_text) = NULL;
+static int load_local_scan_library(void);
+#endif
int
local_scan(int fd, uschar **return_text)
{
fd = fd; /* Keep picky compilers happy */
return_text = return_text;
-return LOCAL_SCAN_ACCEPT;
+#ifdef DLOPEN_LOCAL_SCAN
+/* local_scan_path is defined AND not the empty string */
+if (local_scan_path && *local_scan_path)
+ {
+ if (!local_scan_fn)
+ {
+ if (!load_local_scan_library())
+ {
+ char *base_msg , *error_msg , *final_msg ;
+ int final_length = -1 ;
+
+ base_msg=US"Local configuration error - local_scan() library failure\n";
+ error_msg = dlerror() ;
+
+ final_length = strlen(base_msg) + strlen(error_msg) + 1 ;
+ final_msg = (char*)malloc( final_length*sizeof(char) ) ;
+ *final_msg = '\0' ;
+
+ strcat( final_msg , base_msg ) ;
+ strcat( final_msg , error_msg ) ;
+
+ *return_text = final_msg ;
+ return LOCAL_SCAN_TEMPREJECT;
+ }
+ }
+ return local_scan_fn(fd, return_text);
+ }
+else
+#endif
+ return LOCAL_SCAN_ACCEPT;
+}
+
+#ifdef DLOPEN_LOCAL_SCAN
+
+static int load_local_scan_library(void)
+{
+/* No point in keeping local_scan_lib since we'll never dlclose() anyway */
+void *local_scan_lib = NULL;
+int (*local_scan_version_fn)(void);
+int vers_maj;
+int vers_min;
+
+local_scan_lib = dlopen(local_scan_path, RTLD_NOW);
+if (!local_scan_lib)
+ {
+ log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() library open failed - "
+ "message temporarily rejected");
+ return FALSE;
+ }
+
+local_scan_version_fn = dlsym(local_scan_lib, "local_scan_version_major");
+if (!local_scan_version_fn)
+ {
+ dlclose(local_scan_lib);
+ log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() library doesn't contain "
+ "local_scan_version_major() function - message temporarily rejected");
+ return FALSE;
+ }
+
+/* The major number is increased when the ABI is changed in a non
+ backward compatible way. */
+vers_maj = local_scan_version_fn();
+
+local_scan_version_fn = dlsym(local_scan_lib, "local_scan_version_minor");
+if (!local_scan_version_fn)
+ {
+ dlclose(local_scan_lib);
+ log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() library doesn't contain "
+ "local_scan_version_minor() function - message temporarily rejected");
+ return FALSE;
+ }
+
+/* The minor number is increased each time a new feature is added (in a
+ way that doesn't break backward compatibility) -- Marc */
+vers_min = local_scan_version_fn();
+
+
+if (vers_maj != LOCAL_SCAN_ABI_VERSION_MAJOR)
+ {
+ dlclose(local_scan_lib);
+ local_scan_lib = NULL;
+ log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() has an incompatible major"
+ "version number, you need to recompile your module for this version"
+ "of exim (The module was compiled for version %d.%d and this exim provides"
+ "ABI version %d.%d)", vers_maj, vers_min, LOCAL_SCAN_ABI_VERSION_MAJOR,
+ LOCAL_SCAN_ABI_VERSION_MINOR);
+ return FALSE;
+ }
+else if (vers_min > LOCAL_SCAN_ABI_VERSION_MINOR)
+ {
+ dlclose(local_scan_lib);
+ local_scan_lib = NULL;
+ log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() has an incompatible minor"
+ "version number, you need to recompile your module for this version"
+ "of exim (The module was compiled for version %d.%d and this exim provides"
+ "ABI version %d.%d)", vers_maj, vers_min, LOCAL_SCAN_ABI_VERSION_MAJOR,
+ LOCAL_SCAN_ABI_VERSION_MINOR);
+ return FALSE;
+ }
+
+local_scan_fn = dlsym(local_scan_lib, "local_scan");
+if (!local_scan_fn)
+ {
+ dlclose(local_scan_lib);
+ log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() library doesn't contain "
+ "local_scan() function - message temporarily rejected");
+ return FALSE;
+ }
+
+return TRUE;
}
+#endif /* DLOPEN_LOCAL_SCAN */
+
/* End of local_scan.c */
--- exim-4.71/src/globals.h.dl 2009-11-16 19:50:37.000000000 +0000
+++ exim-4.71/src/globals.h 2009-12-24 19:27:17.000000000 +0000
@@ -89,6 +89,9 @@ extern uschar *tls_verify_certificates;/
extern uschar *tls_verify_hosts; /* Mandatory client verification */
#endif
+#ifdef DLOPEN_LOCAL_SCAN
+extern uschar *local_scan_path; /* Path to local_scan() library */
+#endif
/* Input-reading functions for messages, so we can use special ones for
incoming TCP/IP. */
--- exim-4.71/src/EDITME.dl 2009-12-24 19:26:59.000000000 +0000
+++ exim-4.71/src/EDITME 2009-12-24 19:27:17.000000000 +0000
@@ -632,6 +632,20 @@ TLS_LIBS=-lssl -lcrypto
#------------------------------------------------------------------------------
+# On systems which support dynamic loading of shared libraries, Exim can
+# load a local_scan function specified in its config file instead of having
+# to be recompiled with the desired local_scan function. For a full
+# description of the API to this function, see the Exim specification.
+
+DLOPEN_LOCAL_SCAN=yes
+
+# If you set DLOPEN_LOCAL_SCAN, then you need to include -rdynamic in the
+# linker flags. Without it, the loaded .so won't be able to access any
+# functions from exim.
+
+LFLAGS=-rdynamic -ldl
+
+#------------------------------------------------------------------------------
# The default distribution of Exim contains only the plain text form of the
# documentation. Other forms are available separately. If you want to install
# the documentation in "info" format, first fetch the Texinfo documentation
exim-4.71-dynlookup.patch:
Makefile | 2
OS/Makefile-Base | 1
scripts/Configure-Makefile | 2
scripts/MakeLinks | 1
src/EDITME | 16
src/config.h.defaults | 2
src/drtables.c | 747 +++++++++++++--------------------------------
src/exim.c | 38 +-
src/expand.c | 4
src/globals.c | 15
src/globals.h | 2
src/lookupapi.h | 58 +++
src/lookups/Makefile | 231 ++++++++++++-
src/lookups/cdb.c | 29 +
src/lookups/cdb.h | 59 ---
src/lookups/dbmdb.c | 40 ++
src/lookups/dbmdb.h | 21 -
src/lookups/dnsdb.c | 23 +
src/lookups/dnsdb.h | 16
src/lookups/dsearch.c | 27 +
src/lookups/dsearch.h | 18 -
src/lookups/ibase.c | 31 +
src/lookups/ibase.h | 18 -
src/lookups/ldap.c | 66 ++-
src/lookups/ldap.h | 11
src/lookups/lsearch.c | 69 +++-
src/lookups/lsearch.h | 25 -
src/lookups/mysql.c | 43 +-
src/lookups/mysql.h | 18 -
src/lookups/nis.c | 48 +-
src/lookups/nis.h | 18 -
src/lookups/nisplus.c | 39 +-
src/lookups/nisplus.h | 17 -
src/lookups/oracle.c | 41 +-
src/lookups/oracle.h | 18 -
src/lookups/passwd.c | 23 +
src/lookups/passwd.h | 16
src/lookups/pgsql.c | 41 +-
src/lookups/pgsql.h | 18 -
src/lookups/spf.c | 25 +
src/lookups/spf.h | 26 -
src/lookups/sqlite.c | 30 +
src/lookups/sqlite.h | 18 -
src/lookups/testdb.c | 23 +
src/lookups/testdb.h | 16
src/lookups/whoson.c | 37 +-
src/lookups/whoson.h | 16
src/macros.h | 2
src/search.c | 22 -
src/structs.h | 29 -
src/verify.c | 2
51 files changed, 992 insertions(+), 1166 deletions(-)
--- NEW FILE exim-4.71-dynlookup.patch ---
diff -uNr exim-4.71/Makefile exim-4.71-dynlookup/Makefile
--- exim-4.71/Makefile 2009-11-16 19:50:36.000000000 +0000
+++ exim-4.71-dynlookup/Makefile 2009-12-24 19:54:45.000000000 +0000
@@ -81,7 +81,7 @@
clean_exim:; cd build-$(buildname); \
$(RM_COMMAND) -f *.o lookups/*.o lookups/*.a auths/*.o auths/*.a \
- routers/*.o routers/*.a transports/*.o transports/*.a
+ routers/*.o routers/*.a transports/*.o transports/*.a lookups/*.so
distclean:; $(RM_COMMAND) -rf build-*
diff -uNr exim-4.71/OS/Makefile-Base exim-4.71-dynlookup/OS/Makefile-Base
--- exim-4.71/OS/Makefile-Base 2009-06-10 08:34:04.000000000 +0100
+++ exim-4.71-dynlookup/OS/Makefile-Base 2009-12-24 19:54:45.000000000 +0000
@@ -313,6 +313,7 @@
rda.o readconf.o receive.o retry.o rewrite.o rfc2047.o \
route.o search.o sieve.o smtp_in.o smtp_out.o spool_in.o spool_out.o \
store.o string.o tls.o tod.o transport.o tree.o verify.o \
+ lookups/lf_quote.o lookups/lf_check_file.o lookups/lf_sqlperform.o \
local_scan.o $(EXIM_PERL) $(OBJ_WITH_CONTENT_SCAN) \
$(OBJ_WITH_OLD_DEMIME) $(OBJ_EXPERIMENTAL)
diff -uNr exim-4.71/scripts/Configure-Makefile exim-4.71-dynlookup/scripts/Configure-Makefile
--- exim-4.71/scripts/Configure-Makefile 2009-11-20 21:22:20.000000000 +0000
+++ exim-4.71-dynlookup/scripts/Configure-Makefile 2009-12-24 19:54:45.000000000 +0000
@@ -107,7 +107,7 @@
echo "# End of $f"
echo ""
fi
-done >> $mft || exit 1
+done | sed 's/^LOOKUP_/export LOOKUP_/' >> $mft || exit 1
# See if there is a definition of EXIM_PERL in what we have built so far.
# If so, run Perl to find the default values for PERL_CC, PERL_CCOPTS,
diff -uNr exim-4.71/scripts/MakeLinks exim-4.71-dynlookup/scripts/MakeLinks
--- exim-4.71/scripts/MakeLinks 2009-11-13 15:58:17.000000000 +0000
+++ exim-4.71-dynlookup/scripts/MakeLinks 2009-12-24 19:54:45.000000000 +0000
@@ -197,6 +197,7 @@
ln -s ../src/osfunctions.h osfunctions.h
ln -s ../src/store.h store.h
ln -s ../src/structs.h structs.h
+ln -s ../src/lookupapi.h lookupapi.h
ln -s ../src/acl.c acl.c
ln -s ../src/buildconfig.c buildconfig.c
diff -uNr exim-4.71/src/config.h.defaults exim-4.71-dynlookup/src/config.h.defaults
--- exim-4.71/src/config.h.defaults 2009-11-16 19:50:36.000000000 +0000
+++ exim-4.71-dynlookup/src/config.h.defaults 2009-12-24 19:54:45.000000000 +0000
@@ -90,6 +90,8 @@
#define LOOKUP_WILDLSEARCH
#define LOOKUP_NWILDLSEARCH
+#define LOOKUP_MODULE_DIR
+
#define MAX_FILTER_SIZE (1024*1024)
#define MAX_LOCALHOST_NUMBER 256
#define MAX_INCLUDE_SIZE (1024*1024)
diff -uNr exim-4.71/src/drtables.c exim-4.71-dynlookup/src/drtables.c
--- exim-4.71/src/drtables.c 2009-11-16 19:50:36.000000000 +0000
+++ exim-4.71-dynlookup/src/drtables.c 2009-12-24 19:54:45.000000000 +0000
@@ -10,6 +10,8 @@
#include "exim.h"
+#include <dlfcn.h>
+#include <string.h>
/* This module contains tables that define the lookup methods and drivers
that are actually included in the binary. Its contents are controlled by
@@ -17,527 +19,8 @@
all described in src/EDITME. */
-/* The OSF1 (Digital Unix) linker puts out a worrying warning if any sections
-contain no executable code. It says
-
-Warning: Linking some objects which contain exception information sections
- and some which do not. This may cause fatal runtime exception handling
- problems.
-
-As this may cause people to worry needlessly, include a dummy function here
-to stop the message from appearing. Make it call itself to stop picky compilers
-compilers complaining that it is unused, and put in a dummy argument to stop
-even pickier compilers complaining about infinite loops. */
-
-static void dummy(int x) { dummy(x-1); }
-
-
-/* Table of information about all possible lookup methods. The entries are
-always present, but the "open" and "find" functions are set to NULL for those
-that are not compiled into the binary. The "check" and "close" functions can
-be NULL for methods that don't need them. */
-
-#ifdef LOOKUP_CDB
-#include "lookups/cdb.h"
-#endif
-
-#ifdef LOOKUP_DBM
-#include "lookups/dbmdb.h"
-#endif
-
-#ifdef LOOKUP_DNSDB
-#include "lookups/dnsdb.h"
-#endif
-
-#ifdef LOOKUP_DSEARCH
-#include "lookups/dsearch.h"
-#endif
-
-#ifdef LOOKUP_IBASE
-#include "lookups/ibase.h"
-#endif
-
-#ifdef LOOKUP_LDAP
-#include "lookups/ldap.h"
-#endif
-
-#ifdef LOOKUP_LSEARCH
-#include "lookups/lsearch.h"
-#endif
-
-#ifdef LOOKUP_MYSQL
-#include "lookups/mysql.h"
-#endif
-
-#ifdef LOOKUP_NIS
-#include "lookups/nis.h"
-#endif
-
-#ifdef LOOKUP_NISPLUS
-#include "lookups/nisplus.h"
-#endif
-
-#ifdef LOOKUP_ORACLE
-#include "lookups/oracle.h"
-#endif
-
-#ifdef LOOKUP_PASSWD
-#include "lookups/passwd.h"
-#endif
-
-#ifdef LOOKUP_PGSQL
-#include "lookups/pgsql.h"
-#endif
-
-#ifdef EXPERIMENTAL_SPF
-#include "lookups/spf.h"
-#endif
-
-#ifdef LOOKUP_SQLITE
-#include "lookups/sqlite.h"
-#endif
-
-#ifdef LOOKUP_TESTDB
-#include "lookups/testdb.h"
-#endif
-
-#ifdef LOOKUP_WHOSON
-#include "lookups/whoson.h"
-#endif
-
-/* The second field in each item below is a set of bit flags:
-
- lookup_querystyle => this is a query-style lookup,
- else single-key (+ file) style
- lookup_absfile => an absolute file name is required,
- (for single-key style only)
-
-This list must be in alphabetical order of lookup name because it is
-searched by binary chop, having got rather large for the original linear
-searching. */
-
-lookup_info lookup_list[] = {
-
-/* cdb lookup in single file */
-
- {
- US"cdb", /* lookup name */
- lookup_absfile, /* uses absolute file name */
-#ifdef LOOKUP_CDB
- cdb_open, /* open function */
- cdb_check, /* check function */
- cdb_find, /* find function */
- cdb_close, /* close function */
- NULL, /* no tidy function */
- NULL /* no quoting function */
-#else
- NULL, NULL, NULL, NULL, NULL, NULL /* lookup not present */
-#endif
- },
-
-/* DBM file lookup; called "dbm" because that is the name in Exim,
-but the code is called dbmdb to avoid name clashes. */
-
- {
- US"dbm", /* lookup name */
- lookup_absfile, /* uses absolute file name */
-#ifdef LOOKUP_DBM
[...2829 lines suppressed...]
+static int
whoson_find(void *handle, uschar *filename, uschar *query, int length,
uschar **result, uschar **errmsg, BOOL *do_cache)
{
@@ -77,6 +62,22 @@
}
}
-#endif /* LOOKUP_WHOSON */
+static lookup_info _lookup_info = {
+ US"whoson", /* lookup name */
+ lookup_querystyle, /* query-style lookup */
+ whoson_open, /* open function */
+ NULL, /* check function */
+ whoson_find, /* find function */
+ NULL, /* no close function */
+ NULL, /* no tidy function */
+ NULL /* no quoting function */
+};
+
+#ifdef DYNLOOKUP
+#define whoson_lookup_module_info _lookup_module_info
+#endif
+
+static lookup_info *_lookup_list[] = { &_lookup_info };
+lookup_module_info whoson_lookup_module_info = { LOOKUP_MODULE_INFO_MAGIC, _lookup_list, 1 };
/* End of lookups/whoson.c */
diff -uNr exim-4.71/src/lookups/whoson.h exim-4.71-dynlookup/src/lookups/whoson.h
--- exim-4.71/src/lookups/whoson.h 2009-11-16 19:50:38.000000000 +0000
+++ exim-4.71-dynlookup/src/lookups/whoson.h 1970-01-01 01:00:00.000000000 +0100
@@ -1,16 +0,0 @@
-/* $Cambridge: exim/exim-src/src/lookups/whoson.h,v 1.5 2009/11/16 19:50:38 nm4 Exp $ */
-
-/*************************************************
-* Exim - an Internet mail transport agent *
-*************************************************/
-
-/* Copyright (c) University of Cambridge 1995 - 2009 */
-/* See the file NOTICE for conditions of use and distribution. */
-
-/* Header for the whoson lookup */
-
-extern void *whoson_open(uschar *, uschar **);
-extern int whoson_find(void *, uschar *, uschar *, int, uschar **, uschar **,
- BOOL *);
-
-/* End of lookups/whoson.h */
diff -uNr exim-4.71/src/macros.h exim-4.71-dynlookup/src/macros.h
--- exim-4.71/src/macros.h 2009-11-16 19:50:37.000000000 +0000
+++ exim-4.71-dynlookup/src/macros.h 2009-12-24 19:54:55.000000000 +0000
@@ -96,7 +96,7 @@
/* A macro to simplify testing bits in lookup types */
-#define mac_islookup(a,b) ((lookup_list[a].type & (b)) != 0)
+#define mac_islookup(a,b) ((lookup_list[a]->type & (b)) != 0)
/* Debugging control */
diff -uNr exim-4.71/src/search.c exim-4.71-dynlookup/src/search.c
--- exim-4.71/src/search.c 2009-11-16 19:50:37.000000000 +0000
+++ exim-4.71-dynlookup/src/search.c 2009-12-24 19:54:55.000000000 +0000
@@ -71,7 +71,7 @@
while (top > bot)
{
int mid = (top + bot)/2;
- int c = Ustrncmp(name, lookup_list[mid].name, len);
+ int c = Ustrncmp(name, lookup_list[mid]->name, len);
/* If c == 0 we have matched the incoming name with the start of the search
type name. However, some search types are substrings of others (e.g. nis and
@@ -81,9 +81,9 @@
are testing. By leaving c == 0 when the lengths are different, and doing a
> 0 test below, this all falls out correctly. */
- if (c == 0 && Ustrlen(lookup_list[mid].name) == len)
+ if (c == 0 && Ustrlen(lookup_list[mid]->name) == len)
{
- if (lookup_list[mid].find != NULL) return mid;
+ if (lookup_list[mid]->find != NULL) return mid;
search_error_message = string_sprintf("lookup type \"%.*s\" is not "
"available (not in the binary - check buildtime LOOKUP configuration)",
len, name);
@@ -237,8 +237,8 @@
if (t->right != NULL) tidyup_subtree(t->right);
if (c != NULL &&
c->handle != NULL &&
- lookup_list[c->search_type].close != NULL)
- lookup_list[c->search_type].close(c->handle);
+ lookup_list[c->search_type]->close != NULL)
+ lookup_list[c->search_type]->close(c->handle);
}
@@ -270,7 +270,7 @@
/* Call the general tidyup entry for any drivers that have one. */
for (i = 0; i < lookup_list_count; i++)
- if (lookup_list[i].tidy != NULL) (lookup_list[i].tidy)();
+ if (lookup_list[i]->tidy != NULL) (lookup_list[i]->tidy)();
if (search_reset_point != NULL) store_reset(search_reset_point);
search_reset_point = NULL;
@@ -335,7 +335,7 @@
void *handle;
tree_node *t;
search_cache *c;
-lookup_info *lk = lookup_list + search_type;
+lookup_info *lk = lookup_list[search_type];
uschar keybuffer[256];
int old_pool = store_pool;
@@ -388,7 +388,7 @@
((search_cache *)(open_bot->data.ptr))->down = NULL;
else
open_top = NULL;
- ((lookup_list + c->search_type)->close)(c->handle);
+ ((lookup_list[c->search_type])->close)(c->handle);
c->handle = NULL;
open_filecount--;
}
@@ -480,7 +480,7 @@
DEBUG(D_lookup) debug_printf("internal_search_find: file=\"%s\"\n "
"type=%s key=\"%s\"\n", filename,
- lookup_list[search_type].name, keystring);
+ lookup_list[search_type]->name, keystring);
/* Insurance. If the keystring is empty, just fail. */
@@ -511,7 +511,7 @@
like FAIL, except that search_find_defer is set so the caller can
distinguish if necessary. */
- if (lookup_list[search_type].find(c->handle, filename, keystring, keylength,
+ if (lookup_list[search_type]->find(c->handle, filename, keystring, keylength,
&data, &search_error_message, &do_cache) == DEFER)
{
search_find_defer = TRUE;
@@ -622,7 +622,7 @@
that opens real files. */
if (open_top != (tree_node *)handle &&
- lookup_list[t->name[0]-'0'].type == lookup_absfile)
+ lookup_list[t->name[0]-'0']->type == lookup_absfile)
{
search_cache *c = (search_cache *)(t->data.ptr);
tree_node *up = c->up;
diff -uNr exim-4.71/src/structs.h exim-4.71-dynlookup/src/structs.h
--- exim-4.71/src/structs.h 2009-11-16 19:50:37.000000000 +0000
+++ exim-4.71-dynlookup/src/structs.h 2009-12-24 19:54:55.000000000 +0000
@@ -322,34 +322,7 @@
/* Structure for holding information about a lookup type. */
-typedef struct lookup_info {
- uschar *name; /* e.g. "lsearch" */
- int type; /* query/singlekey/abs-file */
- void *(*open)( /* open function */
- uschar *, /* file name for those that have one */
- uschar **); /* for error message */
- BOOL (*check)( /* file checking function */
- void *, /* handle */
- uschar *, /* file name */
- int, /* modemask for file checking */
- uid_t *, /* owners for file checking */
- gid_t *, /* owngroups for file checking */
- uschar **); /* for error messages */
- int (*find)( /* find function */
- void *, /* handle */
- uschar *, /* file name or NULL */
- uschar *, /* key or query */
- int, /* length of key or query */
- uschar **, /* for returning answer */
- uschar **, /* for error message */
- BOOL *); /* to request cache cleanup */
- void (*close)( /* close function */
- void *); /* handle */
- void (*tidy)(void); /* tidy function */
- uschar *(*quote)( /* quoting function */
- uschar *, /* string to quote */
- uschar *); /* additional data from quote name */
-} lookup_info;
+#include "lookupapi.h"
/* Structure for holding information about the configured authentication
diff -uNr exim-4.71/src/verify.c exim-4.71-dynlookup/src/verify.c
--- exim-4.71/src/verify.c 2009-11-16 19:50:37.000000000 +0000
+++ exim-4.71-dynlookup/src/verify.c 2009-12-24 19:54:55.000000000 +0000
@@ -2256,7 +2256,7 @@
}
else /* Single-key style */
{
- int sep = (Ustrcmp(lookup_list[search_type].name, "iplsearch") == 0)?
+ int sep = (Ustrcmp(lookup_list[search_type]->name, "iplsearch") == 0)?
':' : '.';
insize = host_aton(cb->host_address, incoming);
host_mask(insize, incoming, mlen);
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/exim/devel/.cvsignore,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -p -r1.15 -r1.16
--- .cvsignore 3 Jan 2008 12:44:08 -0000 1.15
+++ .cvsignore 24 Dec 2009 20:11:02 -0000 1.16
@@ -1,2 +1,2 @@
sa-exim-4.2.tar.gz
-exim-4.69.tar.bz2
+exim-4.71.tar.bz2
exim-4.50-config.patch:
scripts/Configure-Makefile | 2
src/EDITME | 102 +++++++++++++++++++++++----------------------
2 files changed, 54 insertions(+), 50 deletions(-)
Index: exim-4.50-config.patch
===================================================================
RCS file: /cvs/pkgs/rpms/exim/devel/exim-4.50-config.patch,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -p -r1.9 -r1.10
--- exim-4.50-config.patch 13 Aug 2008 14:36:02 -0000 1.9
+++ exim-4.50-config.patch 24 Dec 2009 20:11:02 -0000 1.10
@@ -1,18 +1,5 @@
-diff -uNr exim-4.69.orig/scripts/Configure-Makefile exim-4.69/scripts/Configure-Makefile
---- exim-4.69.orig/scripts/Configure-Makefile 2005-09-19 15:42:31.000000000 +0100
-+++ exim-4.69/scripts/Configure-Makefile 2008-08-13 14:44:59.000000000 +0100
-@@ -131,7 +131,7 @@
-
- mv $mft $mftt
- echo "PERL_CC=`$PERL_COMMAND -MConfig -e 'print $Config{cc}'`" >>$mft
-- echo "PERL_CCOPTS=`$PERL_COMMAND -MExtUtils::Embed -e ccopts`" >>$mft
-+ echo "PERL_CCOPTS=`$PERL_COMMAND -MExtUtils::Embed -e ccopts` \$(CFLAGS)" >>$mft
- echo "PERL_LIBS=`$PERL_COMMAND -MExtUtils::Embed -e ldopts`" >>$mft
- echo "" >>$mft
- cat $mftt >> $mft
-diff -uNr exim-4.69.orig/src/EDITME exim-4.69/src/EDITME
---- exim-4.69.orig/src/EDITME 2007-01-22 16:29:54.000000000 +0000
-+++ exim-4.69/src/EDITME 2008-08-13 14:44:59.000000000 +0100
+--- exim-4.71/src/EDITME.config 2009-11-20 12:18:19.000000000 +0000
++++ exim-4.71/src/EDITME 2009-12-24 19:02:19.000000000 +0000
@@ -100,7 +100,7 @@
# /usr/local/sbin. The installation script will try to create this directory,
# and any superior directories, if they do not exist.
@@ -22,7 +9,7 @@ diff -uNr exim-4.69.orig/src/EDITME exim
#------------------------------------------------------------------------------
-@@ -116,7 +116,7 @@
+@@ -116,7 +116,7 @@ BIN_DIRECTORY=/usr/exim/bin
# don't exist. It will also install a default runtime configuration if this
# file does not exist.
@@ -31,7 +18,7 @@ diff -uNr exim-4.69.orig/src/EDITME exim
# It is possible to specify a colon-separated list of files for CONFIGURE_FILE.
# In this case, Exim will use the first of them that exists when it is run.
-@@ -134,7 +134,7 @@
+@@ -134,7 +134,7 @@ CONFIGURE_FILE=/usr/exim/configure
# owner of a local mailbox.) Specifying these values as root is very strongly
# discouraged.
@@ -40,7 +27,7 @@ diff -uNr exim-4.69.orig/src/EDITME exim
# If you specify EXIM_USER as a name, this is looked up at build time, and the
# uid number is built into the binary. However, you can specify that this
-@@ -155,7 +155,7 @@
+@@ -155,7 +155,7 @@ EXIM_USER=
# for EXIM_USER (e.g. EXIM_USER=exim), you don't need to set EXIM_GROUP unless
# you want to use a group other than the default group for the given user.
@@ -49,7 +36,7 @@ diff -uNr exim-4.69.orig/src/EDITME exim
# Many sites define a user called "exim", with an appropriate default group,
# and use
-@@ -235,7 +235,7 @@
+@@ -235,7 +235,7 @@ TRANSPORT_SMTP=yes
# This one is special-purpose, and commonly not required, so it is not
# included by default.
@@ -58,7 +45,7 @@ diff -uNr exim-4.69.orig/src/EDITME exim
#------------------------------------------------------------------------------
-@@ -244,9 +244,9 @@
+@@ -244,9 +244,9 @@ TRANSPORT_SMTP=yes
# MBX, is included only when requested. If you do not know what this is about,
# leave these settings commented out.
@@ -71,15 +58,13 @@ diff -uNr exim-4.69.orig/src/EDITME exim
#------------------------------------------------------------------------------
-@@ -261,25 +261,28 @@
- LOOKUP_DBM=yes
+@@ -262,17 +262,20 @@ LOOKUP_DBM=yes
LOOKUP_LSEARCH=yes
+ LOOKUP_DNSDB=yes
-# LOOKUP_CDB=yes
--# LOOKUP_DNSDB=yes
-# LOOKUP_DSEARCH=yes
+LOOKUP_CDB=yes
-+LOOKUP_DNSDB=yes
+LOOKUP_DSEARCH=yes
# LOOKUP_IBASE=yes
-# LOOKUP_LDAP=yes
@@ -103,15 +88,7 @@ diff -uNr exim-4.69.orig/src/EDITME exim
# LOOKUP_WHOSON=yes
# These two settings are obsolete; all three lookups are compiled when
- # LOOKUP_LSEARCH is enabled. However, we retain these for backward
- # compatibility. Setting one forces LOOKUP_LSEARCH if it is not set.
-
--# LOOKUP_WILDLSEARCH=yes
-+LOOKUP_WILDLSEARCH=yes
- # LOOKUP_NWILDLSEARCH=yes
-
-
-@@ -330,14 +333,14 @@
+@@ -343,14 +346,14 @@ EXIM_MONITOR=eximon.bin
# and the MIME ACL. Please read the documentation to learn more about these
# features.
@@ -128,7 +105,7 @@ diff -uNr exim-4.69.orig/src/EDITME exim
#------------------------------------------------------------------------------
# Compiling Exim with experimental features. These are documented in
-@@ -473,11 +476,11 @@
+@@ -486,11 +489,11 @@ FIXED_NEVER_USERS=root
# included in the Exim binary. You will then need to set up the run time
# configuration to make use of the mechanism(s) selected.
@@ -145,7 +122,7 @@ diff -uNr exim-4.69.orig/src/EDITME exim
#------------------------------------------------------------------------------
-@@ -494,7 +497,7 @@
+@@ -507,7 +510,7 @@ FIXED_NEVER_USERS=root
# one that is set in the headers_charset option. The default setting is
# defined by this setting:
@@ -154,7 +131,7 @@ diff -uNr exim-4.69.orig/src/EDITME exim
# If you are going to make use of $header_xxx expansions in your configuration
# file, or if your users are going to use them in filter files, and the normal
-@@ -514,7 +517,7 @@
+@@ -527,7 +530,7 @@ HEADERS_CHARSET="ISO-8859-1"
# the Sieve filter support. For those OS where iconv() is known to be installed
# as standard, the file in OS/Makefile-xxxx contains
#
@@ -163,7 +140,7 @@ diff -uNr exim-4.69.orig/src/EDITME exim
#
# If you are not using one of those systems, but have installed iconv(), you
# need to uncomment that line above. In some cases, you may find that iconv()
-@@ -576,10 +579,11 @@
+@@ -589,10 +592,11 @@ HEADERS_CHARSET="ISO-8859-1"
# leave these settings commented out.
# This setting is required for any TLS support (either OpenSSL or GnuTLS)
@@ -177,7 +154,7 @@ diff -uNr exim-4.69.orig/src/EDITME exim
# Uncomment these settings if you are using GnuTLS
# USE_GNUTLS=yes
-@@ -630,7 +634,7 @@
+@@ -643,7 +647,7 @@ HEADERS_CHARSET="ISO-8859-1"
# Once you have done this, "make install" will build the info files and
# install them in the directory you have defined.
@@ -186,7 +163,7 @@ diff -uNr exim-4.69.orig/src/EDITME exim
#------------------------------------------------------------------------------
-@@ -643,7 +647,7 @@
+@@ -656,7 +660,7 @@ HEADERS_CHARSET="ISO-8859-1"
# %s. This will be replaced by one of the strings "main", "panic", or "reject"
# to form the final file names. Some installations may want something like this:
@@ -195,7 +172,7 @@ diff -uNr exim-4.69.orig/src/EDITME exim
# which results in files with names /var/log/exim_mainlog, etc. The directory
# in which the log files are placed must exist; Exim does not try to create
-@@ -692,7 +696,7 @@
+@@ -705,7 +709,7 @@ EXICYCLOG_MAX=10
# files. Both the name of the command and the suffix that it adds to files
# need to be defined here. See also the EXICYCLOG_MAX configuration.
@@ -204,7 +181,7 @@ diff -uNr exim-4.69.orig/src/EDITME exim
COMPRESS_SUFFIX=gz
-@@ -700,7 +704,7 @@
+@@ -713,7 +717,7 @@ COMPRESS_SUFFIX=gz
# If the exigrep utility is fed compressed log files, it tries to uncompress
# them using this command.
@@ -213,7 +190,7 @@ diff -uNr exim-4.69.orig/src/EDITME exim
#------------------------------------------------------------------------------
-@@ -709,7 +713,7 @@
+@@ -722,7 +726,7 @@ ZCAT_COMMAND=/usr/bin/zcat
# (version 5.004 or later) installed, set EXIM_PERL to perl.o. Using embedded
# Perl costs quite a lot of resources. Only do this if you really need it.
@@ -222,7 +199,7 @@ diff -uNr exim-4.69.orig/src/EDITME exim
#------------------------------------------------------------------------------
-@@ -719,7 +723,7 @@
+@@ -732,7 +736,7 @@ ZCAT_COMMAND=/usr/bin/zcat
# that the local_scan API is made available by the linker. You may also need
# to add -ldl to EXTRALIBS so that dlopen() is available to Exim.
@@ -231,7 +208,7 @@ diff -uNr exim-4.69.orig/src/EDITME exim
#------------------------------------------------------------------------------
-@@ -729,7 +733,7 @@
+@@ -742,7 +746,7 @@ ZCAT_COMMAND=/usr/bin/zcat
# support, which is intended for use in conjunction with the SMTP AUTH
# facilities, is included only when requested by the following setting:
@@ -240,7 +217,7 @@ diff -uNr exim-4.69.orig/src/EDITME exim
# You probably need to add -lpam to EXTRALIBS, and in some releases of
# GNU/Linux -ldl is also needed.
-@@ -797,7 +801,7 @@
+@@ -810,7 +814,7 @@ ZCAT_COMMAND=/usr/bin/zcat
# group. Once you have installed saslauthd, you should arrange for it to be
# started by root at boot time.
@@ -249,7 +226,7 @@ diff -uNr exim-4.69.orig/src/EDITME exim
#------------------------------------------------------------------------------
-@@ -810,9 +814,9 @@
+@@ -823,9 +827,9 @@ ZCAT_COMMAND=/usr/bin/zcat
# You may well also have to specify a local "include" file and an additional
# library for TCP wrappers, so you probably need something like this:
#
@@ -262,7 +239,7 @@ diff -uNr exim-4.69.orig/src/EDITME exim
#
# but of course there may need to be other things in CFLAGS and EXTRALIBS_EXIM
# as well.
-@@ -857,13 +861,13 @@
+@@ -870,13 +874,13 @@ SYSTEM_ALIASES_FILE=/etc/aliases
# is "yes", as well as supporting line editing, a history of input lines in the
# current run is maintained.
@@ -278,25 +255,28 @@ diff -uNr exim-4.69.orig/src/EDITME exim
###############################################################################
# THINGS YOU ALMOST NEVER NEED TO MENTION #
-@@ -884,11 +888,12 @@
+@@ -897,13 +901,13 @@ SYSTEM_ALIASES_FILE=/etc/aliases
# haven't got Perl, Exim will still build and run; you just won't be able to
# use those utilities.
-# CHOWN_COMMAND=/usr/bin/chown
-# CHGRP_COMMAND=/usr/bin/chgrp
+-# CHMOD_COMMAND=/usr/bin/chmod
-# MV_COMMAND=/bin/mv
-# RM_COMMAND=/bin/rm
+-# TOUCH_COMMAND=/usr/bin/touch
-# PERL_COMMAND=/usr/bin/perl
+CHOWN_COMMAND=/bin/chown
+CHGRP_COMMAND=/bin/chgrp
-+
-+MV_COMAND=/bin/mv
++CHMOD_COMMAND=/bin/chmod
++MV_COMMAND=/bin/mv
+RM_COMMAND=/bin/rm
++TOUCH_COMMAND=/bin/touch
+PERL_COMMAND=/usr/bin/perl
#------------------------------------------------------------------------------
-@@ -1082,7 +1087,7 @@
+@@ -1097,7 +1101,7 @@ TMPDIR="/tmp"
# (process id) to a file so that it can easily be identified. The path of the
# file can be specified here. Some installations may want something like this:
@@ -305,3 +285,14 @@ diff -uNr exim-4.69.orig/src/EDITME exim
# If PID_FILE_PATH is not defined, Exim writes a file in its spool directory
# using the name "exim-daemon.pid".
+--- exim-4.71/scripts/Configure-Makefile.config 2009-11-20 21:22:20.000000000 +0000
++++ exim-4.71/scripts/Configure-Makefile 2009-12-24 18:59:48.000000000 +0000
+@@ -137,7 +137,7 @@ if [ "${EXIM_PERL}" != "" ] ; then
+
+ mv $mft $mftt
+ echo "PERL_CC=`$PERL_COMMAND -MConfig -e 'print $Config{cc}'`" >>$mft
+- echo "PERL_CCOPTS=`$PERL_COMMAND -MExtUtils::Embed -e ccopts`" >>$mft
++ echo "PERL_CCOPTS=`$PERL_COMMAND -MExtUtils::Embed -e ccopts` \$(CFLAGS)" >>$mft
+ echo "PERL_LIBS=`$PERL_COMMAND -MExtUtils::Embed -e ldopts`" >>$mft
+ echo "" >>$mft
+ cat $mftt >> $mft
Index: exim.spec
===================================================================
RCS file: /cvs/pkgs/rpms/exim/devel/exim.spec,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -p -r1.70 -r1.71
--- exim.spec 4 Dec 2009 02:06:41 -0000 1.70
+++ exim.spec 24 Dec 2009 20:11:03 -0000 1.71
@@ -11,8 +11,8 @@
Summary: The exim mail transfer agent
Name: exim
-Version: 4.69
-Release: 19%{?dist}
+Version: 4.71
+Release: 1%{?dist}
License: GPLv2+
Url: http://www.exim.org/
Group: System Environment/Daemons
@@ -44,17 +44,15 @@ Patch8: exim-4.24-libdir.patch
Patch12: exim-4.33-cyrus.patch
Patch13: exim-4.43-pamconfig.patch
Patch14: exim-4.50-spamdconf.patch
-Patch15: exim-4.52-dynamic-pcre.patch
-Patch18: exim-4.62-dlopen-localscan.patch
+Patch18: exim-4.71-dlopen-localscan.patch
Patch19: exim-4.63-procmail.patch
Patch20: exim-4.63-allow-filter.patch
Patch21: exim-4.63-localhost-is-local.patch
Patch22: exim-4.66-greylist-conf.patch
Patch23: exim-4.67-smarthost-config.patch
-Patch24: exim-4.69-dynlookup.patch
+Patch24: exim-4.71-dynlookup.patch
Patch25: exim-4.69-dynlookup-config.patch
Patch26: exim-4.69-strictaliasing.patch
-Patch27: exim-4.69-expand-spamd.patch
Requires: /etc/pki/tls/certs /etc/pki/tls/private
Requires: /etc/aliases
@@ -176,7 +174,6 @@ greylisting unconditional.
%patch12 -p1 -b .cyrus
%patch13 -p1 -b .pam
%patch14 -p1 -b .spamd
-%patch15 -p1 -b .pcre
%patch18 -p1 -b .dl
%patch19 -p1 -b .procmail
%patch20 -p1 -b .filter
@@ -186,7 +183,6 @@ greylisting unconditional.
%patch24 -p1 -b .dynlookup
%patch25 -p1 -b .dynconfig
%patch26 -p1 -b .strictaliasing
-%patch27 -p1 -b .expandspamd
cp src/EDITME Local/Makefile
sed -i 's@^# LOOKUP_MODULE_DIR=.*@LOOKUP_MODULE_DIR=%{_libdir}/exim/%{version}-%{release}/lookups@' Local/Makefile
@@ -487,6 +483,9 @@ test "$1" = 0 || %{_initrddir}/clamd.ex
%{_sysconfdir}/cron.daily/greylist-tidy.sh
%changelog
+* Thu Dec 24 2009 David Woodhouse <David.Woodhouse at intel.com> - 4.69-20
+- Update to 4.71
+
* Fri Dec 4 2009 Stepan Kasal <skasal at redhat.com> - 4.69-19
- rebuild against perl 5.10.1
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/exim/devel/sources,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -p -r1.15 -r1.16
--- sources 3 Jan 2008 12:44:08 -0000 1.15
+++ sources 24 Dec 2009 20:11:03 -0000 1.16
@@ -1,2 +1,2 @@
ad76f73c6b3d01caa88078e3e622745a sa-exim-4.2.tar.gz
-6f29f073328c858d8554b08cc0c3c2be exim-4.69.tar.bz2
+f9c5a2d94b5bb132d06e2fff85bef75e exim-4.71.tar.bz2
--- exim-4.52-dynamic-pcre.patch DELETED ---
--- exim-4.62-dlopen-localscan.patch DELETED ---
--- exim-4.69-dynlookup.patch DELETED ---
--- exim-4.69-expand-spamd.patch DELETED ---
More information about the fedora-extras-commits
mailing list