aa-complain cupsd produces traceback indicating error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
AppArmor |
New
|
Undecided
|
Unassigned |
Bug Description
Running
$sudo aa-complain cupsd
Produces
Traceback (most recent call last):
File "/usr/sbin/
tool.
File "/usr/lib/
apparmor.
File "/usr/lib/
read_
File "/usr/lib/
profile_data = parse_profile_
File "/usr/lib/
load_
File "/usr/lib/
incdata = parse_profile_
File "/usr/lib/
load_
File "/usr/lib/
incdata = parse_profile_
File "/usr/lib/
load_
File "/usr/lib/
incdata = parse_profile_
File "/usr/lib/
store_
File "/usr/lib/
raise AppArmorExcepti
apparmor.
Background: I am running 14.04 on a x86_64 machine (a MacPro 3,1) and trying to install some Brother printer drivers. Kernel is3.13.0-36-generic #63-Ubuntu SMP . My original /etc/apparmor.
-------
# -------
#
# Copyright (C) 2006-2009 Novell/SUSE
# Copyright (C) 2010 Canonical Ltd.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public
# License published by the Free Software Foundation.
#
# -------
# @{HOME} is a space-separated list of all user home directories. While
# it doesn't refer to a specific home directory (AppArmor doesn't
# enforce discretionary access controls) it can be used as if it did
# refer to a specific home directory
@{HOME}
# @{HOMEDIRS} is a space-separated list of where user home directories
# are stored, for programs that must enumerate all home directories on a
# system.
@{HOMEDIRS}=/home/
# Also, include files in tunables/home.d for site-specific adjustments to
# @{HOMEDIRS}.
#include <tunables/home.d>
-------
The set up of this file didn't make sense given that HOMEDIRS is invoked before it is defined so I reordered the commands and replaced /etc/apparmor.
-------
# -------
#
# Copyright (C) 2006-2009 Novell/SUSE
# Copyright (C) 2010 Canonical Ltd.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public
# License published by the Free Software Foundation.
#
# -------
# @{HOME} is a space-separated list of all user home directories. While
# it doesn't refer to a specific home directory (AppArmor doesn't
# enforce discretionary access controls) it can be used as if it did
# refer to a specific home directory
# mikeg: commented following line out 10/2014 and copied below
#@{HOME}
# @{HOMEDIRS} is a space-separated list of where user home directories
# are stored, for programs that must enumerate all home directories on a
# system.
@{HOMEDIRS}=/home/
# Also, include files in tunables/home.d for site-specific adjustments to
# @{HOMEDIRS}.
# mikeg: removed commenting on 10/30/14 but it produced some errors.
#include <tunables/home.d>
# mikeg: copied text from above 10/30/2014 since it calls @HOMEDIRS
# this seemed to fix the problem with aa-complain cupsd
#
# @{HOME} is a space-separated list of all user home directories. While
# it doesn't refer to a specific home directory (AppArmor doesn't
# enforce discretionary access controls) it can be used as if it did
# refer to a specific home directory
@{HOME}
The error message indicates that you _add_ something to @{HOMEDIRS} before it's defined, for example
@{HOMEDIRS}+=/foo/ # notice the +=
Please paste the result of grep -r HOMEDIRS /etc/apparmor.d/
BTW: Which AppArmor version are you using?