X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/90341c71c19c82ba8b1cbf4d1693940b8bb8f70b..98913c8ea2be5188dd22ec652da1182017e8edb7:/src/src/exim.c diff --git a/src/src/exim.c b/src/src/exim.c index 2237476d7..fd08cc780 100644 --- a/src/src/exim.c +++ b/src/src/exim.c @@ -12,7 +12,7 @@ Also a few functions that don't naturally fit elsewhere. */ #include "exim.h" -#ifdef __GLIBC__ +#if defined(__GLIBC__) && !defined(__UCLIBC__) # include #endif @@ -1044,7 +1044,7 @@ DEBUG(D_any) do { fprintf(f, "Compiler: \n"); #endif -#ifdef __GLIBC__ +#if defined(__GLIBC__) && !defined(__UCLIBC__) fprintf(f, "Library version: Glibc: Compile: %d.%d\n", __GLIBC__, __GLIBC_MINOR__); if (__GLIBC_PREREQ(2, 1)) @@ -2294,7 +2294,7 @@ for (i = 1; i < argc; i++) #ifdef ALT_CONFIG_PREFIX int sep = 0; int len = Ustrlen(ALT_CONFIG_PREFIX); - uschar *list = argrest; + const uschar *list = argrest; uschar *filename; while((filename = string_nextinlist(&list, &sep, big_buffer, big_buffer_size)) != NULL) @@ -2708,18 +2708,19 @@ for (i = 1; i < argc; i++) return EXIT_FAILURE; } - /* Set up $sending_ip_address and $sending_port */ + /* Set up $sending_ip_address and $sending_port, unless proxied */ - if (getsockname(fileno(stdin), (struct sockaddr *)(&interface_sock), - &size) == 0) - sending_ip_address = host_ntoa(-1, &interface_sock, NULL, - &sending_port); - else - { - fprintf(stderr, "exim: getsockname() failed after -MC option: %s\n", - strerror(errno)); - return EXIT_FAILURE; - } + if (!continue_proxy) + if (getsockname(fileno(stdin), (struct sockaddr *)(&interface_sock), + &size) == 0) + sending_ip_address = host_ntoa(-1, &interface_sock, NULL, + &sending_port); + else + { + fprintf(stderr, "exim: getsockname() failed after -MC option: %s\n", + strerror(errno)); + return EXIT_FAILURE; + } if (running_in_test_harness) millisleep(500); break; @@ -2727,7 +2728,7 @@ for (i = 1; i < argc; i++) else if (*argrest == 'C' && argrest[1] && !argrest[2]) { - switch(argrest[1]) + switch(argrest[1]) { /* -MCA: set the smtp_authenticated flag; this is useful only when it precedes -MC (see above). The flag indicates that the host to which @@ -2771,6 +2772,17 @@ for (i = 1; i < argc; i++) case 'S': smtp_peer_options |= PEER_OFFERED_SIZE; break; #ifdef SUPPORT_TLS + /* -MCt: similar to -MCT below but the connection is still open + via a proxy proces which handles the TLS context and coding. + Require two arguments for the proxied local address and port. */ + + case 't': continue_proxy = TRUE; + if (++i < argc) sending_ip_address = argv[i]; + else badarg = TRUE; + if (++i < argc) sending_port = (int)(Uatol(argv[i])); + else badarg = TRUE; + /*FALLTHROUGH*/ + /* -MCT: set the tls_offered flag; this is useful only when it precedes -MC (see above). The flag indicates that the host to which Exim is connected has offered TLS support. */ @@ -5791,7 +5803,9 @@ moreloop: deliver_domain_orig = NULL; deliver_host = deliver_host_address = NULL; dnslist_domain = dnslist_matched = NULL; +#ifdef WITH_CONTENT_SCAN malware_name = NULL; +#endif callout_address = NULL; sending_ip_address = NULL; acl_var_m = NULL;