DKIM: verify using separate pool-pair, reset per message
[exim.git] / src / src / exim.c
index 6454bc6ae6c3f47d4dd43d48b8e385bdb54d32fc..cb11a2a38bf16ef3793eda513e0a341060c46313 100644 (file)
@@ -1669,6 +1669,8 @@ extern char **environ;
 (void)gettimeofday(&timestamp_startup, NULL);
 #endif
 
+store_init();  /* Initialise the memory allocation susbsystem */
+
 /* If the Exim user and/or group and/or the configuration file owner/group were
 defined by ref:name at build time, we must now find the actual uid/gid values.
 This is a feature to make the lives of binary distributors easier. */
@@ -2373,6 +2375,7 @@ on the second character (the one after '-'), to save some effort. */
       int len = Ustrlen(ALT_CONFIG_PREFIX);
       const uschar *list = argrest;
       uschar *filename;
+      /* The argv is untainted, so big_buffer (also untainted) is ok to use */
       while((filename = string_nextinlist(&list, &sep, big_buffer,
              big_buffer_size)))
         if (  (  Ustrlen(filename) < len
@@ -2813,10 +2816,22 @@ on the second character (the one after '-'), to save some effort. */
        case 'S': smtp_peer_options |= OPTION_SIZE; break;
 
 #ifndef DISABLE_TLS
+    /* -MCs: used with -MCt; SNI was sent */
+    /* -MCr: ditto, DANE */
+
+       case 'r':
+       case 's': if (++i < argc)
+                   {
+                   continue_proxy_sni = string_copy_taint(argv[i], TRUE);
+                   if (argrest[1] == 'r') continue_proxy_dane = TRUE;
+                   }
+                 else badarg = TRUE;
+                 break;
+
     /* -MCt: similar to -MCT below but the connection is still open
     via a proxy process which handles the TLS context and coding.
     Require three arguments for the proxied local address and port,
-    and the TLS cipher.  */
+    and the TLS cipher. */
 
        case 't': if (++i < argc)
                    sending_ip_address = string_copy_taint(argv[i], TRUE);
@@ -3208,6 +3223,13 @@ on the second character (the one after '-'), to save some effort. */
        else override_local_interfaces = string_copy_taint(argv[++i], TRUE);
        break;
 
+      /* -oY: Override creation of daemon notifier socket */
+
+      case 'Y':
+       if (*argrest) badarg = TRUE;
+       else notifier_socket = NULL;
+       break;
+
       /* Unknown -o argument */
 
       default:
@@ -4775,8 +4797,7 @@ if (!originator_login || f.running_in_test_harness)
 /* Ensure that the user name is in a suitable form for use as a "phrase" in an
 RFC822 address.*/
 
-originator_name = string_copy(parse_fix_phrase(originator_name,
-  Ustrlen(originator_name), big_buffer, big_buffer_size));
+originator_name = US parse_fix_phrase(originator_name, Ustrlen(originator_name));
 
 /* If a message is created by this call of Exim, the uid/gid of its originator
 are those of the caller. These values are overridden if an existing message is