git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3 3/8] imap-send: use run-command API for tunneling

From
Erik Faye-Lund <kusmabite@googlemail.com>
Date
Oct 13, 2009, 20:27 UTC
Message-ID
<40aa078e0910131327q682c7044x854fec4de60b0c43@mail.gmail.com>
In-Reply-To
<200910132159.11616.j6t@kdbg.org>
On Tue, Oct 13, 2009 at 9:59 PM, Johannes Sixt <j6t@kdbg.org> wrote:
Show 11 quoted lines
> On Dienstag, 13. Oktober 2009, Erik Faye-Lund wrote:
>> +             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
Previous: Johannes SixtNext: Johannes Sixt
Message 14 of 16 in “imap-send: Windows support”
  1. 0/8 imap-send: Windows supportErik Faye-Lund, Oct 13, 2009
  2. 1/8 imap-send: remove useless uid codeErik Faye-Lund, Oct 13, 2009
  3. 2/8 imap-send: use separate read and write fdsErik Faye-Lund, Oct 13, 2009
  4. 3/8 imap-send: use run-command API for tunnelingErik Faye-Lund, Oct 13, 2009
  5. 4/8 imap-send: fix compilation-error on WindowsErik Faye-Lund, Oct 13, 2009
  6. 5/8 imap-send: build imap-send on WindowsErik Faye-Lund, Oct 13, 2009
  7. 6/8 mingw: wrap SSL_set_(w|r)fd to call _get_osfhandleErik Faye-Lund, Oct 13, 2009
  8. 7/8 mingw: enable OpenSSLErik Faye-Lund, Oct 13, 2009
  9. 8/8 MSVC: Enable OpenSSL, and translate -lcryptoErik Faye-Lund, Oct 13, 2009
  10. Johannes SixtOct 13, 2009
  11. Erik Faye-LundOct 13, 2009
  12. Erik Faye-LundOct 13, 2009
  13. Johannes SixtOct 13, 2009
  14. Erik Faye-LundOct 13, 2009
  15. Johannes SixtOct 14, 2009
  16. Erik Faye-LundOct 16, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.