Re: [PATCH v3 3/8] imap-send: use run-command API for tunneling
From: Erik Faye-Lund <hidden>
Date: 2016-06-15 22:47:32
On Tue, Oct 13, 2009 at 9:59 PM, Johannes Sixt [off-list ref] wrote:
On Dienstag, 13. Oktober 2009, Erik Faye-Lund wrote:quoted
+ argv[0] = "/bin/sh"; + argv[1] = "-c"; + argv[2] = srvc->tunnel; + argv[3] = NULL;Is there a particular reason that you run "/bin/sh" with a path? I doubt that this works on Windows. -- Hannes
It doesn't - I was being conservative. Getting tunneling to work on Windows hasn't been a part of my priorities (even though I did briefly test it at some point and got it working, provided a patch that changed the path to sh to a windows-path). Changing it to "sh -c" (as was suggested earlier) could AFAIK break something for people who have other 'sh's in path before /bin -- not that I think it would matter terribly much. If I were to fix this, I'd prefer not using sh at all on Windows. I've seen that connect.c doesn't prepend "/bin/sh -c" at all, requiring tunnels to be self-contained scripts or native binaries, unless I'm mistaken. I'm not sure if this works at all on Windows, though. I just think that the assumption that sh is the shell that is going to run the tunnel is wrong to make, especially on Windows. I'm really unsure if it's worth the hassle. -- Erik "kusma" Faye-Lund