Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 473148 - selinux prevents cupsd from reading /etc/hosts
Summary: selinux prevents cupsd from reading /etc/hosts
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 9
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: K12LTSP
TreeView+ depends on / blocked
Reported: 2008-11-26 19:47 UTC by Warren Togami
Modified: 2008-11-27 12:27 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-11-27 12:27:30 UTC

Attachments (Terms of Use)

Description Warren Togami 2008-11-26 19:47:40 UTC

cupsd can be configured to point at a network printer by non-FQDN hostname, which attempts to read /etc/hosts and fails with a SELinux denial.

/etc/cups/printers.conf example (note the socket line):
<DefaultPrinter ws070lp>
DeviceURI socket://ws070:9100
State Stopped
StateMessage Unable to locate printer 'ws070.ltsp'!
StateTime 1227651710
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer

type=AVC msg=audit(1227724974.326:1638): avc:  denied  { read } for  pid=2699 comm="cupsd" name="hosts" dev=dm-0 ino=37988257 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dosfs_t:s0 tclass=file

Please verify that this is fixed in F10 and RHEL5 as well.

Comment 1 Daniel Walsh 2008-11-27 12:27:30 UTC
For some reason your /etc/hosts file is labeled dosfs_t. Did you mv it off of a usb key labeled dosfs_t?

restorecon /etc/hosts 

will fix.

Note You need to log in before you can comment on or make changes to this bug.