mirror of git://sourceware.org/git/glibc.git
nss: Fix tst-nss-files-hosts-long on single-stack hosts (bug 24816)
getent implicitly passes AI_ADDRCONFIG to getaddrinfo by default.
Use --no-addrconfig to suppress that, so that both IPv4 and IPv6
lookups succeed even if the address family is not supported by the
host.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
(cherry picked from commit c75d20b5b2)
This commit is contained in:
parent
c95ef423d7
commit
16c7ed6e68
1
NEWS
1
NEWS
|
|
@ -55,6 +55,7 @@ The following bugs are resolved with this release:
|
||||||
[19193] nptl: pthread_kill, pthread_cancel should not fail after exit
|
[19193] nptl: pthread_kill, pthread_cancel should not fail after exit
|
||||||
[22542] CVE-2022-23219: Buffer overflow in sunrpc clnt_create for "unix"
|
[22542] CVE-2022-23219: Buffer overflow in sunrpc clnt_create for "unix"
|
||||||
[23734] la_symbind*() doesn't get called when LD_BIND_NOW is set
|
[23734] la_symbind*() doesn't get called when LD_BIND_NOW is set
|
||||||
|
[24816] Fix tst-nss-files-hosts-long on single-stack hosts
|
||||||
[25812] Libio vtable protection is sometimes only partially enforced
|
[25812] Libio vtable protection is sometimes only partially enforced
|
||||||
[26643] register x8 and quad sized NEON registers are not properly
|
[26643] register x8 and quad sized NEON registers are not properly
|
||||||
saved when using ld_audit on aarch64
|
saved when using ld_audit on aarch64
|
||||||
|
|
|
||||||
|
|
@ -28,14 +28,15 @@ do_test (void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* Run getent to fetch the IPv4 address for host test4.
|
/* Run getent to fetch the IPv4 address for host test4. This forces
|
||||||
This forces /etc/hosts to be parsed. */
|
/etc/hosts to be parsed. Use --no-addrconfig to return addresses
|
||||||
ret = system("getent ahostsv4 test4");
|
even in an IPv6-only environment. */
|
||||||
|
ret = system("getent --no-addrconfig ahostsv4 test4");
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
FAIL_EXIT1("ahostsv4 failed");
|
FAIL_EXIT1("ahostsv4 failed");
|
||||||
|
|
||||||
/* Likewise for IPv6. */
|
/* Likewise for IPv6. */
|
||||||
ret = system("getent ahostsv6 test6");
|
ret = system("getent --no-addrconfig ahostsv6 test6");
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
FAIL_EXIT1("ahostsv6 failed");
|
FAIL_EXIT1("ahostsv6 failed");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue