[globus-ftp-control] Fix backward incompatibility
Mattias Ellert
ellert at fedoraproject.org
Thu Jun 23 10:42:38 UTC 2011
commit e699d71221c1ff2687ddd1a19194ae1e99dec676
Author: Mattias Ellert <mattias.ellert at fysast.uu.se>
Date: Thu Jun 23 12:38:08 2011 +0200
Fix backward incompatibility
globus-ftp-control-backcompat.patch | 82 +++++++++++++++++++++++++++++++++++
globus-ftp-control.spec | 9 +++-
2 files changed, 90 insertions(+), 1 deletions(-)
---
diff --git a/globus-ftp-control-backcompat.patch b/globus-ftp-control-backcompat.patch
new file mode 100644
index 0000000..1009259
--- /dev/null
+++ b/globus-ftp-control-backcompat.patch
@@ -0,0 +1,82 @@
+diff -ur globus_ftp_control-2.12.orig/globus_ftp_control_client.c globus_ftp_control-2.12/globus_ftp_control_client.c
+--- globus_ftp_control-2.12.orig/globus_ftp_control_client.c 2011-04-27 02:43:57.000000000 +0200
++++ globus_ftp_control-2.12/globus_ftp_control_client.c 2008-09-19 06:46:59.000000000 +0200
+@@ -159,7 +159,6 @@
+ handle->cc_handle.quit_response.response_buffer = GLOBUS_NULL;
+ handle->cc_handle.nl_handle_set = GLOBUS_FALSE;
+ handle->cc_handle.signal_deactivate = GLOBUS_FALSE;
+- *handle->cc_handle.serverhostname = '\0';
+ globus_io_tcpattr_init(&handle->cc_handle.io_attr);
+
+ globus_ftp_control_auth_info_init(&(handle->cc_handle.auth_info),
+@@ -521,11 +520,6 @@
+ element->callback = callback;
+ element->arg = callback_arg;
+
+- strncpy(handle->cc_handle.serverhostname,
+- host, sizeof(handle->cc_handle.serverhostname));
+- handle->cc_handle.serverhostname[
+- sizeof(handle->cc_handle.serverhostname) - 1] = 0;
+-
+ globus_io_attr_set_tcp_nodelay(&handle->cc_handle.io_attr,
+ GLOBUS_TRUE);
+ rc=globus_io_tcp_register_connect(
+@@ -2528,10 +2522,6 @@
+
+ #endif
+
+-static gss_OID_desc gss_nt_host_ip_oid =
+- { 10, "\x2b\x06\x01\x04\x01\x9b\x50\x01\x01\x02" };
+-static gss_OID_desc * GLOBUS_GSS_C_NT_HOST_IP = &gss_nt_host_ip_oid;
+-
+ static void
+ globus_l_ftp_control_send_cmd_cb(
+ void * callback_arg,
+@@ -2599,29 +2589,12 @@
+ "No possible GSI subject. If using a non TCP protocol and GSI you must specifiy a subject.");
+ goto return_error;
+ }
+-
+- send_tok.value = globus_common_create_string(
+- "%s/%s",
+- handle->cc_handle.serverhostname,
+- handle->cc_handle.serverhost);
+- send_tok.length = strlen(send_tok.value);
+-
+- maj_stat = gss_import_name(
+- &min_stat,
+- &send_tok,
+- GLOBUS_GSS_C_NT_HOST_IP,
+- &(handle->cc_handle.auth_info.target_name));
+- if(maj_stat != GSS_S_COMPLETE)
++ rc = globus_gss_assist_authorization_host_name(
++ handle->cc_handle.serverhost,
++ &handle->cc_handle.auth_info.target_name);
++ if(rc != GLOBUS_SUCCESS)
+ {
+- error_obj = globus_error_wrap_gssapi_error(
+- GLOBUS_FTP_CONTROL_MODULE,
+- maj_stat,
+- min_stat,
+- 0,
+- __FILE__,
+- "globus_l_ftp_control_send_cmd_cb",
+- __LINE__,
+- "gss_import_name failed");
++ error_obj = globus_error_get(rc);
+ goto return_error;
+ }
+ }
+diff -ur globus_ftp_control-2.12.orig/globus_ftp_control.h globus_ftp_control-2.12/globus_ftp_control.h
+--- globus_ftp_control-2.12.orig/globus_ftp_control.h 2011-04-27 02:43:57.000000000 +0200
++++ globus_ftp_control-2.12/globus_ftp_control.h 2007-08-24 23:04:32.000000000 +0200
+@@ -626,9 +626,6 @@
+ globus_bool_t use_auth;
+ globus_io_handle_t io_handle;
+ globus_ftp_cc_state_t cc_state;
+- /* user supplied hostname or ip */
+- char serverhostname[MAXHOSTNAMELEN];
+- /* ip address that was connected */
+ char serverhost[MAXHOSTNAMELEN];
+ struct hostent server;
+ char server_buffer[
diff --git a/globus-ftp-control.spec b/globus-ftp-control.spec
index 710954b..1d46d88 100644
--- a/globus-ftp-control.spec
+++ b/globus-ftp-control.spec
@@ -7,7 +7,7 @@
Name: globus-ftp-control
%global _name %(tr - _ <<< %{name})
Version: 2.12
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Globus Toolkit - GridFTP Control Library
Group: System Environment/Libraries
@@ -34,6 +34,9 @@ Patch1: %{name}-type-punned-pointer.patch
# Fix format errors:
# http://bugzilla.globus.org/bugzilla/show_bug.cgi?id=6749
Patch2: %{name}-format.patch
+# Fix backward incompatibility
+# http://bugzilla.globus.org/bugzilla/show_bug.cgi?id=7187
+Patch3: %{name}-backcompat.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: globus-common
@@ -105,6 +108,7 @@ GridFTP Control Library Documentation Files
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
%if "%{rhel}" == "5"
mkdir bin
@@ -217,6 +221,9 @@ rm -rf $RPM_BUILD_ROOT
%dir %{_docdir}/%{name}-%{version}/html
%changelog
+* Thu Jun 23 2011 Mattias Ellert <mattias.ellert at fysast.uu.se> - 2.12-2
+- Fix backward incompatibility
+
* Fri Jun 03 2011 Mattias Ellert <mattias.ellert at fysast.uu.se> - 2.12-1
- Update to Globus Toolkit 5.0.4
More information about the scm-commits
mailing list