From ccdf5120a8f52685be43b0931196f83a263012bd Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 16 Mar 2010 14:05:30 +0800 Subject: gftp: Add more gentoo patches for gftp 2.0.18 --- recipes/gftp/gftp/gftp-2.0.18-ipv6.patch | 33 ++++++++++++++++++++++ recipes/gftp/gftp/gftp-2.0.18-ssh2-read.patch | 13 +++++++++ .../gftp/gftp/gftp-2.0.18-ssl-wildcardcert.patch | 22 +++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 recipes/gftp/gftp/gftp-2.0.18-ipv6.patch create mode 100644 recipes/gftp/gftp/gftp-2.0.18-ssh2-read.patch create mode 100644 recipes/gftp/gftp/gftp-2.0.18-ssl-wildcardcert.patch (limited to 'recipes/gftp/gftp') diff --git a/recipes/gftp/gftp/gftp-2.0.18-ipv6.patch b/recipes/gftp/gftp/gftp-2.0.18-ipv6.patch new file mode 100644 index 0000000000..05454211b8 --- /dev/null +++ b/recipes/gftp/gftp/gftp-2.0.18-ipv6.patch @@ -0,0 +1,33 @@ +2006-7-19 Brian Masney + * lib/misc.c (gftp_copy_request) - fixes when doing an IPv6 transfer or + using ignore PASV address (from (from Aurelien Jarno) (closes GNOME bugzilla #169671) + +--- a/trunk/lib/misc.c 2006/07/20 02:32:58 784 ++++ b/trunk/lib/misc.c 2006/07/20 02:37:45 785 +@@ -568,8 +568,24 @@ + newreq->use_proxy = req->use_proxy; + newreq->logging_function = req->logging_function; + newreq->ai_family = req->ai_family; +- newreq->free_hostp = 0; +- newreq->hostp = NULL; ++ ++ if (req->hostp) ++ { ++#if defined (HAVE_GETADDRINFO) && defined (HAVE_GAI_STRERROR) ++ newreq->hostp = g_malloc (sizeof(struct addrinfo)); ++ memcpy(newreq->hostp, req->hostp, sizeof(struct addrinfo)); ++ if (req->current_hostp) ++ newreq->current_hostp = newreq->hostp + (req->current_hostp - req->hostp); ++#else ++ newreq->hostp = g_malloc (sizeof(struct hostent)); ++ memcpy(newreq->hostp, req->hostp, sizeof(struct hostent)); ++ newreq->host = req->host; ++ newreq->curhost = req->curhost; ++#endif ++ } ++ else ++ newreq->hostp = NULL; ++ newreq->free_hostp = 1; + + gftp_copy_local_options (&newreq->local_options_vars, + &newreq->local_options_hash, diff --git a/recipes/gftp/gftp/gftp-2.0.18-ssh2-read.patch b/recipes/gftp/gftp/gftp-2.0.18-ssh2-read.patch new file mode 100644 index 0000000000..765741be7b --- /dev/null +++ b/recipes/gftp/gftp/gftp-2.0.18-ssh2-read.patch @@ -0,0 +1,13 @@ +--- gftp-2.0.18.orig/lib/sshv2.c ++++ gftp-2.0.18/lib/sshv2.c +@@ -1841,7 +1841,7 @@ + { + int ret; + +- if ((ret = sshv2_open_file (request, file, startsize, SSH_FXP_OPEN)) < 0) ++ if ((ret = sshv2_open_file (request, file, startsize, SSH_FXF_READ)) < 0) + return (ret); + + return (sshv2_get_file_size (request, file)); + + diff --git a/recipes/gftp/gftp/gftp-2.0.18-ssl-wildcardcert.patch b/recipes/gftp/gftp/gftp-2.0.18-ssl-wildcardcert.patch new file mode 100644 index 0000000000..202b2931c9 --- /dev/null +++ b/recipes/gftp/gftp/gftp-2.0.18-ssl-wildcardcert.patch @@ -0,0 +1,22 @@ +--- lib/sslcommon.c 2005-01-04 14:32:11.000000000 +0100 ++++ lib/sslcommon.c 2006-06-19 15:23:13.000000000 +0200 +@@ -182,7 +182,18 @@ + X509_NAME_get_text_by_NID (subj, NID_commonName, data, 256) > 0) + { + data[sizeof (data) - 1] = '\0'; +- if (strcasecmp (data, request->hostname) != 0) ++ /* Check for wildcard CN (must begin with *.) */ ++ if (strncmp(data, "*.", 2) == 0) ++ { ++ int hostname_len = strlen(data) - 1; ++ if (strlen(request->hostname) > hostname_len && ++ strcasecmp (&(data[1]), &(request->hostname[strlen(request->hostname) - hostname_len])) == 0) ++ ok = 1; ++ } ++ else if (strcasecmp (data, request->hostname) == 0) ++ ok = 1; ++ ++ if (!ok) + { + request->logging_function (gftp_logging_error, request, + _("ERROR: The host in the SSL certificate (%s) does not match the host that we connected to (%s). Aborting connection.\n"), -- cgit 1.2.3-korg