Bug 473148 - selinux prevents cupsd from reading /etc/hosts
Summary: selinux prevents cupsd from reading /etc/hosts
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
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:
Environment:
Last Closed: 2008-11-27 12:27:30 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Warren Togami 2008-11-26 19:47:40 UTC
cups-1.3.9-1.fc9.i386
selinux-policy-3.3.1-103.fc9.noarch

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>
Info 
Location something.example.com
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
</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.