SELinux breaks CUPS
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
refpolicy (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I'm giving ubuntu-
I've installed SELinux (learning opportunity) and one outstanding problem is getting cups running.
When I (re)install cupsys and cupsys-client I get the following:
The following NEW packages will be installed:
cupsys cupsys-client
0 upgraded, 2 newly installed, 0 to remove and 6 not upgraded.
Need to get 0B/1970kB of archives.
After this operation, 10.5MB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously deselected package cupsys.
(Reading database ... 30319 files and directories currently installed.)
Unpacking cupsys (from .../cupsys_
Selecting previously deselected package cupsys-client.
Unpacking cupsys-client (from
.../cupsys-
Setting up cupsys (1.3.7-1ubuntu2) ...
Unable to find apparmor_parser, installation problem?: Failed.
invoke-rc.d: initscript apparmor, action "force-reload" failed.
* Starting Common Unix Printing System: cupsd start-stop-daemon: Unable
to start /usr/sbin/cupsd: Permission denied (Permission denied)
invoke-rc.d: initscript cupsys, action "start" failed.
dpkg: error processing cupsys (--configure):
subprocess post-installation script returned error exit status 2
Setting up cupsys-client (1.3.7-1ubuntu2) ...
Errors were encountered while processing:
cupsys
E: Sub-process /usr/bin/dpkg returned an error code (1)
and syslog displays:
Apr 11 10:03:49 tunnelball kernel: [56186.723703] audit(120787402
When I set SELinux to permissive cupsd starts and runs OK.
SELinux (permissive) is also logging the following:
Apr 12 08:00:24 tunnelball kernel: [28254.997825] audit(120795302 4.971:5) : avc: denied { rename } for pid=4816 comm="cupsd" name="cupsd.conf" dev=sda1 ino=22283584 scontext= system_ u:system_ r:cupsd_ t tcontext= unconfined_ u:object_ r:cupsd_ etc_t tclass=file 3.071:7) : avc: denied { transition } for pid=11727 comm="start- stop-daem" path="/ usr/sbin/ cupsd" dev=sda1 ino=7259018 scontext= unconfined_ u:unconfined_ r:unconfined_ t tcontext= unconfined_ u:system_ r:cupsd_ t tclass=process 3.071:8) : avc: denied { search } for pid=11728 comm="cupsd" name="home" dev=sda1 ino=7618561 scontext= unconfined_ u:system_ r:cupsd_ t tcontext= system_ u:object_ r:home_ root_t tclass=dir 9.681:15) : avc: denied { execute_no_trans } for pid=11890 comm="cupsd" path="/ usr/lib/ cups/backend/ usb" dev=sda1 ino=7407276 scontext= unconfined_ u:system_ r:cupsd_ t tcontext= system_ u:object_ r:lib_t tclass=file 8.751:38) : avc: denied { execute_no_trans } for pid=12884 comm="cupsd" path="/ usr/lib/ cups/backend/ usb" dev=sda1 ino=7407276 scontext= unconfined_ u:system_ r:cupsd_ t tcontext= system_ u:object_ r:lib_t tclass=file
Apr 12 08:01:23 tunnelball kernel: [28313.068128] audit(120795308
Apr 12 08:01:23 tunnelball kernel: [28313.072977] audit(120795308
Apr 12 08:11:39 tunnelball kernel: [28929.415957] audit(120795369
Apr 12 11:29:18 tunnelball kernel: [40783.427491] audit(120796555