AppArmor parser error for /etc/apparmor.d/usr.bin.mediascanner-service-2.0

Bug #1443693 reported by Robie Basak
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
mediascanner2 (Ubuntu)
Fix Released
Critical
James Henstridge

Bug Description

1. Start with a fresh Utopic machine - I used a cloud image.
2. Install mediascanner2.0

Expected results: no errors

Actual results:

Setting up mediascanner2.0 (0.105+14.10.20141001-0ubuntu1) ...
AppArmor parser error for /etc/apparmor.d/usr.bin.mediascanner-service-2.0 in /etc/apparmor.d/usr.bin.mediascanner-service-2.0 at line 14: Could not open '/usr/share/apparmor/hardware/audio.d'

Further, "sudo start apparmor" now fails with the following when it previously completed without error:

start: Job failed to start

I see that /usr/share/apparmor/hardware/audio.d exists on my phone and is provided by lxc-android-config and apparmor-easyprof-ubuntu. As the apparmor profile shipped relies on these directories to exist, there is either a dependency missing or the profile needs to be tweaked to ignore missing directories (not sure if that's possible?) or perhaps ship empty directories.

I presume the solution will need to cover graphics.d and video.d also.

Perhaps the package is not useful on a desktop machine, but even then it shouldn't fail like this.

Workaround: sudo mkdir -p /usr/share/apparmor/hardware/{audio,graphics,video}.d

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: mediascanner2.0 0.105+14.10.20141001-0ubuntu1
ProcVersionSignature: User Name 3.16.0-30.40-generic 3.16.7-ckt3
Uname: Linux 3.16.0-30-generic x86_64
ApportVersion: 2.14.7-0ubuntu8.1
Architecture: amd64
Date: Mon Apr 13 23:29:50 2015
SourcePackage: mediascanner2
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Robie Basak (racb) wrote :
Revision history for this message
Robie Basak (racb) wrote :
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

mediascanner should create these directories as part of its install. It could alternatively Depends on apparmor-easyprof-ubuntu, but on a traditional desktop system that policy is not needed so I suggest just creating the files in the mediascanner2 package itself.

Robie Basak (racb)
Changed in mediascanner2 (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
tags: added: bitesize
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

I meant to say "I suggest just creating the *directories* in the mediascanner2 package itself".

tags: added: audit
Changed in mediascanner2 (Ubuntu):
assignee: nobody → James Henstridge (jamesh)
importance: Medium → Critical
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mediascanner2 - 0.112+16.10.20160909-0ubuntu1

---------------
mediascanner2 (0.112+16.10.20160909-0ubuntu1) yakkety; urgency=medium

  [ James Henstridge ]
  * When multiple volumes are mounted in quick succession, scan them
    serially to avoid reentrancy problems in the initial scan. (LP:
    #1489656)
  * Add apparmor-easyprof hardware directories to package so AppArmor
    profile can compile when apparmor-easyprof-ubuntu isn't installed.
    (LP: #1443693)
  * Disable optimisation when compiling dbus-codec.cc to avoid gcc 6
    compilation bug. (LP: #1621002)
  * Replace deprecated use of GetConnectionAppArmorSecurityContext
    method with GetConnectionCredentials. (LP: #1489489)

  [ You-Sheng Yang ]
  * Update mediascanner-extractor apparmor profile to cover Android
    library locations on 64-bit systems.

 -- James Henstridge <email address hidden> Fri, 09 Sep 2016 13:46:43 +0000

Changed in mediascanner2 (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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