Project

General

Profile

Bug #10893

AppArmor prevents the user from adding a USB printer

Added by emmapeel over 3 years ago. Updated over 3 years ago.

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

100%

QA Check:
Pass
Feature Branch:
bugfix/10893-printer-ipp4
Type of work:
Code
Blueprint:
Starter:
Affected tool:

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.

Associated revisions

Revision 076cbc0a (diff)
Added by intrigeri over 3 years ago

CUPS AppArmor profile adjustments: fix globing syntax for ipp14 and friends.

AppArmor regexps don't understand '+' yet, so
/usr/lib/cups/backend/ipp14 was not matched.

Will-fix: #10893

Revision 340e3151
Added by anonym over 3 years ago

Merge remote-tracking branch 'origin/bugfix/10893-printer-ipp4' into testing

Fix-committed: #10893

History

#1 Updated by intrigeri over 3 years ago

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

#2 Updated by intrigeri over 3 years ago

  • 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 over 3 years ago

--- 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 over 3 years ago

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

#5 Updated by intrigeri over 3 years ago

  • Status changed from Confirmed to In Progress

#6 Updated by intrigeri over 3 years ago

  • 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 over 3 years ago

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

#8 Updated by anonym over 3 years ago

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

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

#9 Updated by anonym over 3 years ago

  • Status changed from Fix committed to Resolved

Also available in: Atom PDF