Bug 459597 - SELinux prevents HP 1018 from working
SELinux prevents HP 1018 from working
Product: Fedora
Classification: Fedora
Component: hplip (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Fedora Extras Quality Assurance
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2008-08-20 09:35 EDT by David Anderson
Modified: 2009-07-14 13:23 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-07-14 13:23:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description David Anderson 2008-08-20 09:35:02 EDT
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 12:55:10 EDT
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 13:04:04 EDT
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 17:05:35 EST
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 06:53:21 EST
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 11:55:03 EST
I agree,

hplip should include all directories in its rpm.
Comment 6 Bug Zapper 2009-06-09 22:30:58 EDT
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: 
Comment 7 Bug Zapper 2009-07-14 13:23:56 EDT
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.

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