mirror of
https://github.com/systemd/systemd
synced 2024-07-22 02:34:54 +00:00
nss-myhostname: do not return empty result with NSS_STATUS_SUCCESS
Fixes a bug introduced by db50d326a4
.
Fixes RHBZ#2167468 (https://bugzilla.redhat.com/show_bug.cgi?id=2167468).
This commit is contained in:
parent
a3b993ca3f
commit
1c3762937e
|
@ -346,9 +346,10 @@ enum nss_status _nss_myhostname_gethostbyname3_r(
|
||||||
return NSS_STATUS_UNAVAIL;
|
return NSS_STATUS_UNAVAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (af == AF_INET6 && !socket_ipv6_is_enabled())
|
||||||
|
goto not_found;
|
||||||
|
|
||||||
if (is_localhost(name)) {
|
if (is_localhost(name)) {
|
||||||
if (af == AF_INET6 && !socket_ipv6_is_enabled())
|
|
||||||
goto not_found;
|
|
||||||
|
|
||||||
canonical = "localhost";
|
canonical = "localhost";
|
||||||
local_address_ipv4 = htobe32(INADDR_LOOPBACK);
|
local_address_ipv4 = htobe32(INADDR_LOOPBACK);
|
||||||
|
|
Loading…
Reference in a new issue