]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm: Ensure -- is added to command line before positional arguments
authorAki Tuomi <aki.tuomi@dovecot.fi>
Mon, 27 Feb 2017 17:12:32 +0000 (19:12 +0200)
committerAki Tuomi <aki.tuomi@dovecot.fi>
Mon, 27 Feb 2017 17:28:09 +0000 (19:28 +0200)
This prevents parser from choking on dash.

src/doveadm/doveadm-mail.c

index 26a5a2beb8a48a99df00a334f8a8eacc96538d6a..f11be1ecf59f109eabdb64f1ae87aff20035ee21 100644 (file)
@@ -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. */