OpenPrinting / ghostscript-printer-app

Ghostscript Printer Application
Apache License 2.0
28 stars 12 forks source link

snap cannot access USB devices #1

Open julian-klode opened 2 years ago

julian-klode commented 2 years ago

Running on focal, USB devices are not discovered due to AppArmor denial. Works in devmode. Despite being connected to raw-usb?

Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:150): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/busnum" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:151): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/devnum" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:152): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/speed" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:153): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/descriptors" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:154): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/busnum" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:155): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/devnum" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:156): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/speed" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:157): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/descriptors" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:158): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/busnum" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:159): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/devnum" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
tillkamppeter commented 2 years ago

Already around 2 weeks ago the Snap Store has approved automatic interface connection for the Printer Applications, especially also for the "usb-raw" interface. So there should be no denials on USB printers any more. Perhaps uninstall and re-install the Printer Application if it did not auto-connect on one of the recent updates.