case 'D': smtp_peer_options |= OPTION_DSN; break;
+ /* -MCd: for debug, set a process-purpose string */
+
+ case 'd': if (++i < argc)
+ process_purpose = string_copy_taint(argv[i], TRUE);
+ else badarg = TRUE;
+ break;
+
/* -MCG: set the queue name, to a non-default value */
- case 'G': if (++i < argc) queue_name = string_copy(argv[i]);
+ case 'G': if (++i < argc) queue_name = string_copy_taint(argv[i], TRUE);
else badarg = TRUE;
break;
{
int status;
pid_t pid;
+ /*XXX This use of argv[i] for msg_id should really be tainted, but doing
+ that runs into a later copy into the untainted global message_id[] */
if (i == argc - 1)
(void)deliver_message(argv[i], forced_delivery, deliver_give_up);
- else if ((pid = fork()) == 0)
+ else if ((pid = exim_fork(US"cmdline-delivery")) == 0)
{
(void)deliver_message(argv[i], forced_delivery, deliver_give_up);
- exim_underbar_exit(EXIT_SUCCESS, US"cmdline-delivery");
+ exim_underbar_exit(EXIT_SUCCESS);
}
else if (pid < 0)
{
extern void cancel_cutthrough_connection(BOOL, const uschar *);
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_function(uschar **argv, uschar **envp, int newumask,
- int *infdptr, int *outfdptr, BOOL make_leader,
- const uschar * purpose);
+ extern pid_t child_open_exim_function(int *, const uschar *);
+ extern pid_t child_open_exim2_function(int *, uschar *, uschar *,
+ const uschar *);
++extern pid_t child_open_function(uschar **, uschar **, int,
++ int *, int *, BOOL, const uschar *);
extern pid_t child_open_uid(const uschar **, const uschar **, int,
- uid_t *, gid_t *, int *, int *, uschar *, BOOL);
+ uid_t *, gid_t *, int *, int *, uschar *, BOOL, const uschar *);
extern BOOL cleanup_environment(void);
extern void cutthrough_data_puts(uschar *, int);
extern void cutthrough_data_put_nl(void);
╭considering: -oMt sender_ident = $sender_ident
├──expanding: -oMt sender_ident = $sender_ident
╰─────result: -oMt sender_ident = me
- >>>>>>>>>>>>>>>> Exim pid=pppp (main: expansion test) terminating with rc=0 >>>>>>>>>>>>>>>>
+ ╰──(tainted)
+ >>>>>>>>>>>>>>>> Exim pid=pppp (fresh-exec) terminating with rc=0 >>>>>>>>>>>>>>>>
1999-03-02 09:44:33 no host name found for IP address V4NET.11.12.13
Exim version x.yz ....
configuration file is TESTSUITE/test-config
╭considering: -oMt sender_ident = $sender_ident
├──expanding: -oMt sender_ident = $sender_ident
╰─────result: -oMt sender_ident = me
- >>>>>>>>>>>>>>>> Exim pid=pppp (main: expansion test) terminating with rc=0 >>>>>>>>>>>>>>>>
+ ╰──(tainted)
+ >>>>>>>>>>>>>>>> Exim pid=pppp (fresh-exec) terminating with rc=0 >>>>>>>>>>>>>>>>
Exim version x.yz ....
changed uid/gid: forcing real = effective
uid=uuuu gid=CALLER_GID pid=pppp