all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob a9cae863709a67615d5e82ea517e9291288ad14c 1456 bytes (raw)
name: gnu/packages/patches/glibc-2-26-0025.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
 
From 7ab87bccb657b02cac5a3360b11c67aff901de2e Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Fri, 1 Sep 2017 08:57:52 +0200
Subject: [PATCH 25/90] getaddrinfo: In gaih_inet, use h_errno for certain
 status values only

h_errno is not set for NSS_STATUS_SUCCESS, so its value might not be
accurate at this point.

(cherry picked from commit a2881ef01450295782b065f2f850f340d5c12c14)

diff --git a/ChangeLog b/ChangeLog
index 2f959d4c36..c58cd5ccd0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-09-01  Florian Weimer  <fweimer@redhat.com>
+
+	* sysdeps/posix/getaddrinfo.c (gaih_inet): Only use h_errno if
+	status indicates it is set.
+
 2017-09-01  Florian Weimer  <fweimer@redhat.com>
 
 	* sysdeps/posix/getaddrinfo.c (gaih_inet): Make reporting of NSS
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index eaf8bafcf4..9d9e7e2bf2 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -949,7 +949,10 @@ gaih_inet (const char *name, const struct gaih_service *service,
 	  __resolv_context_enable_inet6 (res_ctx, res_enable_inet6);
 	  __resolv_context_put (res_ctx);
 
-	  if (h_errno == NETDB_INTERNAL)
+	  /* If we have a failure which sets errno, report it using
+	     EAI_SYSTEM.  */
+	  if ((status == NSS_STATUS_TRYAGAIN || status == NSS_STATUS_UNAVAIL)
+	      && h_errno == NETDB_INTERNAL)
 	    {
 	      result = -EAI_SYSTEM;
 	      goto free_and_return;

debug log:

solving a9cae8637 ...
found a9cae8637 in https://yhetil.org/guix/87ine0pjiu.fsf@fastmail.com/ ||
	https://yhetil.org/guix/87d148pe57.fsf@fastmail.com/

applying [1/1] https://yhetil.org/guix/87ine0pjiu.fsf@fastmail.com/
diff --git a/gnu/packages/patches/glibc-2-26-0025.patch b/gnu/packages/patches/glibc-2-26-0025.patch
new file mode 100644
index 000000000..a9cae8637

1:29: trailing whitespace.
 
1:30: space before tab in indent.
 	* sysdeps/posix/getaddrinfo.c (gaih_inet): Make reporting of NSS
1:36: space before tab in indent.
 	  __resolv_context_enable_inet6 (res_ctx, res_enable_inet6);
1:37: space before tab in indent.
 	  __resolv_context_put (res_ctx);
1:38: trailing whitespace.
 
Checking patch gnu/packages/patches/glibc-2-26-0025.patch...
Applied patch gnu/packages/patches/glibc-2-26-0025.patch cleanly.
warning: squelched 3 whitespace errors
warning: 8 lines add whitespace errors.

skipping https://yhetil.org/guix/87d148pe57.fsf@fastmail.com/ for a9cae8637
index at:
100644 a9cae863709a67615d5e82ea517e9291288ad14c	gnu/packages/patches/glibc-2-26-0025.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.