mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-08-08 01:50:11 +03:00
nss-myhostname: do not return empty result with NSS_STATUS_SUCCESS
Fixes a bug introduced bydb50d326a4
. Fixes RHBZ#2167468 (https://bugzilla.redhat.com/show_bug.cgi?id=2167468). (cherry picked from commit1c3762937e
)
This commit is contained in:
committed by
Luca Boccassi
parent
7503626feb
commit
5ce6c73f2d
@ -345,9 +345,10 @@ enum nss_status _nss_myhostname_gethostbyname3_r(
|
||||
return NSS_STATUS_UNAVAIL;
|
||||
}
|
||||
|
||||
if (af == AF_INET6 && !socket_ipv6_is_enabled())
|
||||
goto not_found;
|
||||
|
||||
if (is_localhost(name)) {
|
||||
if (af == AF_INET6 && !socket_ipv6_is_enabled())
|
||||
goto not_found;
|
||||
|
||||
canonical = "localhost";
|
||||
local_address_ipv4 = htobe32(INADDR_LOOPBACK);
|
||||
|
Reference in New Issue
Block a user