Bug #10893

AppArmor prevents the user from adding a USB printer

Added by emmapeel 2016-01-11 16:59:33 . Updated 2016-01-27 13:31:32 .

Status:
Resolved
Priority:
Elevated
Assignee:
Category:
Hardware support
Target version:
Start date:
2016-01-11
Due date:
% Done:

100%

Feature Branch:
bugfix/10893-printer-ipp4
Type of work:
Code
Blueprint:

Starter:
Affected tool:
Deliverable for:

Description

Trying to add a printer in Tails 2.0beta

- Plug printer

- Open System settings/Printers/Add a printer
- Choose printer from the menu (appears twice, same result with both entries)

Nothing happens. No error message.

On dmesg I see:


[  318.270237] audit: type=1400 audit(1452509365.533:27): apparmor="DENIED" operation="exec" profile="/usr/sbin/cupsd" name="/usr/lib/cups/backend/ipp14" pid=26342 comm="cups-deviced" requested_mask="x" denied_mask="x" fsuid=7 ouid=0
[  890.408040] usb 4-2: new full-speed USB device number 2 using ohci-pci
[  890.583072] usb 4-2: New USB device found, idVendor=03f0, idProduct=7e04
[  890.583084] usb 4-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  890.583090] usb 4-2: Product: Deskjet F4100 series
[  890.583095] usb 4-2: Manufacturer: HP
[  890.583099] usb 4-2: SerialNumber: CN86N7W36904TJ
[  891.711455] WARNING! power/level is deprecated; use power/control instead
[  891.824787] usblp 4-2:1.1: usblp1: USB Bidirectional printer dev 2 if 1 alt 0 proto 2 vid 0x03F0 pid 0x7E04
[  891.824828] usbcore: registered new interface driver usblp
[  897.548273] usblp1: removed
[  897.555304] usblp 4-2:1.1: usblp1: USB Bidirectional printer dev 2 if 1 alt 0 proto 2 vid 0x03F0 pid 0x7E04
[  917.788871] usblp1: removed
[  917.795185] usblp 4-2:1.1: usblp1: USB Bidirectional printer dev 2 if 1 alt 0 proto 2 vid 0x03F0 pid 0x7E04
[  920.632645] audit: type=1400 audit(1452509967.896:28): apparmor="DENIED" operation="exec" profile="/usr/sbin/cupsd" name="/usr/lib/cups/backend/ipp14" pid=27863 comm="cups-deviced" requested_mask="x" denied_mask="x" fsuid=7 ouid=0
[  925.336417] usblp1: removed
[  925.343255] usblp 4-2:1.1: usblp1: USB Bidirectional printer dev 2 if 1 alt 0 proto 2 vid 0x03F0 pid 0x7E04
[  928.080211] audit: type=1400 audit(1452509975.344:29): apparmor="DENIED" operation="exec" profile="/usr/sbin/cupsd" name="/usr/lib/cups/backend/ipp14" pid=27918 comm="cups-deviced" requested_mask="x" denied_mask="x" fsuid=7 ouid=0
[  933.564877] usblp1: removed
[  933.571120] usblp 4-2:1.1: usblp1: USB Bidirectional printer dev 2 if 1 alt 0 proto 2 vid 0x03F0 pid 0x7E04
[  936.350413] audit: type=1400 audit(1452509983.612:30): apparmor="DENIED" operation="exec" profile="/usr/sbin/cupsd" name="/usr/lib/cups/backend/ipp14" pid=27971 comm="cups-deviced" requested_mask="x" denied_mask="x" fsuid=7 ouid=0
[  942.100303] usblp1: removed
[  942.107265] usblp 4-2:1.1: usblp1: USB Bidirectional printer dev 2 if 1 alt 0 proto 2 vid 0x03F0 pid 0x7E04
[  944.875028] audit: type=1400 audit(1452509992.136:31): apparmor="DENIED" operation="exec" profile="/usr/sbin/cupsd" name="/usr/lib/cups/backend/ipp14" pid=28024 comm="cups-deviced" requested_mask="x" denied_mask="x" fsuid=7 ouid=0

IIRC Printers are not persistent in this install. Will confirm when rebooting.


Subtasks


History

#1 Updated by intrigeri 2016-01-11 18:12:22

  • Assignee set to intrigeri
  • Target version set to Tails_2.0

#2 Updated by intrigeri 2016-01-11 20:57:58

  • Priority changed from Normal to Elevated

This seems to be a regression, I’d like to fix it in time for 2.0 => bumping priority.

#3 Updated by intrigeri 2016-01-12 14:01:06

--- a/config/chroot_local-patches/apparmor-adjust-cupsd-profile.diff
+++ b/config/chroot_local-patches/apparmor-adjust-cupsd-profile.diff
@@ -40,7 +40,7 @@
    /usr/lib/cups/backend/http ixr,
 +  /usr/lib/cups/backend/https ixr,
    /usr/lib/cups/backend/ipp ixr,
-+  /usr/lib/cups/backend/ipp[0-9]+ ixr,
++  /usr/lib/cups/backend/ipp[0-9][0-9] ixr,
 +  /usr/lib/cups/backend/ipps ixr,
    /usr/lib/cups/backend/lpd ixr,
    /usr/lib/cups/backend/parallel ixr,

… might fix it.

#4 Updated by anonym 2016-01-12 14:26:06

I’ve also seen this in Tails 2.0~rc1.

#5 Updated by intrigeri 2016-01-13 13:00:43

  • Status changed from Confirmed to In Progress

Applied in changeset commit:076cbc0a68fb14b1676217b0fa2daa3ea84c3938.

#6 Updated by intrigeri 2016-01-13 13:07:17

  • Subject changed from Tails Jessie: Apparmor don't let me add a printer to AppArmor prevents the user from adding a USB printer
  • Assignee changed from intrigeri to anonym
  • % Done changed from 0 to 20
  • QA Check set to Ready for QA
  • Feature Branch set to bugfix/10893-printer-ipp4

I don’t have access to hardware to test this right now, and apparently anonym has, plus I’m quite confident my fix is OK, so here you go.

#7 Updated by anonym 2016-01-18 02:47:15

  • Status changed from In Progress to Fix committed
  • % Done changed from 20 to 100

Applied in changeset commit:340e3151f40527f32d9b97e64e591fd25a51cf21.

#8 Updated by anonym 2016-01-18 02:58:36

  • Assignee deleted (anonym)
  • QA Check changed from Ready for QA to Pass

The AppArmor issue is indeed fixed but then I got Bug #10965. :)

#9 Updated by anonym 2016-01-27 13:31:32

  • Status changed from Fix committed to Resolved