]> 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)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 27 Feb 2017 17:56:00 +0000 (19:56 +0200)
This prevents parser from choking on dash.

src/doveadm/doveadm-mail.c

index e53c6695aa897d4e24e85d6c1c70821d21adb624..c1cf8895e2f9972cadfb318a62b80d2d26bfc384 100644 (file)
@@ -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. */