*************************************************/
/* Copyright (c) University of Cambridge 1995 - 2018 */
*************************************************/
/* Copyright (c) University of Cambridge 1995 - 2018 */
/* See the file NOTICE for conditions of use and distribution. */
/* This module contains code for extracting addresses from a forwarding list
/* See the file NOTICE for conditions of use and distribution. */
/* This module contains code for extracting addresses from a forwarding list
-while (isspace(*s)) s++; /* Skips initial blank lines */
-if (match_tag(s, CUS"# exim filter")) return FILTER_EXIM;
- else if (match_tag(s, CUS"# sieve filter")) return FILTER_SIEVE;
- else return FILTER_FORWARD;
+Uskip_whitespace(&s); /* Skips initial blank lines */
+if (match_tag(s, CUS"# exim filter")) return FILTER_EXIM;
+else if (match_tag(s, CUS"# sieve filter")) return FILTER_SIEVE;
+else return FILTER_FORWARD;
-rda_get_file_contents(redirect_block *rdata, int options, uschar **error,
+rda_get_file_contents(const redirect_block *rdata, int options, uschar **error,
/* Reading a file is a form of expansion; we wish to deny attackers the
capability to specify the file name. */
/* Reading a file is a form of expansion; we wish to deny attackers the
capability to specify the file name. */
-rda_extract(redirect_block *rdata, int options, uschar *include_directory,
+rda_extract(const redirect_block *rdata, int options, uschar *include_directory,
uschar *sieve_vacation_directory, uschar *sieve_enotify_mailto_owner,
uschar *sieve_useraddress, uschar *sieve_subaddress,
address_item **generated, uschar **error, error_block **eblockp,
int *filtertype)
{
uschar *sieve_vacation_directory, uschar *sieve_enotify_mailto_owner,
uschar *sieve_useraddress, uschar *sieve_subaddress,
address_item **generated, uschar **error, error_block **eblockp,
int *filtertype)
{
exim_setugid(ugid->uid, ugid->gid, FALSE, rname);
/* Addresses can get rewritten in filters; if we are not root or the exim
exim_setugid(ugid->uid, ugid->gid, FALSE, rname);
/* Addresses can get rewritten in filters; if we are not root or the exim
*error = string_sprintf("internal problem in %s: failure to transfer "
"data from subprocess: status=%04x%s%s%s", rname,
status, readerror,
*error = string_sprintf("internal problem in %s: failure to transfer "
"data from subprocess: status=%04x%s%s%s", rname,
status, readerror,
- (*error == NULL)? US"" : US": error=",
- (*error == NULL)? US"" : *error);
+ *error ? US": error=" : US"",
+ *error ? *error : US"");
log_write(0, LOG_MAIN|LOG_PANIC, "%s", *error);
}
else if (status != 0)
log_write(0, LOG_MAIN|LOG_PANIC, "%s", *error);
}
else if (status != 0)