From d466d48bda68cb8c368ca88527e86f1bfa245ab9 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 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. */ -- 2.47.3