[PATCH 2/3] extensions: Always send extension pairs in SSH_FXP_VERSION

Michel Kraus mkraus+sgo at demonsphere.de
Sat May 16 18:00:58 BST 2015


According to the draft 13 this is still always included.

Signed-off-by: Michel Kraus <mkraus+sgo at demonsphere.de>
---
 sftpserver.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sftpserver.c b/sftpserver.c
index b7e337e..1bd2e81 100644
--- a/sftpserver.c
+++ b/sftpserver.c
@@ -169,6 +169,10 @@ static uint32_t sftp_init(struct sftpjob *job) {
   sftp_send_begin(job->worker);
   sftp_send_uint8(job->worker, SSH_FXP_VERSION);
   sftp_send_uint32(job->worker, protocol->version);
+  for(n = 0; n < protocol->nextensions; ++n) {
+    sftp_send_string(job->worker, protocol->extensions[n].name);
+    sftp_send_string(job->worker, protocol->extensions[n].data);
+  }
   if(protocol->version >= 4) {
     /* e.g. draft-ietf-secsh-filexfer-04.txt, 4.3.  This allows us to assume the
      * client always sends \n, freeing us from the burden of translating text
-- 
2.1.0




More information about the sgo-software-discuss mailing list