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.2.29.rc1~199 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d466d48bda68cb8c368ca88527e86f1bfa245ab9;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 e53c6695aa..c1cf8895e2 100644 --- a/src/doveadm/doveadm-mail.c +++ b/src/doveadm/doveadm-mail.c @@ -1051,6 +1051,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. */