[gnutls/f16] fix use with non-blocking sockets (#826293)

Tomáš Mráz tmraz at fedoraproject.org
Wed May 30 06:50:46 UTC 2012


commit 456a453c2153ea5ef9625bae68936d3a08de4730
Author: Tomas Mraz <tmraz at fedoraproject.org>
Date:   Wed May 30 08:50:40 2012 +0200

    fix use with non-blocking sockets (#826293)

 gnutls-2.12.14-direction.patch |   23 +++++++++++++++++++++++
 gnutls.spec                    |    7 ++++++-
 2 files changed, 29 insertions(+), 1 deletions(-)
---
diff --git a/gnutls-2.12.14-direction.patch b/gnutls-2.12.14-direction.patch
new file mode 100644
index 0000000..822d3c1
--- /dev/null
+++ b/gnutls-2.12.14-direction.patch
@@ -0,0 +1,23 @@
+From 8fad624a274df3030cf65ceaaedf0b30dcd9fbbe Mon Sep 17 00:00:00 2001
+From: Nikos Mavrogiannopoulos <nmav at gnutls.org>
+Date: Fri, 06 Jan 2012 19:07:55 +0000
+Subject: Corrected functionality of gnutls_record_get_direction(). Reported by Philip Allison.
+
+---
+diff --git a/lib/gnutls_buffers.c b/lib/gnutls_buffers.c
+index 0c48d26..3d0887f 100644
+--- a/lib/gnutls_buffers.c
++++ b/lib/gnutls_buffers.c
+@@ -674,6 +674,10 @@ _gnutls_io_write_buffered (gnutls_session_t session,
+ {
+   mbuffer_head_st *const send_buffer = &session->internals.record_send_buffer;
+ 
++  /* to know where the procedure was interrupted.
++   */
++  session->internals.direction = 1;
++
+   _mbuffer_enqueue (send_buffer, bufel);
+ 
+   _gnutls_write_log
+--
+cgit v0.9.0.2
diff --git a/gnutls.spec b/gnutls.spec
index a3c1a89..d4f09d1 100644
--- a/gnutls.spec
+++ b/gnutls.spec
@@ -1,7 +1,7 @@
 Summary: A TLS protocol implementation
 Name: gnutls
 Version: 2.12.14
-Release: 2%{?dist}
+Release: 3%{?dist}
 # The libgnutls library is LGPLv2+, utilities and remaining libraries are GPLv3+
 License: GPLv3+ and LGPLv2+
 Group: System Environment/Libraries
@@ -23,6 +23,7 @@ Patch3: gnutls-2.12.2-nosrp.patch
 Patch4: gnutls-2.12.7-dsa-skiptests.patch
 Patch5: gnutls-2.12.14-leak.patch
 Patch6: gnutls-2.12.14-cve-2012-1573.patch
+Patch7: gnutls-2.12.14-direction.patch
 
 BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires: libgcrypt >= 1.2.2
@@ -92,6 +93,7 @@ This package contains Guile bindings for the library.
 %patch4 -p1 -b .skiptests
 %patch5 -p1 -b .leak
 %patch6 -p1 -b .packet
+%patch7 -p1 -b .direction
 
 for i in auth_srp_rsa.c auth_srp_sb64.c auth_srp_passwd.c auth_srp.c gnutls_srp.c ext_srp.c; do
     touch lib/$i
@@ -188,6 +190,9 @@ fi
 %{_datadir}/guile/site/gnutls.scm
 
 %changelog
+* Wed May 30 2012 Tomas Mraz <tmraz at redhat.com> 2.12.14-3
+- fix use with non-blocking sockets (#826293)
+
 * Fri Mar 23 2012 Tomas Mraz <tmraz at redhat.com> 2.12.14-2
 - fix CVE-2012-1573 - incorrect checks when parsing packets (#805432)
 - fix memory leak when generating keys (#796302)


More information about the scm-commits mailing list