public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/curl] curl-v8.23.0-3: do not ignore poll() failures other than EINTR (#919127)
@ 2026-11-03 12:35 Kamil Dudka
  0 siblings, 0 replies; only message in thread
From: Kamil Dudka @ 2026-11-03 12:35 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/curl
Branch : curl-v8.23.0-3
Commit : 590edc3b22bdac4d6c7ba39dcff53c354580a4ab
Author : Kamil Dudka <kdudka@redhat.com>
Date   : 2013-03-12T11:35:18+01:00
Stats  : +95/-49 in 4 file(s)
URL    : https://src.fedoraproject.org/rpms/curl/c/590edc3b22bdac4d6c7ba39dcff53c354580a4ab?branch=curl-v8.23.0-3

Log:
do not ignore poll() failures other than EINTR (#919127)

---
diff --git a/0002-curl-7.29.0-9d0af301.patch b/0002-curl-7.29.0-9d0af301.patch
new file mode 100644
index 0000000..0b9f7aa
--- /dev/null
+++ b/0002-curl-7.29.0-9d0af301.patch
@@ -0,0 +1,47 @@
+From 8d25353ae1661ce50fe564e733f3ef45004f4bdf Mon Sep 17 00:00:00 2001
+From: Kamil Dudka <kdudka@redhat.com>
+Date: Tue, 5 Mar 2013 17:51:01 +0100
+Subject: [PATCH] nss: fix misplaced code enabling non-blocking socket mode
+
+The option needs to be set on the SSL socket.  Setting it on the model
+takes no effect.  Note that the non-blocking mode is still not enabled
+for the handshake because the code is not yet ready for that.
+
+[upstream commit 9d0af3018c5db25f5adda216dbcad6056b4a3107]
+---
+ lib/nss.c |   12 ++++++------
+ 1 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/lib/nss.c b/lib/nss.c
+index 8a2cb09..a2c5c63 100644
+--- a/lib/nss.c
++++ b/lib/nss.c
+@@ -1237,12 +1237,6 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
+     goto error;
+   model = SSL_ImportFD(NULL, model);
+ 
+-  /* make the socket nonblocking */
+-  sock_opt.option = PR_SockOpt_Nonblocking;
+-  sock_opt.value.non_blocking = PR_TRUE;
+-  if(PR_SetSocketOption(model, &sock_opt) != PR_SUCCESS)
+-    goto error;
+-
+   if(SSL_OptionSet(model, SSL_SECURITY, PR_TRUE) != SECSuccess)
+     goto error;
+   if(SSL_OptionSet(model, SSL_HANDSHAKE_AS_SERVER, PR_FALSE) != SECSuccess)
+@@ -1415,6 +1409,12 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
+     goto error;
+   }
+ 
++  /* switch the SSL socket into non-blocking mode */
++  sock_opt.option = PR_SockOpt_Nonblocking;
++  sock_opt.value.non_blocking = PR_TRUE;
++  if(PR_SetSocketOption(connssl->handle, &sock_opt) != PR_SUCCESS)
++    goto error;
++
+   connssl->state = ssl_connection_complete;
+   conn->recv[sockindex] = nss_recv;
+   conn->send[sockindex] = nss_send;
+-- 
+1.7.1
+

diff --git a/0002-curl-7.29.0-9d0af3018.patch b/0002-curl-7.29.0-9d0af3018.patch
deleted file mode 100644
index 0b9f7aa..0000000
--- a/0002-curl-7.29.0-9d0af3018.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 8d25353ae1661ce50fe564e733f3ef45004f4bdf Mon Sep 17 00:00:00 2001
-From: Kamil Dudka <kdudka@redhat.com>
-Date: Tue, 5 Mar 2013 17:51:01 +0100
-Subject: [PATCH] nss: fix misplaced code enabling non-blocking socket mode
-
-The option needs to be set on the SSL socket.  Setting it on the model
-takes no effect.  Note that the non-blocking mode is still not enabled
-for the handshake because the code is not yet ready for that.
-
-[upstream commit 9d0af3018c5db25f5adda216dbcad6056b4a3107]
----
- lib/nss.c |   12 ++++++------
- 1 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/lib/nss.c b/lib/nss.c
-index 8a2cb09..a2c5c63 100644
---- a/lib/nss.c
-+++ b/lib/nss.c
-@@ -1237,12 +1237,6 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
-     goto error;
-   model = SSL_ImportFD(NULL, model);
- 
--  /* make the socket nonblocking */
--  sock_opt.option = PR_SockOpt_Nonblocking;
--  sock_opt.value.non_blocking = PR_TRUE;
--  if(PR_SetSocketOption(model, &sock_opt) != PR_SUCCESS)
--    goto error;
--
-   if(SSL_OptionSet(model, SSL_SECURITY, PR_TRUE) != SECSuccess)
-     goto error;
-   if(SSL_OptionSet(model, SSL_HANDSHAKE_AS_SERVER, PR_FALSE) != SECSuccess)
-@@ -1415,6 +1409,12 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
-     goto error;
-   }
- 
-+  /* switch the SSL socket into non-blocking mode */
-+  sock_opt.option = PR_SockOpt_Nonblocking;
-+  sock_opt.value.non_blocking = PR_TRUE;
-+  if(PR_SetSocketOption(connssl->handle, &sock_opt) != PR_SUCCESS)
-+    goto error;
-+
-   connssl->state = ssl_connection_complete;
-   conn->recv[sockindex] = nss_recv;
-   conn->send[sockindex] = nss_send;
--- 
-1.7.1
-

diff --git a/0003-curl-7.29.0-491e026c.patch b/0003-curl-7.29.0-491e026c.patch
new file mode 100644
index 0000000..c136e34
--- /dev/null
+++ b/0003-curl-7.29.0-491e026c.patch
@@ -0,0 +1,39 @@
+From a2e6eadf6a72f7587eb9bc1ad52383e4c5507b12 Mon Sep 17 00:00:00 2001
+From: Kamil Dudka <kdudka@redhat.com>
+Date: Mon, 11 Mar 2013 16:57:25 +0100
+Subject: [PATCH 1/2] easy: do not ignore poll() failures other than EINTR
+
+[upstream commit 491e026ccda0e60975fa6e2e9cf3ccca37e18f7b]
+---
+ lib/easy.c |   12 ++++++++++--
+ 1 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/lib/easy.c b/lib/easy.c
+index c27deff..2e747bb 100644
+--- a/lib/easy.c
++++ b/lib/easy.c
+@@ -441,11 +441,19 @@ CURLcode curl_easy_perform(CURL *easy)
+ 
+   while(!done && !mcode) {
+     int still_running;
++    int ret;
+ 
+-    mcode = curl_multi_wait(multi, NULL, 0, 1000, NULL);
++    mcode = curl_multi_wait(multi, NULL, 0, 1000, &ret);
++
++    if(mcode == CURLM_OK) {
++      if(ret == -1) {
++        /* poll() failed not on EINTR, indicate a network problem */
++        code = CURLE_RECV_ERROR;
++        break;
++      }
+ 
+-    if(mcode == CURLM_OK)
+       mcode = curl_multi_perform(multi, &still_running);
++    }
+ 
+     /* only read 'still_running' if curl_multi_perform() return OK */
+     if((mcode == CURLM_OK) && !still_running) {
+-- 
+1.7.1
+

diff --git a/curl.spec b/curl.spec
index f05e2ea..ee1a65b 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,7 +1,7 @@
 Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
 Name: curl
 Version: 7.29.0
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: MIT
 Group: Applications/Internet
 Source: http://curl.haxx.se/download/%{name}-%{version}.tar.lzma
@@ -11,7 +11,10 @@ Source2: curlbuild.h
 Patch1: 0001-curl-7.29.0-da3fc1ee.patch
 
 # switch SSL socket into non-blocking mode after handshake
-Patch2: 0002-curl-7.29.0-9d0af3018.patch
+Patch2: 0002-curl-7.29.0-9d0af301.patch
+
+# do not ignore poll() failures other than EINTR
+Patch3: 0003-curl-7.29.0-491e026c.patch
 
 # patch making libcurl multilib ready
 Patch101: 0101-curl-7.29.0-multilib.patch
@@ -108,6 +111,7 @@ documentation of the library, too.
 # upstream patches
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 # Fedora patches
 %patch101 -p1
@@ -225,6 +229,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/aclocal/libcurl.m4
 
 %changelog
+* Tue Mar 12 2013 Kamil Dudka <kdudka@redhat.com> 7.29.0-4
+- do not ignore poll() failures other than EINTR (#919127)
+
 * Wed Mar 06 2013 Kamil Dudka <kdudka@redhat.com> 7.29.0-3
 - switch SSL socket into non-blocking mode after handshake
 - drop the hide_selinux.c hack no longer needed in %%check

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-03 12:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-03 12:35 [rpms/curl] curl-v8.23.0-3: do not ignore poll() failures other than EINTR (#919127) Kamil Dudka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox