[curl/private-kdudka-debug-scp] fix missing initialization in SSH code causing test 619 to fail

Kamil Dudka kdudka at fedoraproject.org
Mon Oct 21 16:59:14 UTC 2013


commit b4390393d0243b96a46768782f2c6d05dedf90ba
Author: Kamil Dudka <kdudka at redhat.com>
Date:   Mon Oct 21 18:54:10 2013 +0200

    fix missing initialization in SSH code causing test 619 to fail

 0105-curl-7.33.0-ssh-init.patch |   30 ++++++++++++++++++++++++++++++
 curl.spec                       |    5 +++++
 2 files changed, 35 insertions(+), 0 deletions(-)
---
diff --git a/0105-curl-7.33.0-ssh-init.patch b/0105-curl-7.33.0-ssh-init.patch
new file mode 100644
index 0000000..e42bc4a
--- /dev/null
+++ b/0105-curl-7.33.0-ssh-init.patch
@@ -0,0 +1,30 @@
+From 06c74b11fa976246307fbcbd36f71f59f2beaa6f Mon Sep 17 00:00:00 2001
+From: Kamil Dudka <kdudka at redhat.com>
+Date: Mon, 21 Oct 2013 18:47:54 +0200
+Subject: [PATCH] ssh: initialize per-handle data in ssh_connect()
+
+... if not already initialized.  This fixes a regression introduced by
+commit 4ad8e142da463ab208d5b5565e53291c8e5ef038, which caused test619
+to intermittently fail on certain machines (namely Fedora build hosts).
+---
+ lib/ssh.c |    4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/lib/ssh.c b/lib/ssh.c
+index 79f58bb..e8b8b7c 100644
+--- a/lib/ssh.c
++++ b/lib/ssh.c
+@@ -2725,6 +2725,10 @@ static CURLcode ssh_connect(struct connectdata *conn, bool *done)
+   CURLcode result;
+   struct SessionHandle *data = conn->data;
+ 
++  /* allocate per-handle data if not already */
++  if(!data->req.protop)
++    ssh_setup_connection(conn);
++
+   /* We default to persistent connections. We set this already in this connect
+      function to make the re-use checks properly be able to check this bit. */
+   conn->bits.close = FALSE;
+-- 
+1.7.1
+
diff --git a/curl.spec b/curl.spec
index 0383fd9..591230f 100644
--- a/curl.spec
+++ b/curl.spec
@@ -25,6 +25,9 @@ Patch103: 0103-curl-7.32.0-metalink.patch
 # use localhost6 instead of ip6-localhost in the curl test-suite
 Patch104: 0104-curl-7.19.7-localhost6.patch
 
+# fix missing initialization in SSH code causing test 619 to fail
+Patch105: 0105-curl-7.33.0-ssh-init.patch
+
 # disable valgrind for certain test-cases (libssh2 problem)
 Patch106: 0106-curl-7.21.0-libssh2-valgrind.patch
 
@@ -119,6 +122,7 @@ documentation of the library, too.
 %patch103 -p1
 %patch104 -p1
 %patch106 -p1
+%patch105 -p1
 %patch107 -p1
 %patch108 -p1
 
@@ -233,6 +237,7 @@ rm -rf $RPM_BUILD_ROOT
 * Mon Oct 14 2013 Kamil Dudka <kdudka at redhat.com> 7.33.0-1
 - new upstream release
 - fix missing initialization in NTLM code causing test 906 to fail
+- fix missing initialization in SSH code causing test 619 to fail
 
 * Fri Oct 11 2013 Kamil Dudka <kdudka at redhat.com> 7.32.0-3
 - do not limit the speed of SCP upload on a fast connection


More information about the scm-commits mailing list