"localhost" and hostname resolution on hosts with no systemd-resolved
Context
Flatpak containers currently do not resolve localhost
and hostname on hosts that don't use systemd-resolved and have no relevant entries in /etc/hosts
.
Description
Runtime's nsswitch.conf is set to:
hosts: files resolve [!UNAVAIL=return] dns
Adding nss-myhostname into the runtime and configuring nsswitch.conf to use it should fix this problem:
hosts: files myhostname resolve [!UNAVAIL=return] dns
Acceptance Criteria
$ flatpak run --command=getent org.freedesktop.Platform ahosts localhost
::1 STREAM localhost
::1 DGRAM
::1 RAW
127.0.0.1 STREAM
127.0.0.1 DGRAM
127.0.0.1 RAW
Edited by dos