Public bug reported: The host /etc/nsswitch.conf is not being honored inside the snap container leading to .docker (or using my custom plugin .lxd) hosts not being resolved.
How to reproduce: 1. Run a docker host name 'test' with a http server in it. 2. Install libnss-docker. 3. ping test.docker and see that it works. 4. Open snap firefox. 5. Access http://test.docker and see that it doesn't resolve the IP properly, thus the site is not opened. Another way to reproduce: 1. Create a lxd container named 'test' with a http server in it. 2. Download and install: https://launchpad.net/~shemgp/+archive/ubuntu/other-apps/+files/libnss-lxd_0.06-0ubuntu2~impish_amd64.deb 3. Ping test.lxd and see that it works. 4. Open snap firefox. 5. Access http://test.lxd and see that it doesn't resolve the IP properly, thus not being able to access the website. I'm not sure how to be able to resolve this since the binary is in the host? Perhaps systemd-resolved's dnsmasq can be coaxed to use /etc/nsswitch.conf and the container's be coaxed to use the hosts :53 dns? ProblemType: Bug DistroRelease: Ubuntu 22.04 Package: snapd 2.54.3+git26.g360067e+22.04 Uname: Linux 5.16.1-xanmod1 x86_64 ApportVersion: 2.20.11-0ubuntu78 Architecture: amd64 CasperMD5CheckResult: unknown CurrentDesktop: ubuntu:GNOME Date: Mon Mar 7 14:05:09 2022 EcryptfsInUse: Yes InstallationDate: Installed on 2018-10-03 (1251 days ago) InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725) SourcePackage: snapd UpgradeStatus: No upgrade log present (probably fresh install) ** Affects: snapd (Ubuntu) Importance: Undecided Status: New ** Tags: amd64 apport-bug jammy -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1963864 Title: Can't resolve using custom nsswitch.conf items To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1963864/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs