git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
OpenSSL: unbreak build with older library version
[exim.git]
/
src
/
src
/
drtables.c
diff --git
a/src/src/drtables.c
b/src/src/drtables.c
index 363c07bf49c7c6a17a0706a5b16a49e2c35f1394..30eb855e3695762cd75a43ca3cca1e5f26c0b6df 100644
(file)
--- a/
src/src/drtables.c
+++ b/
src/src/drtables.c
@@
-2,6
+2,7
@@
* Exim - an Internet mail transport agent *
*************************************************/
* Exim - an Internet mail transport agent *
*************************************************/
+/* Copyright (c) The Exim Maintainers 2020 - 2022 */
/* Copyright (c) University of Cambridge 1995 - 2018 */
/* See the file NOTICE for conditions of use and distribution. */
/* Copyright (c) University of Cambridge 1995 - 2018 */
/* See the file NOTICE for conditions of use and distribution. */
@@
-517,7
+518,7
@@
static struct lookupmodulestr *lookupmodules = NULL;
static void
addlookupmodule(void *dl, struct lookup_module_info *info)
{
static void
addlookupmodule(void *dl, struct lookup_module_info *info)
{
-struct lookupmodulestr *p = store_get(sizeof(struct lookupmodulestr),
FALSE
);
+struct lookupmodulestr *p = store_get(sizeof(struct lookupmodulestr),
GET_UNTAINTED
);
p->dl = dl;
p->info = info;
p->dl = dl;
p->info = info;
@@
-601,7
+602,7
@@
extern lookup_module_info pgsql_lookup_module_info;
#if defined(LOOKUP_REDIS) && LOOKUP_REDIS!=2
extern lookup_module_info redis_lookup_module_info;
#endif
#if defined(LOOKUP_REDIS) && LOOKUP_REDIS!=2
extern lookup_module_info redis_lookup_module_info;
#endif
-#if defined(
EXPERIMENTAL
_LMDB)
+#if defined(
LOOKUP
_LMDB)
extern lookup_module_info lmdb_lookup_module_info;
#endif
#if defined(SUPPORT_SPF)
extern lookup_module_info lmdb_lookup_module_info;
#endif
#if defined(SUPPORT_SPF)
@@
-617,6
+618,8
@@
extern lookup_module_info testdb_lookup_module_info;
extern lookup_module_info whoson_lookup_module_info;
#endif
extern lookup_module_info whoson_lookup_module_info;
#endif
+extern lookup_module_info readsock_lookup_module_info;
+
void
init_lookup_list(void)
void
init_lookup_list(void)
@@
-695,7
+698,7
@@
addlookupmodule(NULL, &pgsql_lookup_module_info);
addlookupmodule(NULL, &redis_lookup_module_info);
#endif
addlookupmodule(NULL, &redis_lookup_module_info);
#endif
-#ifdef
EXPERIMENTAL
_LMDB
+#ifdef
LOOKUP
_LMDB
addlookupmodule(NULL, &lmdb_lookup_module_info);
#endif
addlookupmodule(NULL, &lmdb_lookup_module_info);
#endif
@@
-715,6
+718,8
@@
addlookupmodule(NULL, &testdb_lookup_module_info);
addlookupmodule(NULL, &whoson_lookup_module_info);
#endif
addlookupmodule(NULL, &whoson_lookup_module_info);
#endif
+addlookupmodule(NULL, &readsock_lookup_module_info);
+
#ifdef LOOKUP_MODULE_DIR
if (!(dd = exim_opendir(LOOKUP_MODULE_DIR)))
{
#ifdef LOOKUP_MODULE_DIR
if (!(dd = exim_opendir(LOOKUP_MODULE_DIR)))
{
@@
-723,15
+728,15
@@
if (!(dd = exim_opendir(LOOKUP_MODULE_DIR)))
}
else
{
}
else
{
- const pcre
*
regex_islookupmod = regex_must_compile(
- US"\\." DYNLIB_FN_EXT "$",
FALSE
, TRUE);
+ const pcre
2_code *
regex_islookupmod = regex_must_compile(
+ US"\\." DYNLIB_FN_EXT "$",
MCS_NOFLAGS
, TRUE);
DEBUG(D_lookup) debug_printf("Loading lookup modules from %s\n", LOOKUP_MODULE_DIR);
while ((ent = readdir(dd)))
{
DEBUG(D_lookup) debug_printf("Loading lookup modules from %s\n", LOOKUP_MODULE_DIR);
while ((ent = readdir(dd)))
{
- char *name = ent->d_name;
+ char *
name = ent->d_name;
int len = (int)strlen(name);
int len = (int)strlen(name);
- if (
pcre_exec(regex_islookupmod, NULL, name, len, 0, PCRE_EOPT, NULL, 0) >= 0
)
+ if (
regex_match(regex_islookupmod, US name, len, NULL)
)
{
int pathnamelen = len + (int)strlen(LOOKUP_MODULE_DIR) + 2;
void *dl;
{
int pathnamelen = len + (int)strlen(LOOKUP_MODULE_DIR) + 2;
void *dl;
@@
-759,10
+764,10
@@
else
}
/* FreeBSD nsdispatch() can trigger dlerror() errors about
}
/* FreeBSD nsdispatch() can trigger dlerror() errors about
-
*
_nss_cache_cycle_prevention_function; we need to clear the dlerror()
- * state before calling dlsym(), so that any error afterwards only
- * comes from dlsym().
- */
+ _nss_cache_cycle_prevention_function; we need to clear the dlerror()
+ state before calling dlsym(), so that any error afterwards only comes
+ from dlsym(). */
+
errormsg = dlerror();
info = (struct lookup_module_info*) dlsym(dl, "_lookup_module_info");
errormsg = dlerror();
info = (struct lookup_module_info*) dlsym(dl, "_lookup_module_info");