Bug 459597

Summary: SELinux prevents HP 1018 from working
Product: [Fedora] Fedora Reporter: David Anderson <david>
Component: hplipAssignee: Tim Waugh <twaugh>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: twaugh
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-07-14 17:23:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Anderson 2008-08-20 13:35:02 UTC
SELinux is preventing my HP 1018 Laserjet from working. This printer is a cheap one that uses the patented ZJS protocol. In Fedora, to set it up you run /usr/bin/hp-setup (part of the hplip package), which then offers to download a binary codec for you from HP, and then it installs it.

Attempts to print produce this error:

host=hodge type=AVC msg=audit(1218699520.630:1225): avc: denied { execute } for pid=24749 comm="hpijs" path="/usr/share/hplip/prnt/plugins/lj-x86_64.so" dev=dm-0 ino=644147 scontext=system_u:system_r:hplip_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:usr_t:s0 tclass=file 

I ran the command "chcon -t hplip_exec_t '/usr/share/hplip/prnt/plugins/lj-x86_64.so'" and that fixed the problem so that it could print. However, plugging in the printer still produces this error though it doesn't prevent printing:

host=hodge type=AVC msg=audit(1218699893.460:1239): avc: denied { dac_override } for pid=25387 comm="lsusb" capability=1 scontext=system_u:system_r:cupsd_config_t:s0 tcontext=system_u:system_r:cupsd_config_t:s0 tclass=capability 

Version-Release number of selected component (if applicable): selinux-policy-targeted-3.3.1-82.fc9.noarch

Steps to Reproduce:
1. Run hp-setup, install printer, accept offer to download binary module
2. Try to print
  
Actual results: SELinux prevents it.

Comment 1 Daniel Walsh 2008-08-29 16:55:10 UTC
restorecon -R -v /usr/share

Should fix. These files are mislabeled.

If you install files that do not come in a rpm you need to make sure they are labeled correctly.

Fixed other problem in selinux-policy-targeted-3.3.1-87

Comment 2 David Anderson 2008-09-04 17:04:04 UTC
The files were installed by /usr/bin/hp-setup which gave a nice GUI installer. The end user can't really have any way of knowing that he's meant to go and modify SELinux permissions to get his printer to work.

I suppose that /usr/bin/hp-setup should modify these permissions itself?

Or is it happening because the directory /usr/share/hplip/prnt/plugins is not part of the hplip RPM. and if it was then the permissions would be getting picked up automatically?

It seems that either way, this bug should be changed to being against the hplip package, because it's got to be a bug somewhere or other: users can't be expected to have these kind of pyschic powers!

Comment 3 Daniel Walsh 2008-11-17 22:05:35 UTC
Closing all bugs that have been in modified for over a month.  Please reopen if the bug is not actually fixed.

Comment 4 David Anderson 2008-11-18 11:53:21 UTC
I believe this is not fixed. Out of the box, the user cannot use the supplied GUI - he also requires magic knowledge to get his printer worker.

As suggested in comment #2, this is probably a bug in hplip - it should either include the directory in the RPM so it gets correctly labelled automatically, or /usr/bin/hp-setup should invoke the SELinux commands needed. Please consider re-assigning this to hplip.

Comment 5 Daniel Walsh 2008-11-18 16:55:03 UTC
I agree,

hplip should include all directories in its rpm.

Comment 6 Bug Zapper 2009-06-10 02:30:58 UTC
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 7 Bug Zapper 2009-07-14 17:23:56 UTC
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.