[Bug 1838038] Re: [snap] Snapped apps do not work with .local mdns/avahi name resolution

2021-04-19 Thread James Henstridge
Just repeating what I said on the forum, I believe this could be
implemented through updates to the base snaps with no changes to snapd
or any application snaps.

The mdns4_minimal NSS plugin is an 18K binary (which compresses to about
6KB) that delegates its lookups to avahi-daemon using a single purpose
lookups-only unix socket protocol (i.e. no D-Bus access).  The AppArmor
 policy fragment grants access to this socket,
so any snap plugging "network" already has permission to communicate.

If the plugin cannot connect to Avahi, it should error out very quickly.

Updating the base snaps to include the NSS plugin and reference it in
their nsswitch.conf file would likely be all that is needed.  It should
work equally well for applications on classic distros and those on
Ubuntu Core with the avahi snap installed.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1838038

Title:
  [snap] Snapped apps do not work with .local mdns/avahi name resolution

To manage notifications about this bug go to:
https://bugs.launchpad.net/snap-core18/+bug/1838038/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1838038] Re: [snap] Snapped apps do not work with .local mdns/avahi name resolution

2021-04-19 Thread Till Kamppeter
Applied a Snap-side workaround to my Snaps which implements the fix
presented in the snapcraft.io thread mentioned in my previous post:

CUPS Snap:

https://github.com/OpenPrinting/cups-snap/commit/f241f3f02

PostScript Printer Application:

https://github.com/OpenPrinting/ps-printer-app/commit/1f6ca389

Note that doing this on any Snap which needs it in the future is
awkward, so we really need to fix core18 and core20.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1838038

Title:
  [snap] Snapped apps do not work with .local mdns/avahi name resolution

To manage notifications about this bug go to:
https://bugs.launchpad.net/snap-core18/+bug/1838038/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1838038] Re: [snap] Snapped apps do not work with .local mdns/avahi name resolution

2021-04-19 Thread Till Kamppeter
Adding snap-core18 and snap-core20 tasks as it is a problem of core18
and core20 missing support for looking up host names via mDNS/DNS-SD.
The problem occurs also in other Snaps not only in the Chromium Browser
Snap. Therefore the fix for this bug is essentially important and
urgently needed.

Note that installing nscd is only a workaround, which can cause security
problems (aacording to Jamie Strandboge) when seeding it and also it
would only help Ubuntu users.

Especially also the CUPS Snap (https://github.com/OpenPrinting/cups-
snap) and Printer Application Snaps (the way to snap printer and scanner
drivers, required for the CUPS Snap, currently, we have the PostScript
Printer Application, https://github.com/OpenPrinting/ps-printer-app) are
affected as they internally use mDNS .local addresses to access network
devices. As we want to switch over printing in Ubuntu to the CUPS Snap
and also want to give manufacturers a way to publish distribution-
independent snapped printer/scanner drivers this problem needs to get
urgently fixed.

A suggested fix can be found in this thread:

https://forum.snapcraft.io/t/no-mdns-support-in-snaps-should-core-have-a
-modified-nsswitch-conf/

The /etc/nsswitch.conf file needs a simple change, replacing the line

hosts:  files dns

by

hosts:  files mdns4_minimal [NOTFOUND=return] dns

and the libnss-mdns package (provides libnss_mdns*.so*) needs to get
installed into the coreXX images.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1838038

Title:
  [snap] Snapped apps do not work with .local mdns/avahi name resolution

To manage notifications about this bug go to:
https://bugs.launchpad.net/snap-core18/+bug/1838038/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1838038] Re: [snap] Snapped apps do not work with .local mdns/avahi name resolution

2021-04-19 Thread Till Kamppeter
** Also affects: snap-core20
   Importance: Undecided
   Status: New

** Also affects: snap-core18
   Importance: Undecided
   Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1838038

Title:
  [snap] Snapped apps do not work with .local mdns/avahi name resolution

To manage notifications about this bug go to:
https://bugs.launchpad.net/snap-core18/+bug/1838038/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1838038] Re: [snap] Snapped apps do not work with .local mdns/avahi name resolution

2020-01-24 Thread Till Kamppeter
Now with nscd running and snapd restarted I have also cloded and re-
opened the Chromium browser and I can access my printer's web interface
now.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1838038

Title:
  [snap] Snapped apps do not work with .local mdns/avahi name resolution

To manage notifications about this bug go to:
https://bugs.launchpad.net/snapd/+bug/1838038/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1838038] Re: [snap] Snapped apps do not work with .local mdns/avahi name resolution

2020-01-24 Thread Till Kamppeter
I have to install nscd on the host machine and then restart snapd and my
snap:

sudo systemctl restart snapd
sudo snap restart printing-stack-snap

and after that cups-browsed succeeds to resolve .local host names.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1838038

Title:
  [snap] Snapped apps do not work with .local mdns/avahi name resolution

To manage notifications about this bug go to:
https://bugs.launchpad.net/snapd/+bug/1838038/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs