From 967efe37d1f10a28c0a086cc5919d4ce8917bed8 Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Mon, 27 Feb 2017 19:12:32 +0200 Subject: [PATCH] doveadm: Ensure -- is added to command line before positional arguments This prevents parser from choking on dash. --- src/doveadm/doveadm-mail.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/doveadm/doveadm-mail.c b/src/doveadm/doveadm-mail.c index 26a5a2beb8..f11be1ecf5 100644 --- a/src/doveadm/doveadm-mail.c +++ b/src/doveadm/doveadm-mail.c @@ -1050,6 +1050,9 @@ doveadm_cmd_ver2_to_mail_cmd_wrapper(struct doveadm_cmd_context *cctx) } } + const char *dashdash = "--"; + array_append(&full_args, &dashdash, 1); + array_append_zero(&pargv); /* All the -parameters need to be included in full_args so that they're sent to doveadm-server. */ -- 2.47.3