Fossil

Changes On Branch mg_sshfix
Login

Changes On Branch mg_sshfix

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Changes In Branch mg_sshfix Excluding Merge-Ins

This is equivalent to a diff from 274d8a1dcd to 297cb3e525

2012-09-13
07:12
re-enable unicode commandline for MSVC build (previous commit accidently removed that) <p>New version of dirent.h, which supports both MBCS and UNICODE ... (check-in: 71d46aba2e user: jan.nijtmans tags: trunk)
2012-09-12
16:24
Need this "-e none" options to ssh.. if not, ssh can process the escape caracter to process command from data that's goes to fossil proces.. ... (Closed-Leaf check-in: 297cb3e525 user: mgagnon tags: mg_sshfix)
15:27
Now, just call /bin/sh as command argument.. I don't have problem with mail checking and motd and modification is very simple.. - Have to check if it work in all conditions and all systems. - Might not work for settups where server use a restricted shell.. ... (check-in: 531a58fd21 user: mgagnon tags: mg_sshfix)
08:10
Restore fossil to be compilable for Win95 <p>Replace "-DUNICODE -D_UNICODE" with "-DSQLITE_OS_WINNT=0" in win/Makefile.mingw if you want this. ... (check-in: b402bec882 user: jan.nijtmans tags: restore-win95)
00:35
attemp to fix ssh problem on debian linux host when non interactive shell still print some message (motd and mail checking stuff). *** not really working yet.. ... (check-in: 66a45382eb user: mgagnon tags: mg_sshfix)
2012-09-11
18:49
enable unicode commandline for MinGW/MinGW-w64 as well <p> remove unused MINGW_BROKEN_MAINARGS ... (check-in: 274d8a1dcd user: jan.nijtmans tags: trunk)
12:16
Merge the unicode-cmdline branch into trunk. ... (check-in: f668ff44c0 user: drh tags: trunk)

Changes to src/http_transport.c.

91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
  }
}

/*
** Default SSH command
*/
#ifdef __MINGW32__
static char zDefaultSshCmd[] = "ssh -T";
#else
static char zDefaultSshCmd[] = "ssh -e none -T";
#endif

/*
** Global initialization of the transport layer
*/
void transport_global_startup(void){
  if( g.urlIsSsh ){







|

|







91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
  }
}

/*
** Default SSH command
*/
#ifdef __MINGW32__
static char zDefaultSshCmd[] = "ssh";
#else
static char zDefaultSshCmd[] = "ssh -e none";
#endif

/*
** Global initialization of the transport layer
*/
void transport_global_startup(void){
  if( g.urlIsSsh ){
147
148
149
150
151
152
153






154
155
156
157
158
159
160
    }else{
      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 */
    free(zHost);






    popen2(blob_str(&zCmd), &sshIn, &sshOut, &sshPid);
    if( sshPid==0 ){
      fossil_fatal("cannot start ssh tunnel using [%b]", &zCmd);
    }
    blob_reset(&zCmd);

    /* Send an "echo" command to the other side to make sure that the







>
>
>
>
>
>







147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
    }else{
      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 */
    free(zHost);
     
    /* Append fossil test-http command directly during the invocation of ssh,
    ** to make sure no output from shell or login will pollute the sshIn pipe.
     */
    blob_append(&zCmd, " /bin/sh", -1);
    
    popen2(blob_str(&zCmd), &sshIn, &sshOut, &sshPid);
    if( sshPid==0 ){
      fossil_fatal("cannot start ssh tunnel using [%b]", &zCmd);
    }
    blob_reset(&zCmd);

    /* Send an "echo" command to the other side to make sure that the