Copyright updates:
[exim.git] / src / src / transports / lmtp.c
index 306ec450b8a3a3724273fc44f4258ed423a92e94..5a1b7c9b0d90268c73f4a5b6e1820c521e42d231 100644 (file)
@@ -3,6 +3,7 @@
 *************************************************/
 
 /* Copyright (c) University of Cambridge 1995 - 2018 */
+/* Copyright (c) The Exim Maintainers 2020 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 
@@ -21,17 +22,17 @@ instance block so as to be publicly visible; these are flagged with opt_public.
 
 optionlist lmtp_transport_options[] = {
   { "batch_id",          opt_stringptr | opt_public,
-      (void *)offsetof(transport_instance, batch_id) },
+      OPT_OFF(transport_instance, batch_id) },
   { "batch_max",         opt_int | opt_public,
-      (void *)offsetof(transport_instance, batch_max) },
+      OPT_OFF(transport_instance, batch_max) },
   { "command",           opt_stringptr,
-      (void *)offsetof(lmtp_transport_options_block, cmd) },
+      OPT_OFF(lmtp_transport_options_block, cmd) },
   { "ignore_quota",      opt_bool,
-      (void *)offsetof(lmtp_transport_options_block, ignore_quota) },
+      OPT_OFF(lmtp_transport_options_block, ignore_quota) },
   { "socket",            opt_stringptr,
-      (void *)offsetof(lmtp_transport_options_block, skt) },
+      OPT_OFF(lmtp_transport_options_block, skt) },
   { "timeout",           opt_time,
-      (void *)offsetof(lmtp_transport_options_block, timeout) }
+      OPT_OFF(lmtp_transport_options_block, timeout) }
 };
 
 /* Size of the options list. An extern variable has to be used so that its
@@ -500,7 +501,8 @@ if (ob->cmd)
 uid/gid and current directory. Request that the new process be a process group
 leader, so we can kill it and all its children on an error. */
 
-  if ((pid = child_open(USS argv, NULL, 0, &fd_in, &fd_out, TRUE)) < 0)
+  if ((pid = child_open(USS argv, NULL, 0, &fd_in, &fd_out, TRUE,
+                       US"lmtp-tpt-cmd")) < 0)
     {
     addrlist->message = string_sprintf(
       "Failed to create child process for %s transport: %s", tblock->name,
@@ -514,8 +516,7 @@ leader, so we can kill it and all its children on an error. */
 else
   {
   DEBUG(D_transport) debug_printf("using socket %s\n", ob->skt);
-  sockname = expand_string(ob->skt);
-  if (sockname == NULL)
+  if (!(sockname = expand_string(ob->skt)))
     {
     addrlist->message = string_sprintf("Expansion of \"%s\" (socket setting "
       "for %s transport) failed: %s", ob->skt, tblock->name,