changeset 21709:27554e9ede9f

doveadm: Ensure -- is added to command line before positional arguments This prevents parser from choking on dash.
author Aki Tuomi <aki.tuomi@dovecot.fi>
date Mon, 27 Feb 2017 19:12:32 +0200
parents a7295bb1a998
children 5fd93439cda7
files src/doveadm/doveadm-mail.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/doveadm/doveadm-mail.c	Mon Feb 27 19:04:55 2017 +0200
+++ b/src/doveadm/doveadm-mail.c	Mon Feb 27 19:12:32 2017 +0200
@@ -1051,6 +1051,9 @@
 		}
 	}
 
+	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. */