Fossil

Changes On Branch mistake
Login

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

Changes In Branch mistake Excluding Merge-Ins

This is equivalent to a diff from 25857ebba5 to b537eeef05

2024-11-23
17:19
Prepare for merge into trunk. Closed-Leaf check-in: c88ed3e191 user: andybradford tags: ssh-command-once
01:17
Change the default ssh command to just be "ssh" and then unequivocally add "-e none" to each ssh-command (default or overridden) as mentioned in [forum:667d59587b90c4c6 | forum post 667d59587b90c4c6]. It's arguable that if ssh-command has been specified that no modifications should be done to it at all. In which case this commit should be backed out and the default command should be made to include "-T" as well as removed from it's current location in the code. p.s. This is not really necessary. See [forum:312b4fc6e3de945d | forum post 312b4fc6e3de945d] for rationale. Closed-Leaf check-in: b537eeef05 user: andybradford tags: mistake
01:11
This fixes the logic error introduced in [f019cb5fc3f]. check-in: 25857ebba5 user: andybradford tags: ssh-command-once
01:08
This commit had more than I had intended. check-in: 91adccdb7d user: andybradford tags: ssh-command-once

Changes to src/http_transport.c.

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

/*
** Default SSH command
*/
#if 0 /* was: defined(_WIN32).  Windows generally has ssh now. */
static const char zDefaultSshCmd[] = "plink -ssh";
#else
static const char zDefaultSshCmd[] = "ssh -e none";
#endif

/*
** Initialize a Blob to the name of the configured SSH command.
*/
void transport_ssh_command(Blob *p){
  char *zSsh;        /* The base SSH command */







|







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

/*
** Default SSH command
*/
#if 0 /* was: defined(_WIN32).  Windows generally has ssh now. */
static const char zDefaultSshCmd[] = "plink -ssh";
#else
static const char zDefaultSshCmd[] = "ssh";
#endif

/*
** Initialize a Blob to the name of the configured SSH command.
*/
void transport_ssh_command(Blob *p){
  char *zSsh;        /* The base SSH command */
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138

  fossil_free(g.zIpAddr);
  g.zIpAddr = mprintf("%s", pUrlData->name);
  transport_ssh_command(&zCmd);
  if( pUrlData->port!=pUrlData->dfltPort && pUrlData->port ){
    blob_appendf(&zCmd, " -p %d", pUrlData->port);
  }
  blob_appendf(&zCmd, " -T --");  /* End of switches */
  if( pUrlData->user && pUrlData->user[0] ){
    zHost = mprintf("%s@%s", pUrlData->user, pUrlData->name);
    blob_append_escaped_arg(&zCmd, zHost, 0);
    fossil_free(zHost);
  }else{
    blob_append_escaped_arg(&zCmd, pUrlData->name, 0);
  }







|







124
125
126
127
128
129
130
131
132
133
134
135
136
137
138

  fossil_free(g.zIpAddr);
  g.zIpAddr = mprintf("%s", pUrlData->name);
  transport_ssh_command(&zCmd);
  if( pUrlData->port!=pUrlData->dfltPort && pUrlData->port ){
    blob_appendf(&zCmd, " -p %d", pUrlData->port);
  }
  blob_appendf(&zCmd, " -e none -T --");  /* End of switches */
  if( pUrlData->user && pUrlData->user[0] ){
    zHost = mprintf("%s@%s", pUrlData->user, pUrlData->name);
    blob_append_escaped_arg(&zCmd, zHost, 0);
    fossil_free(zHost);
  }else{
    blob_append_escaped_arg(&zCmd, pUrlData->name, 0);
  }