-extern BOOL arc_init(void);
/*************************************************
* Exim - an Internet mail transport agent *
*************************************************/
#include <sys/time.h>
-#ifdef EXIM_PERL
-extern gstring *call_perl_cat(gstring *, uschar **, uschar *,
- uschar **) WARN_UNUSED_RESULT;
-extern void cleanup_perl(void);
-extern uschar *init_perl(uschar *);
-#endif
-
-
#ifndef DISABLE_TLS
extern const char *
std_dh_prime_default(void);
extern int tls_server_start(uschar **);
extern void tls_shutdown_wr(void *);
extern BOOL tls_smtp_buffered(void);
+extern void tls_turnaround(int, const uschar *, int);
extern int tls_ungetc(int);
#if defined(EXIM_HAVE_INOTIFY) || defined(EXIM_HAVE_KEVENT)
extern void tls_watch_discard_event(int);
extern void add_driver_info(driver_info **, const driver_info *, size_t);
-#ifdef EXPERIMENTAL_ARC
-# ifdef SUPPORT_DMARC
-extern gstring *arc_dmarc_hist_append(gstring *);
-# endif
-extern void *arc_ams_setup_sign_bodyhash(void);
-extern const uschar *arc_header_feed(gstring *, BOOL);
-extern gstring *arc_sign(const uschar *, gstring *, uschar **);
-extern void arc_sign_init(void);
-extern const uschar *acl_verify_arc(void);
-extern uschar * fn_arc_domains(void);
-#endif
-
extern void assert_no_variables(void *, int, const char *, int);
-extern int auth_call_pam(const uschar *, uschar **);
extern int auth_call_pwcheck(uschar *, uschar **);
-extern int auth_call_radius(const uschar *, uschar **);
extern int auth_call_saslauthd(const uschar *, const uschar *,
const uschar *, const uschar *, uschar **);
extern int auth_check_serv_cond(auth_instance *);
extern gstring * auth_show_supported(gstring *);
extern uschar *authenticator_current_name(void);
-#ifdef EXPERIMENTAL_ARC
-extern gstring *authres_arc(gstring *);
-#endif
extern gstring *authres_smtpauth(gstring *);
extern uschar *b64encode(const uschar *, int);
extern void modify_variable(uschar *, void *);
extern BOOL fd_ready(int, time_t);
-
-extern int filter_interpret(const uschar *, int, address_item **, uschar **);
-extern BOOL filter_personal(string_item *, BOOL);
extern BOOL filter_runtest(int, const uschar *, BOOL, BOOL);
-extern BOOL filter_system_interpret(address_item **, uschar **);
extern uschar * fn_hdrs_added(void);
extern void force_fd(int, int);
extern int match_address_list(const uschar *, BOOL, BOOL, const uschar **,
unsigned int *, int, int, const uschar **);
extern int match_address_list_basic(const uschar *, const uschar **, int);
-extern int match_check_list(const uschar **, int, tree_node **, unsigned int **,
- int(*)(void *, const uschar *, const uschar **, uschar **), void *, int,
- const uschar *, const uschar **);
-extern int match_isinlist(const uschar *, const uschar **, int, tree_node **,
- unsigned int *, int, BOOL, const uschar **);
+extern int match_check_list(const uschar * const *, int, tree_node **,
+ unsigned int **, int(*)(void *, const uschar *,
+ const uschar **, uschar **),
+ void *, int, const uschar *, const uschar **);
+extern int match_isinlist(const uschar *, const uschar * const *, int,
+ tree_node **, unsigned int *, int, BOOL, const uschar **);
extern int match_check_string(const uschar *, const uschar *, int, mcs_flags,
const uschar **);
extern BOOL readconf_depends(driver_instance *, uschar *);
extern void readconf_driver_init(driver_instance **, driver_info **, int,
void *, int, optionlist *, int, const uschar *);
-extern const uschar *readconf_find_option(void *);
+extern const uschar *readconf_find_option(const void *);
extern void readconf_main(BOOL);
extern void readconf_options_from_list(optionlist *, unsigned, const uschar *, uschar *);
extern BOOL readconf_print(const uschar *, const uschar *, BOOL);
extern void sha1_end(hctx *, const uschar *, int, uschar *);
extern void sha1_mid(hctx *, const uschar *);
extern void sha1_start(hctx *);
-extern int sieve_interpret(const uschar *, int, const sieve_block *,
- address_item **, uschar **);
extern void sigalrm_handler(int);
extern void single_queue_run(qrunner *, const uschar *, const uschar *);
extern int smtp_boundsock(smtp_connect_args *);
extern FILE *spool_mbox(unsigned long *, const uschar *, uschar **);
#endif
extern void spool_clear_header_globals(void);
+extern int spool_has_one_undelivered_dom(const uschar *);
extern BOOL spool_move_message(const uschar *, const uschar *, const uschar *, const uschar *);
extern int spool_open_datafile(const uschar *);
extern int spool_open_temp(uschar *);
extern gstring *string_append(gstring *, int, ...) WARN_UNUSED_RESULT;
extern gstring *string_append_listele(gstring *, uschar, const uschar *) WARN_UNUSED_RESULT;
extern gstring *string_append_listele_n(gstring *, uschar, const uschar *, unsigned) WARN_UNUSED_RESULT;
+extern gstring *string_append_listele_fmt(gstring *, uschar, BOOL, const char *, ...) WARN_UNUSED_RESULT;
extern gstring *string_append2_listele_n(gstring *, const uschar *, const uschar *, unsigned) WARN_UNUSED_RESULT;
extern uschar *string_base62_32(unsigned long int);
extern uschar *string_base62_64(unsigned long int);
static inline uschar
gstring_last_char(gstring * g)
{
-return g->s[g->ptr-1];
+return g && g->ptr > 0 ? g->s[g->ptr-1] : '\0';
}
static inline void
static inline gstring *
gstring_append(gstring * dest, gstring * item)
{
-return item ? string_catn(dest, item->s, item->ptr) : dest;
+return item
+ ? dest ? string_catn(dest, item->s, item->ptr) : item
+ : dest;
}
}
/******************************************************************************/
-/* Taint-checked file opens */
+/* Taint-checked file opens. Return values/errno per open(2). */
static inline int
exim_open2(const char *pathname, int flags)
exim_fork(const unsigned char * purpose)
{
pid_t pid;
-DEBUG(D_any) debug_printf("%s forking for %s\n", process_purpose, purpose);
+DEBUG(D_any)
+ debug_printf_indent("%s forking for %s\n", process_purpose, purpose);
if ((pid = fork()) == 0)
{
f.daemon_listen = FALSE;
process_purpose = purpose;
- DEBUG(D_any) debug_printf("postfork: %s\n", purpose);
+ DEBUG(D_any) debug_printf_indent("postfork: %s\n", purpose);
}
else
{
testharness_pause_ms(100); /* let child work */
- DEBUG(D_any) debug_printf("%s forked for %s: %d\n", process_purpose, purpose, (int)pid);
+ DEBUG(D_any) debug_printf_indent("%s forked for %s: %d\n",
+ process_purpose, purpose, (int)pid);
}
return pid;
}