Bug 193966 - hp-setup fails with selinux related messages
Summary: hp-setup fails with selinux related messages
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: hplip
Version: 5
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-06-03 14:06 UTC by Ben Singer
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version: FC6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-12-15 13:35:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ben Singer 2006-06-03 14:06:08 UTC
Description of problem:
When invoking hp-setup (as root) I get 
[ERROR]: No devices found.
message, despite that printer shows up correctly
in /proc/bus/usb/devices as

T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  5 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=03f0 ProdID=1411 Rev= 1.00
S:  Manufacturer=Hewlett-Packard
S:  Product=PSC 750
S:  SerialNumber=MY14JB1181WB
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=07(print) Sub=01 Prot=03 Driver=(none)
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
I:  If#= 0 Alt= 1 #EPs= 2 Cls=07(print) Sub=01 Prot=02 Driver=(none)
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:  If#= 0 Alt= 2 #EPs= 1 Cls=07(print) Sub=01 Prot=01 Driver=(none)
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

=============
This printer/scanner worked fine with FC3. 
I think that this is some selinux related issue
because I get these messages in /var/log/messages

Jun  3 16:56:31 localhost kernel: audit(1149342991.907:79): avc:  denied  {
create } for  pid=4248 comm="python" scontext=user_u:system_r:hplip_t:s0
tcontext=user_u:system_r:hplip_t:s0 tclass=netlink_route_socket
Jun  3 16:56:31 localhost kernel: audit(1149342991.959:80): avc:  denied  {
dac_override } for  pid=16219 comm="hpiod" capability=1
scontext=user_u:system_r:hplip_t:s0 tcontext=user_u:system_r:hplip_t:s0
tclass=capability
Jun  3 16:56:31 localhost kernel: audit(1149342991.959:81): avc:  denied  {
dac_override } for  pid=16219 comm="hpiod" capability=1
scontext=user_u:system_r:hplip_t:s0 tcontext=user_u:system_r:hplip_t:s0
tclass=capability
Jun  3 16:56:31 localhost kernel: audit(1149342991.959:82): avc:  denied  {
dac_read_search } for  pid=16219 comm="hpiod" capability=2
scontext=user_u:system_r:hplip_t:s0 tcontext=user_u:system_r:hplip_t:s0
tclass=capability
Jun  3 16:56:31 localhost python:  [ERROR] No devices found.
Jun  3 16:56:31 localhost python:  [ERROR] Error occured during interactive
mode. Exiting

Version-Release number of selected component (if applicable):

hplip-0.9.11-1.2.src.rpm
kernel-2.6.16-1.2122_FC5.src.rpm (smp i686)
python-2.4.2-3.2.1.src.rpm
libselinux-devel-1.30-1.fc5
libselinux-1.30-1.fc5
selinux-policy-2.2.40-1.fc5
selinux-policy-targeted-2.2.40-1.fc5
libselinux-python-1.30-1.fc5


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

I get these errors when invoking
/sbin/fixfiles -R python check
which are not fixed by
/sbin/fixfiles -R python restore
(it produces the same errors)

Read error on pipe.
/sbin/restorecon:  error while labeling files under /usr/lib/python2.4/site-packages
/sbin/restorecon:  error while labeling files under
/usr/lib/python2.4/site-packages/japanese
/sbin/restorecon:  error while labeling files under /usr/lib/python2.4/xml
file_contexts:  invalid context system_u:object_r:usr_t
matchpathcon(/usr/share/doc/python-2.4.2) failed Invalid argument
file_contexts:  invalid context system_u:object_r:usr_t
matchpathcon(/usr/share/doc/python-2.4.2/LICENSE) failed Invalid argument
file_contexts:  invalid context system_u:object_r:usr_t
matchpathcon(/usr/share/doc/python-2.4.2/README) failed Invalid argument

Comment 1 Ben Singer 2006-06-03 16:52:01 UTC
Well it happens only when root account is logged in by "su"
When openning full KDE session as root hp-setup detects printer
but fails to configure it correctly. PPDs that it recommends are
HP_Mopier_320 and HP_Mopier_240 both of which don't work for
HP PSC-750 printer. And I couldn't find any suitable PPD in
/usr/share/foomatic/db/source/PPD/HP

Anyway I configured printer using KDE's printer manager and it
works correctly.


Comment 2 Tim Waugh 2006-12-15 13:35:19 UTC
I think this is fixed in FC6.


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