* Exim - an Internet mail transport agent *
*************************************************/
+/* Copyright (c) The Exim Maintainers 2020 - 2022 */
/* Copyright (c) University of Cambridge 1995 - 2015 */
-/* Copyright (c) The Exim Maintainers 2020 */
/* See the file NOTICE for conditions of use and distribution. */
/* The idea for this code came from Matthew Byng-Maddick, but his original has
DIR * dp = exim_opendir(dirname);
if (!dp)
{
- int save_errno = errno;
- *errmsg = string_open_failed(errno, "%s for directory search", dirname);
- errno = save_errno;
+ *errmsg = string_open_failed("%s for directory search", dirname);
return NULL;
}
closedir(dp);
uschar * filename;
unsigned flags = 0;
-handle = handle; /* Keep picky compilers happy */
-length = length;
-do_cache = do_cache;
-
if (Ustrchr(keystring, '/') != 0)
{
*errmsg = string_sprintf("key for dsearch lookup contains a slash: %s",
{
/* Since the filename exists in the filesystem, we can return a
non-tainted result. */
- *result = string_copy_taint(flags & RET_FULL ? filename : keystring, FALSE);
+ *result = string_copy_taint(flags & RET_FULL ? filename : keystring, GET_UNTAINTED);
return OK;
}
#include "../version.h"
-void
-dsearch_version_report(FILE *f)
+gstring *
+dsearch_version_report(gstring * g)
{
#ifdef DYNLOOKUP
-fprintf(f, "Library version: dsearch: Exim version %s\n", EXIM_VERSION_STR);
+g = string_fmt_append(g, "Library version: dsearch: Exim version %s\n", EXIM_VERSION_STR);
#endif
+return g;
}