[python-kerberos] - Fix calculation of username string length in authenticate_gss_client_wrap (#1057338)

rcritten rcritten at fedoraproject.org
Tue Feb 11 20:32:59 UTC 2014


commit caee3cbefad51041718afe40e36398f0baf1c8f7
Author: Rob Crittenden <rcritten at redhat.com>
Date:   Tue Feb 11 15:32:15 2014 -0500

    - Fix calculation of username string length in
      authenticate_gss_client_wrap (#1057338)

 PyKerberos-gsswrap.patch |   11 +++++++++++
 python-kerberos.spec     |    8 +++++++-
 2 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/PyKerberos-gsswrap.patch b/PyKerberos-gsswrap.patch
new file mode 100644
index 0000000..2b3628b
--- /dev/null
+++ b/PyKerberos-gsswrap.patch
@@ -0,0 +1,11 @@
+--- python-kerberos-1.1/src/kerberosgss.c-orig	2009-11-11 14:26:47.000000000 -0500
++++ python-kerberos-1.1/src/kerberosgss.c	2009-11-28 16:17:59.000000000 -0500
+@@ -355,7 +355,7 @@ int authenticate_gss_client_wrap(gss_cli
+ 		// server decides if principal can log in as user
+ 		strncpy(buf + 4, user, sizeof(buf) - 4);
+ 		input_token.value = buf;
+-		input_token.length = 4 + strlen(user) + 1;
++		input_token.length = 4 + strlen(user);
+ 	}
+ 
+ 	// Do GSSAPI wrap
diff --git a/python-kerberos.spec b/python-kerberos.spec
index b9b26da..3d8774b 100644
--- a/python-kerberos.spec
+++ b/python-kerberos.spec
@@ -2,7 +2,7 @@
 %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
 Name:           python-kerberos
 Version:        1.1
-Release:        13%{?dist}
+Release:        14%{?dist}
 Summary:        A high-level wrapper for Kerberos (GSSAPI) operations
 
 Group:          System Environment/Libraries
@@ -21,6 +21,7 @@ BuildRequires:  python-setuptools
 Patch0: PyKerberos-delegation.patch
 Patch1: PyKerberos-version.patch
 Patch2: PyKerberos-inquire.patch
+Patch3: PyKerberos-gsswrap.patch
 
 %description
 This Python package is a high-level wrapper for Kerberos (GSSAPI) operations.
@@ -38,6 +39,7 @@ Much of the C-code here is adapted from Apache's mod_auth_kerb-5.0rc7.
 %patch0 -p1 -b .delegation
 %patch1 -p1 -b .version
 %patch2 -p1 -b .inquire
+%patch3 -p1 -b .gsswrap
 
 %build
 %{__python} setup.py build
@@ -57,6 +59,10 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Thu Jan 23 2014 Rob Crittenden <rcritten at redhat.com> - 1.1-14
+- Fix calculation of username string length in authenticate_gss_client_wrap
+  (#1057338)
+
 * Fri Jan 17 2014 Rob Crittenden <rcritten at redhat.com> - 1.1-13
 - Add patch to allow inquiring the current client credentials
 


More information about the scm-commits mailing list