allow writing to systemd journal sockets

Bug #1402350 reported by dino99
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apparmor (Ubuntu)
Triaged
Medium
Unassigned
cups (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Using a desktop with vivid i386 and a USB connected HP Photosmart C4585: - Sending a print job does not activate the USB port.
- Once logged into gnome-shell an icon is in the systray for a few seconds then disappears.

WORKAROUND: Unplug/plug the USB cord, reload the print job, and choose the printer.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: cups 1.7.5-3ubuntu2
ProcVersionSignature: Ubuntu 3.18.0-7.8-generic 3.18.0
Uname: Linux 3.18.0-7-generic i686
NonfreeKernelModules: nvidia
ApportVersion: 2.15-0ubuntu2
Architecture: i386
BootDmesg: (Nothing has been logged yet.)
CupsErrorLog:

CurrentDesktop: GNOME
Date: Sun Dec 14 08:54:53 2014
KernLog:

Lpstat:
 device for Photosmart-C4500-series: usb://HP/Photosmart%20C4500%20series?serial=CN87JD4109057K&interface=1
 device for Photosmart_C4500: hp:/usb/Photosmart_C4500_series?serial=CN87JD4109057K
Lsusb:
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 003 Device 002: ID 046d:c50e Logitech, Inc. Cordless Mouse Receiver
 Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
MachineType: ASUSTEK COMPUTER INC P5W DH Deluxe
Papersize: a4
PpdFiles:
 Error: command ['fgrep', '-H', '*NickName', '/etc/cups/ppd/Photosmart_C4500.ppd', '/etc/cups/ppd/Photosmart-C4500-series.ppd'] failed with exit code 2: grep: /etc/cups/ppd/Photosmart_C4500.ppd: Permission denied
 grep: /etc/cups/ppd/Photosmart-C4500-series.ppd: Permission denied
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.18.0-7-generic root=UUID=7b1f4a51-558f-468f-85e0-f815d2f791e1 ro init=/lib/systemd/systemd
SourcePackage: cups
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 07/22/2010
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 3002
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: P5W DH Deluxe
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: Rev 1.xx
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr3002:bd07/22/2010:svnASUSTEKCOMPUTERINC:pnP5WDHDeluxe:pvrSystemVersion:rvnASUSTeKComputerINC.:rnP5WDHDeluxe:rvrRev1.xx:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: P5W DH Deluxe
dmi.product.version: System Version
dmi.sys.vendor: ASUSTEK COMPUTER INC

Revision history for this message
dino99 (9d9) wrote :
description: updated
description: updated
penalvch (penalvch)
description: updated
tags: added: latest-bios-3001
Revision history for this message
penalvch (penalvch) wrote :

dino99, thank you for reporting this and helping make Ubuntu better. Did this problem not occur in a release prior to Vivid?

Changed in cups (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
dino99 (9d9) wrote :

@Christopher

if you take the liberty to erase/modify my own reported details, then ask stupid questions, its up to you. Right now im agreeing what others are thinking about what you are doing here: adding confusion and spamming. So better to roll out and do your own learning job first.

dino99 (9d9)
description: updated
Revision history for this message
penalvch (penalvch) wrote :

dino99, unfortunately, it did not mention in your original Bug Description if this is reproducible in a prior release or not. As well, it was filled with speculation, and let alone grammar mistakes. Hence, please do not be rude, nor revert my edits, as this just simply delays your problem from getting addressed.

For more on this, please read https://help.ubuntu.com/community/ReportingBugs#Bug_reporting_etiquette .

description: updated
Revision history for this message
dino99 (9d9) wrote :

back to roots lp:241781
setting that report as "Low" priority is of course the smartest way to get it fixed.

Revision history for this message
dino99 (9d9) wrote :

found inside syslog:

Dec 15 06:11:25 u32 kernel: [ 2109.829779] audit: type=1400 audit(1418620285.127:81): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/cupsd//third_party" name="run/systemd/journal/dev-log" pid=10965 comm="hpcups" requested_mask="w" denied_mask="w" fsuid=7 ouid=0
Dec 15 06:11:25 u32 systemd[1]: Cannot add dependency job for unit systemd-vconsole-setup.service, ignoring: Unit systemd-vconsole-setup.service failed to load: No such file or directory.
Dec 15 06:11:25 u32 systemd[1]: Started CUPS Printing Service.
Dec 15 06:11:25 u32 kernel: [ 2109.833523] Did not find alt setting 1 for intf 0, config 1
Dec 15 06:11:25 u32 systemd[1]: Cannot add dependency job for unit systemd-vconsole-setup.service, ignoring: Unit systemd-vconsole-setup.service failed to load: No such file or directory.

*********apparmor="DENIED" *********** is it expected ?

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Please run the command

sudo aa-complain cupsd

in a terminal window and try whether this makes the problem going away.

See also the section "AppArmor Protection of the printing system" on https://wiki.ubuntu.com/DebuggingPrintingProblems

Revision history for this message
dino99 (9d9) wrote :

hi Till,

did set to 'complain' mode then rebooted: that indeed silence the #6 from syslog.
now only get:
 systemd[1]: Starting CUPS Printing Service...
Dec 15 14:44:52 u32 systemd[1]: Started CUPS Printing Service.

description: updated
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Does it only silence the warning or does it also solve your originally reported problem?

Revision history for this message
dino99 (9d9) wrote :

@Till

some more tests:
- the pc was already running, but the printer's usb cord was unplugged. So i plug it again, then set the printer 'on' via its on/off switch button. Start a printing job: done as expected.

- then let the printer plugged (usb cord) but the printer powerded down (on/off printer button)
- wait about 15 mn without printing
- then powered on the printer and try to print something again to test the previous 'usb port not awaken' issue reported here. The printing job have been done as expected.

To conclude about that report: the apparmor 'enforce' status seems the only one to be blamed, as the 'complain' status set let the usb port active. The 'hplip' report (lp:241781) seems also refer to the same apparmor config issue. Note that i've declared a false positive about the missing job inside the queue; sorry about that.

Revision history for this message
John Johansen (jjohansen) wrote :

writing to the journal socket should be added to an abstraction the same as writing to /dev/log

Revision history for this message
Martin Pitt (pitti) wrote :

Indeed I think we should fix that in /etc/apparmor.d/abstractions/base: That's the location that allows programs to write to /dev/log, so we sohuld also allow writing to /run/systemd/journal/{socket,dev-log}. Under systemd, /dev/log is just a symlink to /run/systemd/journal/dev-log, and /socket is the "native" journal protocol.

Changed in cups (Ubuntu):
status: Incomplete → Won't Fix
Changed in apparmor (Ubuntu):
status: New → Triaged
summary: - Powering on the printer does not activate the related usb port
+ allow writing to systemd journal sockets
Revision history for this message
dino99 (9d9) wrote :

lp:612900 possibly the same reason (permission denied)

no longer affects: cups (Ubuntu)
Changed in apparmor (Ubuntu):
importance: Undecided → Medium
Changed in cups (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Simon McVittie (smcv) wrote :

> Indeed I think we should fix that in /etc/apparmor.d/abstractions/base

AppArmor upstream appear to have made this change in r2850, LP:1413232.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.