Code

Merge branch 'jc/maint-fix-mailinfo-strip' into maint
[git.git] / imap-send.c
index 4ffd583c7e8d057654423cdd3ef24e42d91bfbb1..5631930bc3462c5d85d29e7e840f1cf24cd7111b 100644 (file)
@@ -964,17 +964,13 @@ static struct store *imap_open_store(struct imap_server_conf *srvc)
        /* open connection to IMAP server */
 
        if (srvc->tunnel) {
-               const char *argv[4];
+               const char *argv[] = { srvc->tunnel, NULL };
                struct child_process tunnel = {0};
 
                imap_info("Starting tunnel '%s'... ", srvc->tunnel);
 
-               argv[0] = "sh";
-               argv[1] = "-c";
-               argv[2] = srvc->tunnel;
-               argv[3] = NULL;
-
                tunnel.argv = argv;
+               tunnel.use_shell = 1;
                tunnel.in = -1;
                tunnel.out = -1;
                if (start_command(&tunnel))