From: Aki Tuomi Date: Mon, 27 Feb 2017 17:12:32 +0000 (+0200) Subject: doveadm: Ensure -- is added to command line before positional arguments X-Git-Tag: 2.3.0.rc1~1986 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=967efe37d1f10a28c0a086cc5919d4ce8917bed8;p=thirdparty%2Fdovecot%2Fcore.git doveadm: Ensure -- is added to command line before positional arguments This prevents parser from choking on dash. --- 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. */