Fossil

Check-in [90c48593]
Login

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

Overview
Comment:We can detect when to enable compatibility mode, so do this instead of requiring an explicit argument.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | ssh-test-http
Files: files | file ages | folders
SHA1:90c4859315b63033c3b021d39f60e9cc413a3ed8
User & Date: andybradford 2013-08-19 14:48:21
Context
2013-08-23
14:14
Remove unused sshin_read() function that was missed. check-in: f64c003d user: andybradford tags: ssh-test-http
2013-08-19
14:48
We can detect when to enable compatibility mode, so do this instead of requiring an explicit argument. check-in: 90c48593 user: andybradford tags: ssh-test-http
2013-08-18
01:26
Use a little more precaution that the Fossil command has been seen first. check-in: 12dbaebe user: andybradford tags: ssh-test-http
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/cgi.c.

1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
      malformed_request("malformed probe");
    }
  }

  /* Got all probes now first transport_open is completed
  ** so return the command that was requested
  */
  /* *zCmd = mprintf("%s", zToken); */
  return mprintf("%s", zToken);
}

/*
** This routine handles the old fossil SSH transport_flip
** and transport_open communications if detected.
*/







|







1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
      malformed_request("malformed probe");
    }
  }

  /* Got all probes now first transport_open is completed
  ** so return the command that was requested
  */
  g.fSshClient |= CGI_SSH_COMPAT;
  return mprintf("%s", zToken);
}

/*
** This routine handles the old fossil SSH transport_flip
** and transport_open communications if detected.
*/

Changes to src/main.c.

1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744

/*
** Note that the following command is used by ssh:// processing.
**
** COMMAND: test-http
** Works like the http command but gives setup permission to all users.
**
** Options:
**   --ssh-compat        Compatibility option for SSH keys and old clients
*/
void cmd_test_http(void){
  const char *zIpAddr;    /* IP address of remote client */

  if( find_option("ssh-compat", 0, 0)!=0 ) g.fSshClient |= CGI_SSH_COMPAT;
  Th_InitTraceLog();
  login_set_capabilities("sx", 0);
  g.useLocalauth = 1;
  g.httpIn = stdin;
  g.httpOut = stdout;
  find_server_repository(0);
  g.cgiOutput = 1;







<
<




<







1724
1725
1726
1727
1728
1729
1730


1731
1732
1733
1734

1735
1736
1737
1738
1739
1740
1741

/*
** Note that the following command is used by ssh:// processing.
**
** COMMAND: test-http
** Works like the http command but gives setup permission to all users.
**


*/
void cmd_test_http(void){
  const char *zIpAddr;    /* IP address of remote client */


  Th_InitTraceLog();
  login_set_capabilities("sx", 0);
  g.useLocalauth = 1;
  g.httpIn = stdin;
  g.httpOut = stdout;
  find_server_repository(0);
  g.cgiOutput = 1;