X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/0cbf2b821bb13da0268556d0e30ea627d5592c60..48f1c8532119577336c1aa1c91a50b57ebecdaf8:/src/src/functions.h diff --git a/src/src/functions.h b/src/src/functions.h index bd43934f0..260b365df 100644 --- a/src/src/functions.h +++ b/src/src/functions.h @@ -2,7 +2,7 @@ * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2015 */ +/* Copyright (c) University of Cambridge 1995 - 2016 */ /* See the file NOTICE for conditions of use and distribution. */ @@ -39,6 +39,7 @@ extern uschar * tls_cert_subject(void *, uschar * mod); extern uschar * tls_cert_subject_altname(void *, uschar * mod); extern uschar * tls_cert_version(void *, uschar * mod); +extern uschar * tls_cert_der_b64(void * cert); extern uschar * tls_cert_fprt_md5(void *); extern uschar * tls_cert_fprt_sha1(void *); extern uschar * tls_cert_fprt_sha256(void *); @@ -70,7 +71,7 @@ extern uschar * tls_field_from_dn(uschar *, const uschar *); extern BOOL tls_is_name_for_cert(const uschar *, void *); # ifdef EXPERIMENTAL_DANE -extern int tlsa_lookup(const host_item *, dns_answer *, BOOL, BOOL *); +extern int tlsa_lookup(const host_item *, dns_answer *, BOOL); # endif #endif /*SUPPORT_TLS*/ @@ -84,8 +85,6 @@ extern int acl_eval(int, uschar *, uschar **, uschar **); extern tree_node *acl_var_create(uschar *); extern void acl_var_write(uschar *, uschar *, void *); -extern uschar *auth_b64encode(uschar *, int); -extern int auth_b64decode(uschar *, uschar **); extern int auth_call_pam(const uschar *, uschar **); extern int auth_call_pwcheck(uschar *, uschar **); extern int auth_call_radius(const uschar *, uschar **); @@ -99,6 +98,9 @@ extern int auth_get_no64_data(uschar **, uschar *); extern uschar *auth_xtextencode(uschar *, int); extern int auth_xtextdecode(uschar *, uschar **); +extern uschar *b64encode(uschar *, int); +extern int b64decode(uschar *, uschar **); +extern int bdat_getc(void); extern void bits_clear(unsigned int *, size_t, int *); extern void bits_set(unsigned int *, size_t, int *); @@ -107,6 +109,7 @@ extern int check_host(void *, const uschar *, const uschar **, uschar **); extern uschar **child_exec_exim(int, BOOL, int *, BOOL, int, ...); extern pid_t child_open_uid(const uschar **, const uschar **, int, uid_t *, gid_t *, int *, int *, uschar *, BOOL); +extern BOOL cleanup_environment(void); extern uschar *cutthrough_finaldot(void); extern BOOL cutthrough_flush_send(void); extern BOOL cutthrough_headers_send(void); @@ -121,6 +124,7 @@ extern int dcc_process(uschar **); #endif extern void debug_logging_activate(uschar *, uschar *); +extern void debug_logging_stop(void); extern void debug_print_argv(const uschar **); extern void debug_print_ids(uschar *); extern void debug_print_string(uschar *); @@ -139,14 +143,10 @@ extern void deliver_succeeded(address_item *); extern uschar *deliver_get_sender_address (uschar *id); -#ifdef WITH_OLD_DEMIME -extern int demime(uschar **); -#endif extern BOOL directory_make(const uschar *, const uschar *, int, BOOL); #ifndef DISABLE_DKIM -extern BOOL dkim_transport_write_message(address_item *, int, int, - int, uschar *, uschar *, uschar *, uschar *, rewrite_rule *, - int, uschar *, uschar *, uschar *, uschar *, uschar *, uschar *); +extern BOOL dkim_transport_write_message(int, transport_ctx *, + struct ob_dkim *); #endif extern dns_address *dns_address_from_rr(dns_answer *, dns_record *); extern int dns_basic_lookup(dns_answer *, const uschar *, int); @@ -168,6 +168,8 @@ extern BOOL enq_start(uschar *, unsigned); extern uschar *event_raise(uschar *, const uschar *, uschar *); extern void msg_event_raise(const uschar *, const address_item *); #endif +extern uschar ehlo_response(uschar *, size_t, uschar); +extern const uschar * exim_errstr(int); extern void exim_exit(int); extern void exim_nullstd(void); extern void exim_setugid(uid_t, gid_t, BOOL, uschar *); @@ -179,6 +181,7 @@ extern int exp_bool(address_item *addr, extern BOOL expand_check_condition(uschar *, uschar *, uschar *); extern uschar *expand_string(uschar *); /* public, cannot make const */ extern const uschar *expand_cstring(const uschar *); /* ... so use this one */ +extern uschar *expand_hide_passwords(uschar * ); extern uschar *expand_string_copy(const uschar *); extern int_eximarith_t expand_string_integer(uschar *, BOOL); extern void modify_variable(uschar *, void *); @@ -264,7 +267,9 @@ struct mime_boundary_context; extern int mime_acl_check(uschar *acl, FILE *f, struct mime_boundary_context *, uschar **, uschar **); extern int mime_decode(const uschar **); +extern ssize_t mime_decode_base64(FILE *, FILE *, uschar *); extern int mime_regex(const uschar **); +extern void mime_set_anomaly(int); #endif extern uschar *moan_check_errorcopy(uschar *); extern BOOL moan_skipped_syntax_errors(uschar *, error_block *, uschar *, @@ -276,7 +281,7 @@ extern BOOL moan_to_sender(int, error_block *, header_line *, FILE *, BOOL); extern void moan_write_from(FILE *); extern FILE *modefopen(const uschar *, const char *, mode_t); -extern void open_cutthrough_connection( address_item * addr ); +extern int open_cutthrough_connection( address_item * addr ); extern uschar *parse_extract_address(uschar *, uschar **, int *, int *, int *, BOOL); @@ -308,8 +313,8 @@ extern BOOL readconf_depends(driver_instance *, uschar *); extern void readconf_driver_init(uschar *, driver_instance **, driver_info *, int, void *, int, optionlist *, int); extern uschar *readconf_find_option(void *); -extern void readconf_main(void); -extern void readconf_print(uschar *, uschar *, BOOL); +extern void readconf_main(BOOL); +extern void readconf_print(uschar *, uschar *, BOOL no_labels); extern uschar *readconf_printtime(int); extern uschar *readconf_readname(uschar *, int, uschar *); extern int readconf_readtime(const uschar *, int, BOOL); @@ -366,9 +371,9 @@ extern int search_findtype_partial(const uschar *, int *, const uschar **, i extern void *search_open(uschar *, int, int, uid_t *, gid_t *); extern void search_tidyup(void); extern void set_process_info(const char *, ...) PRINTF_FUNCTION(1,2); -extern void sha1_end(sha1 *, const uschar *, int, uschar *); -extern void sha1_mid(sha1 *, const uschar *); -extern void sha1_start(sha1 *); +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(uschar *, int, uschar *, uschar *, uschar *, uschar *, address_item **, uschar **); extern void sigalrm_handler(int); @@ -387,7 +392,7 @@ extern BOOL smtp_get_port(uschar *, address_item *, int *, uschar *); extern int smtp_getc(void); extern int smtp_handle_acl_fail(int, int, uschar *, uschar *); extern void smtp_log_no_mail(void); -extern void smtp_message_code(uschar **, int *, uschar **, uschar **); +extern void smtp_message_code(uschar **, int *, uschar **, uschar **, BOOL); extern BOOL smtp_read_response(smtp_inblock *, uschar *, int, int, int); extern void smtp_respond(uschar *, int, BOOL, uschar *); extern void smtp_notquit_exit(uschar *, uschar *, uschar *, ...); @@ -402,7 +407,9 @@ extern int spam(const uschar **); extern FILE *spool_mbox(unsigned long *, const uschar *); #endif extern BOOL spool_move_message(uschar *, uschar *, uschar *, uschar *); -extern BOOL spool_open_datafile(uschar *); +extern uschar *spool_fname(const uschar *, uschar *, uschar *, uschar *); +extern uschar *spool_sname(const uschar *, uschar *); +extern int spool_open_datafile(uschar *); extern int spool_open_temp(uschar *); extern int spool_read_header(uschar *, BOOL, BOOL); extern int spool_write_header(uschar *, int, uschar **); @@ -414,7 +421,9 @@ extern uschar *string_append(uschar *, int *, int *, int, ...); extern uschar *string_append_listele(uschar *, uschar, const uschar *); extern uschar *string_append_listele_n(uschar *, uschar, const uschar *, unsigned); extern uschar *string_base62(unsigned long int); -extern uschar *string_cat(uschar *, int *, int *, const uschar *, int); +extern uschar *string_cat(uschar *, int *, int *, const uschar *); +extern uschar *string_catn(uschar *, int *, int *, const uschar *, int); +extern int string_compare_by_pointer(const void *, const void *); extern uschar *string_copy_dnsdomain(uschar *); extern uschar *string_copy_malloc(const uschar *); extern uschar *string_copylc(const uschar *); @@ -459,10 +468,9 @@ extern BOOL transport_set_up_command(const uschar ***, uschar *, extern void transport_update_waiting(host_item *, uschar *); extern BOOL transport_write_block(int, uschar *, int); extern BOOL transport_write_string(int, const char *, ...); -extern BOOL transport_headers_send(address_item *, int, uschar *, uschar *, - BOOL (*)(int, uschar *, int, BOOL), BOOL, rewrite_rule *, int); -extern BOOL transport_write_message(address_item *, int, int, int, uschar *, - uschar *, uschar *, uschar *, rewrite_rule *, int); +extern BOOL transport_headers_send(int, transport_ctx *, + BOOL (*)(int, transport_ctx *, uschar *, int)); +extern BOOL transport_write_message(int, transport_ctx *, int); extern void tree_add_duplicate(uschar *, address_item *); extern void tree_add_nonrecipient(uschar *); extern void tree_add_unusable(host_item *); @@ -480,7 +488,7 @@ extern void utf8_version_report(FILE *); extern int verify_address(address_item *, FILE *, int, int, int, int, uschar *, uschar *, BOOL *); -extern int verify_check_dnsbl(const uschar **); +extern int verify_check_dnsbl(int, const uschar **, uschar **); extern int verify_check_header_address(uschar **, uschar **, int, int, int, uschar *, uschar *, int, int *); extern int verify_check_headers(uschar **);