X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/4a7dca52352d0976f200b89a50825433b7551554..995e599afd3e6468d3396fb351ed0cd0ea212779:/src/src/functions.h diff --git a/src/src/functions.h b/src/src/functions.h index e6b78dbe6..5ffb23d1e 100644 --- a/src/src/functions.h +++ b/src/src/functions.h @@ -53,31 +53,38 @@ extern uschar * tls_cert_fprt_sha256(void *); extern void tls_clean_env(void); extern BOOL tls_client_start(client_conn_ctx *, smtp_connect_args *, void *, tls_support *, uschar **); +extern void tls_client_creds_reload(BOOL); extern void tls_close(void *, int); extern BOOL tls_could_read(void); extern void tls_daemon_init(void); +extern void tls_daemon_tick(void); extern BOOL tls_dropprivs_validate_require_cipher(BOOL); extern BOOL tls_export_cert(uschar *, size_t, void *); extern int tls_feof(void); extern int tls_ferror(void); +extern uschar *tls_field_from_dn(uschar *, const uschar *); extern void tls_free_cert(void **); extern int tls_getc(unsigned); extern uschar *tls_getbuf(unsigned *); extern void tls_get_cache(void); extern BOOL tls_import_cert(const uschar *, void **); +extern BOOL tls_is_name_for_cert(const uschar *, void *); +# ifdef USE_OPENSSL +extern BOOL tls_openssl_options_parse(uschar *, long *); +# endif extern int tls_read(void *, uschar *, size_t); -extern int tls_server_start(const uschar *, uschar **); +extern int tls_server_start(uschar **); +extern void tls_shutdown_wr(void *); extern BOOL tls_smtp_buffered(void); extern int tls_ungetc(int); +#if defined(EXIM_HAVE_INOTIFY) || defined(EXIM_HAVE_KEVENT) +extern void tls_watch_discard_event(int); +extern void tls_watch_invalidate(void); +#endif extern int tls_write(void *, const uschar *, size_t, BOOL); extern uschar *tls_validate_require_cipher(void); extern void tls_version_report(FILE *); -# ifdef USE_OPENSSL -extern BOOL tls_openssl_options_parse(uschar *, long *); -# endif -extern uschar * tls_field_from_dn(uschar *, const uschar *); -extern BOOL tls_is_name_for_cert(const uschar *, void *); # ifdef SUPPORT_DANE extern int tlsa_lookup(const host_item *, dns_answer *, BOOL); @@ -182,7 +189,7 @@ extern void debug_print_argv(const uschar **); extern void debug_print_ids(uschar *); extern void debug_printf_indent(const char *, ...) PRINTF_FUNCTION(1,2); extern void debug_print_string(uschar *); -extern void debug_print_tree(tree_node *); +extern void debug_print_tree(const char *, tree_node *); extern void debug_vprintf(int, const char *, va_list); extern void debug_print_socket(int); @@ -198,7 +205,6 @@ extern void deliver_set_expansions(address_item *); extern int deliver_split_address(address_item *); extern void deliver_succeeded(address_item *); -extern uschar *deliver_get_sender_address (uschar *id); extern void delivery_re_exec(int); extern void die_tainted(const uschar *, const uschar *, int); @@ -235,6 +241,7 @@ extern void msg_event_raise(const uschar *, const address_item *); extern int exim_chown_failure(int, const uschar*, uid_t, gid_t); extern const uschar * exim_errstr(int); extern void exim_exit(int) NORETURN; +extern void exim_gettime(struct timeval *); extern void exim_nullstd(void); extern void exim_setugid(uid_t, gid_t, BOOL, uschar *); extern void exim_underbar_exit(int) NORETURN; @@ -367,9 +374,9 @@ extern int parse_forward_list(uschar *, int, address_item **, uschar **, const uschar *, uschar *, error_block **); extern uschar *parse_find_address_end(uschar *, BOOL); extern uschar *parse_find_at(uschar *); -extern const uschar *parse_fix_phrase(const uschar *, int, uschar *, int); +extern const uschar *parse_fix_phrase(const uschar *, int); extern uschar *parse_message_id(uschar *, uschar **, uschar **); -extern const uschar *parse_quote_2047(const uschar *, int, uschar *, uschar *, int, BOOL); +extern const uschar *parse_quote_2047(const uschar *, int, uschar *, BOOL); extern uschar *parse_date_time(uschar *str, time_t *t); extern int vaguely_random_number(int); #ifndef DISABLE_TLS @@ -448,7 +455,7 @@ extern void route_init(void); extern gstring * route_show_supported(gstring *); extern void route_tidyup(void); -extern uschar *search_args(int, uschar *, uschar *, uschar **); +extern uschar *search_args(int, uschar *, uschar *, uschar **, const uschar *); extern uschar *search_find(void *, const uschar *, uschar *, int, const uschar *, int, int, int *, const uschar *); extern int search_findtype(const uschar *, int); @@ -507,6 +514,7 @@ extern BOOL spool_move_message(uschar *, uschar *, uschar *, uschar *); extern int spool_open_datafile(uschar *); extern int spool_open_temp(uschar *); extern int spool_read_header(uschar *, BOOL, BOOL); +extern uschar *spool_sender_from_msgid(const uschar *); extern int spool_write_header(uschar *, int, uschar **); extern int stdin_getc(unsigned); extern int stdin_feof(void); @@ -531,7 +539,7 @@ extern int string_is_ip_address(const uschar *, int *); #ifdef SUPPORT_I18N extern BOOL string_is_utf8(const uschar *); #endif -extern const uschar *string_printing2(const uschar *, BOOL); +extern const uschar *string_printing2(const uschar *, int); extern uschar *string_split_message(uschar *); extern uschar *string_unprinting(uschar *); #ifdef SUPPORT_I18N @@ -553,10 +561,10 @@ extern BOOL string_format_trc(uschar *, int, const uschar *, unsigned, extern gstring *string_vformat_trc(gstring *, const uschar *, unsigned, unsigned, unsigned, const char *, va_list); -#define string_open_failed(eno, fmt, ...) \ - string_open_failed_trc(eno, US __FUNCTION__, __LINE__, fmt, __VA_ARGS__) -extern uschar *string_open_failed_trc(int, const uschar *, unsigned, - const char *, ...) PRINTF_FUNCTION(4,5); +#define string_open_failed(fmt, ...) \ + string_open_failed_trc(US __FUNCTION__, __LINE__, fmt, __VA_ARGS__) +extern uschar *string_open_failed_trc(const uschar *, unsigned, + const char *, ...) PRINTF_FUNCTION(3,4); #define string_nextinlist(lp, sp, b, l) \ string_nextinlist_trc((lp), (sp), (b), (l), US __FUNCTION__, __LINE__) @@ -576,7 +584,7 @@ extern void tls_modify_variables(tls_support *); extern uschar *tod_stamp(int); extern BOOL transport_check_waiting(const uschar *, const uschar *, int, uschar *, - BOOL *, oicf, void*); + oicf, void*); extern void transport_init(void); extern void transport_do_pass_socket(const uschar *, const uschar *, const uschar *, uschar *, int); @@ -772,9 +780,9 @@ string_copy_trc(const uschar * s, const char * func, int line) /* Simple string-copy functions maintaining the taint */ #define string_copyn(s, len) \ - string_copyn_taint_trc((s), (len), is_tainted(s), __FUNCTION__, __LINE__) + string_copyn_trc((s), (len), __FUNCTION__, __LINE__) #define string_copy(s) \ - string_copy_taint_trc((s), is_tainted(s), __FUNCTION__, __LINE__) + string_copy_trc((s), __FUNCTION__, __LINE__) /************************************************* @@ -1104,6 +1112,7 @@ log_write(0, LOG_MAIN|LOG_PANIC, "Tainted filename '%s'", pathname); errno = EACCES; return -1; } +#ifdef EXIM_HAVE_OPENAT static inline int exim_openat(int dirfd, const char *pathname, int flags) { @@ -1120,6 +1129,7 @@ log_write(0, LOG_MAIN|LOG_PANIC, "Tainted filename '%s'", pathname); errno = EACCES; return -1; } +#endif static inline FILE * exim_fopen(const char *pathname, const char *mode)