mirror of
https://abf.rosa.ru/djam/glibc.git
synced 2025-02-24 07:22:47 +00:00
Rediff patch
This commit is contained in:
parent
ebc136a5a8
commit
1b06f41956
1 changed files with 31 additions and 52 deletions
|
@ -1,28 +1,7 @@
|
||||||
commit d5dd6189d506068ed11c8bfa1e1e9bffde04decd
|
diff -Naur glibc-2.15-a316c1f.orig/nss/digits_dots.c glibc-2.15-a316c1f/nss/digits_dots.c
|
||||||
Author: Andreas Schwab <schwab@suse.de>
|
--- glibc-2.15-a316c1f.orig/nss/digits_dots.c 2016-02-19 15:54:24.962743572 +0300
|
||||||
Date: Mon Jan 21 17:41:28 2013 +0100
|
+++ glibc-2.15-a316c1f/nss/digits_dots.c 2016-02-19 15:54:25.084743580 +0300
|
||||||
|
@@ -47,7 +47,10 @@
|
||||||
Fix parsing of numeric hosts in gethostbyname_r
|
|
||||||
|
|
||||||
diff --git glibc-2.17-c758a686/nss/Makefile glibc-2.17-c758a686/nss/Makefile
|
|
||||||
index 449a258..553eafa 100644
|
|
||||||
--- glibc-2.17-c758a686/nss/Makefile
|
|
||||||
+++ glibc-2.17-c758a686/nss/Makefile
|
|
||||||
@@ -37,7 +37,8 @@ install-bin := getent makedb
|
|
||||||
makedb-modules = xmalloc hash-string
|
|
||||||
extra-objs += $(makedb-modules:=.o)
|
|
||||||
|
|
||||||
-tests = test-netdb tst-nss-test1 bug17079 tst-nss-getpwent
|
|
||||||
+tests = test-netdb tst-nss-test1 bug17079 tst-nss-getpwent \
|
|
||||||
+ test-digits-dots
|
|
||||||
xtests = bug-erange
|
|
||||||
|
|
||||||
include ../Makeconfig
|
|
||||||
diff --git glibc-2.17-c758a686/nss/digits_dots.c glibc-2.17-c758a686/nss/digits_dots.c
|
|
||||||
index 2b86295..e007ef4 100644
|
|
||||||
--- glibc-2.17-c758a686/nss/digits_dots.c
|
|
||||||
+++ glibc-2.17-c758a686/nss/digits_dots.c
|
|
||||||
@@ -46,7 +46,10 @@ __nss_hostname_digits_dots (const char *name, struct hostent *resbuf,
|
|
||||||
{
|
{
|
||||||
if (h_errnop)
|
if (h_errnop)
|
||||||
*h_errnop = NETDB_INTERNAL;
|
*h_errnop = NETDB_INTERNAL;
|
||||||
|
@ -34,7 +13,7 @@ index 2b86295..e007ef4 100644
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,14 +86,16 @@ __nss_hostname_digits_dots (const char *name, struct hostent *resbuf,
|
@@ -84,14 +87,16 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
size_needed = (sizeof (*host_addr)
|
size_needed = (sizeof (*host_addr)
|
||||||
|
@ -53,7 +32,7 @@ index 2b86295..e007ef4 100644
|
||||||
__set_errno (ERANGE);
|
__set_errno (ERANGE);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
@@ -109,7 +114,7 @@ __nss_hostname_digits_dots (const char *name, struct hostent *resbuf,
|
@@ -110,7 +115,7 @@
|
||||||
*buffer_size = 0;
|
*buffer_size = 0;
|
||||||
__set_errno (save);
|
__set_errno (save);
|
||||||
if (h_errnop != NULL)
|
if (h_errnop != NULL)
|
||||||
|
@ -62,7 +41,7 @@ index 2b86295..e007ef4 100644
|
||||||
*result = NULL;
|
*result = NULL;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
@@ -149,7 +154,9 @@ __nss_hostname_digits_dots (const char *name, struct hostent *resbuf,
|
@@ -150,7 +155,9 @@
|
||||||
if (! ok)
|
if (! ok)
|
||||||
{
|
{
|
||||||
*h_errnop = HOST_NOT_FOUND;
|
*h_errnop = HOST_NOT_FOUND;
|
||||||
|
@ -73,7 +52,7 @@ index 2b86295..e007ef4 100644
|
||||||
*result = NULL;
|
*result = NULL;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
@@ -190,7 +197,7 @@ __nss_hostname_digits_dots (const char *name, struct hostent *resbuf,
|
@@ -191,7 +198,7 @@
|
||||||
if (buffer_size == NULL)
|
if (buffer_size == NULL)
|
||||||
*status = NSS_STATUS_SUCCESS;
|
*status = NSS_STATUS_SUCCESS;
|
||||||
else
|
else
|
||||||
|
@ -82,7 +61,7 @@ index 2b86295..e007ef4 100644
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -201,15 +208,6 @@ __nss_hostname_digits_dots (const char *name, struct hostent *resbuf,
|
@@ -202,15 +209,6 @@
|
||||||
|
|
||||||
if ((isxdigit (name[0]) && strchr (name, ':') != NULL) || name[0] == ':')
|
if ((isxdigit (name[0]) && strchr (name, ':') != NULL) || name[0] == ':')
|
||||||
{
|
{
|
||||||
|
@ -98,7 +77,7 @@ index 2b86295..e007ef4 100644
|
||||||
switch (af)
|
switch (af)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
@@ -225,7 +223,10 @@ __nss_hostname_digits_dots (const char *name, struct hostent *resbuf,
|
@@ -226,7 +224,10 @@
|
||||||
/* This is not possible. We cannot represent an IPv6 address
|
/* This is not possible. We cannot represent an IPv6 address
|
||||||
in an `struct in_addr' variable. */
|
in an `struct in_addr' variable. */
|
||||||
*h_errnop = HOST_NOT_FOUND;
|
*h_errnop = HOST_NOT_FOUND;
|
||||||
|
@ -110,7 +89,7 @@ index 2b86295..e007ef4 100644
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
@@ -233,42 +234,6 @@ __nss_hostname_digits_dots (const char *name, struct hostent *resbuf,
|
@@ -234,42 +235,6 @@
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,7 +132,7 @@ index 2b86295..e007ef4 100644
|
||||||
for (cp = name;; ++cp)
|
for (cp = name;; ++cp)
|
||||||
{
|
{
|
||||||
if (!*cp)
|
if (!*cp)
|
||||||
@@ -281,7 +246,9 @@ __nss_hostname_digits_dots (const char *name, struct hostent *resbuf,
|
@@ -282,7 +247,9 @@
|
||||||
if (inet_pton (AF_INET6, name, host_addr) <= 0)
|
if (inet_pton (AF_INET6, name, host_addr) <= 0)
|
||||||
{
|
{
|
||||||
*h_errnop = HOST_NOT_FOUND;
|
*h_errnop = HOST_NOT_FOUND;
|
||||||
|
@ -164,11 +143,10 @@ index 2b86295..e007ef4 100644
|
||||||
*result = NULL;
|
*result = NULL;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
diff --git glibc-2.17-c758a686/nss/getXXbyYY_r.c glibc-2.17-c758a686/nss/getXXbyYY_r.c
|
diff -Naur glibc-2.15-a316c1f.orig/nss/getXXbyYY_r.c glibc-2.15-a316c1f/nss/getXXbyYY_r.c
|
||||||
index 1067744..44d00f4 100644
|
--- glibc-2.15-a316c1f.orig/nss/getXXbyYY_r.c 2016-02-19 15:54:24.961743572 +0300
|
||||||
--- glibc-2.17-c758a686/nss/getXXbyYY_r.c
|
+++ glibc-2.15-a316c1f/nss/getXXbyYY_r.c 2016-02-19 15:54:25.084743580 +0300
|
||||||
+++ glibc-2.17-c758a686/nss/getXXbyYY_r.c
|
@@ -180,6 +180,9 @@
|
||||||
@@ -179,6 +179,9 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
|
|
||||||
case -1:
|
case -1:
|
||||||
return errno;
|
return errno;
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -178,20 +156,21 @@ index 1067744..44d00f4 100644
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -288,7 +291,7 @@ done:
|
diff -Naur glibc-2.15-a316c1f.orig/nss/Makefile glibc-2.15-a316c1f/nss/Makefile
|
||||||
/* This happens when we weren't able to use a service for reasons other
|
--- glibc-2.15-a316c1f.orig/nss/Makefile 2016-02-19 15:54:24.962743572 +0300
|
||||||
than the module not being found. In such a case, we'd want to tell the
|
+++ glibc-2.15-a316c1f/nss/Makefile 2016-02-19 15:54:45.764744976 +0300
|
||||||
caller that errno has the real reason for failure. */
|
@@ -42,7 +42,7 @@
|
||||||
- *h_errnop = NETDB_INTERNAL;
|
makedb-modules = xmalloc hash-string
|
||||||
+ *h_errnop = NETDB_INTERNAL;
|
extra-objs += $(makedb-modules:=.o)
|
||||||
else if (status != NSS_STATUS_SUCCESS && !any_service)
|
|
||||||
/* We were not able to use any service. */
|
-tests = test-netdb tst-nss-test1
|
||||||
*h_errnop = NO_RECOVERY;
|
+tests = test-netdb tst-nss-test1 test-digits-dots
|
||||||
diff --git glibc-2.17-c758a686/nss/test-digits-dots.c glibc-2.17-c758a686/nss/test-digits-dots.c
|
xtests = bug-erange
|
||||||
new file mode 100644
|
|
||||||
index 0000000..1efa344
|
include ../Makeconfig
|
||||||
--- /dev/null
|
diff -Naur glibc-2.15-a316c1f.orig/nss/test-digits-dots.c glibc-2.15-a316c1f/nss/test-digits-dots.c
|
||||||
+++ glibc-2.17-c758a686/nss/test-digits-dots.c
|
--- glibc-2.15-a316c1f.orig/nss/test-digits-dots.c 1970-01-01 03:00:00.000000000 +0300
|
||||||
|
+++ glibc-2.15-a316c1f/nss/test-digits-dots.c 2016-02-19 15:54:25.084743580 +0300
|
||||||
@@ -0,0 +1,38 @@
|
@@ -0,0 +1,38 @@
|
||||||
+/* Copyright (C) 2013 Free Software Foundation, Inc.
|
+/* Copyright (C) 2013 Free Software Foundation, Inc.
|
||||||
+ This file is part of the GNU C Library.
|
+ This file is part of the GNU C Library.
|
||||||
|
|
Loading…
Add table
Reference in a new issue