On Wed, Feb 6, 2013 at 3:12 PM, Matt Welland <estifo...@gmail.com> wrote:

>
>
>
> On Wed, Feb 6, 2013 at 1:52 PM, Richard Hipp <d...@sqlite.org> wrote:
>
>>
>>
>> On Wed, Feb 6, 2013 at 3:39 PM, Matt Welland <estifo...@gmail.com> wrote:
>>
>>>
>>> On Wed, Feb 6, 2013 at 12:27 PM, Richard Hipp <d...@sqlite.org> wrote:
>>>
>>>>
>>>>
>>>> On Wed, Feb 6, 2013 at 2:18 PM, Matt Welland <estifo...@gmail.com>wrote:
>>>>
>>>>> Hmmm...  your point about the remote login is curious. I assumed that
>>>>> fossil was doing something like this (I'm using faux code here):
>>>>>
>>>>> inport, outport = popen2("ssh", "-e", "none", "user@host", "fossil",
>>>>> ... )
>>>>>
>>>>> but it sounds like what is actually being done is (I have not grokked
>>>>> the code well enough to confirm yet) the following:
>>>>>
>>>>> inport, outport = popen2("ssh", "-e", "none", "user@host", "/bin/sh")
>>>>> ...
>>>>> print outport "fossil ... params"
>>>>>
>>>>
>>>> Fossil needs to run multiple commands.  /bin/sh is convenient to do
>>>> this.  If that is a really serious problem for the occasional csh system,
>>>> then we could, in theory, create a new fossil command to take care of that
>>>> for us:  "fossil test-sh".  Then run:
>>>>
>>>>     popen2("ssh", "-e", "none", "user@host", "fossil", "test-sh");
>>>>
>>>> It seems silly to have to duplicate the functionality of /bin/sh inside
>>>> of Fossil though, doesn't it?
>>>>
>>>
>>> Agreed! Also, this may or may not even fix the problem. Now that you
>>> describe this I realize I was assuming the problem was on the remote side.
>>> If it was the remote side then the popen call will have nothing to do with
>>> it since the /bin/sh is happening on the local side.
>>>
>>> The layers should be ....
>>>
>>> Local side:  /bin/sh -> ssh
>>> Remote side: /bin/tcsh -> fossil
>>>
>>
>> The command:
>>
>>    ssh -e none user@host /bin/sh
>>
>> should cause /bin/sh to be run on the remote side, without a pseudo-tty.
>> So, I'm not sure where tcsh even comes into play here.  Maybe if you try
>> changing the initialization command to:
>>
>>   ssh -e none user@host exec /bin/sh
>>
>> Does that make a difference?
>>
>
> Yes. The following patch appears to fix the problem:
>

The patch with junk eliminated, it is just one line change:

Index: src/http_transport.c
==================================================================
--- src/http_transport.c
+++ src/http_transport.c
@@ -222,10 +222,11 @@
       zHost = mprintf("%s", g.urlName);
     }
     blob_append(&zCmd, " ", 1);
     shell_escape(&zCmd, zHost);
     fossil_print(" %s\n", zHost);  /* Show the conclusion of the SSH
command */
+    blob_append(&zCmd, " exec /bin/sh", -1);
     free(zHost);
     popen2(blob_str(&zCmd), &sshIn, &sshOut, &sshPid);
     if( sshPid==0 ){
       fossil_fatal("cannot start ssh tunnel using [%b]", &zCmd);
     }




>
>> --
>> D. Richard Hipp
>> d...@sqlite.org
>>
>> _______________________________________________
>> fossil-users mailing list
>> fossil-users@lists.fossil-scm.org
>> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>>
>>
>
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to