File: //usr/share/setroubleshoot/plugins/device.pyo
�
c�L]c @ s^ d d l Z e j d d e �Z e j Z d d l Td d l m Z d e f d � � YZ d S( i����Ns setroubleshoot-pluginst fallback( t *( t Plugint pluginc B s\ e Z e d � Z e d � Z e d � Z e d � Z e d � Z d Z d � Z d � Z
RS( sU
SELinux is preventing $SOURCE_PATH "$ACCESS" access to device $TARGET_PATH.
s
SELinux has denied $SOURCE "$ACCESS" access to device $TARGET_PATH.
$TARGET_PATH is mislabeled, this device has the default label of the /dev directory, which should not
happen. All Character and/or Block Devices should have a label.
You can attempt to change the label of the file using
restorecon -v '$TARGET_PATH'.
If this device remains labeled device_t, then this is a bug in SELinux policy.
Please file a bg report.
If you look at the other similar devices labels, ls -lZ /dev/SIMILAR, and find a type that would work for $TARGET_PATH,
you can use chcon -t SIMILAR_TYPE '$TARGET_PATH', If this fixes the problem, you can make this permanent by executing
semanage fcontext -a -t SIMILAR_TYPE '$FIX_TARGET_PATH'
If the restorecon changes the context, this indicates that the application that created the device, created it without
using SELinux APIs. If you can figure out which application created the device, please file a bug report against this application.
sV
Attempt restorecon -v '$TARGET_PATH' or chcon -t SIMILAR_TYPE '$TARGET_PATH'
sK You need to change the label on $TARGET_PATH to a type of a similar device.s\ # semanage fcontext -a -t SIMILAR_TYPE '$FIX_TARGET_PATH'
# restorecon -v '$FIX_TARGET_PATH't c C s t j | t � d S( N( R t __init__t __name__( t self( ( s+ /usr/share/setroubleshoot/plugins/device.pyR B s c C s5 | j d g � r1 | j d d g � r1 | j � Sd S( Nt device_tt chr_filet blk_file( t matches_target_typest
has_tclass_int reportt None( R t avc( ( s+ /usr/share/setroubleshoot/plugins/device.pyt analyzeE s
( R t
__module__t _t summaryt problem_descriptiont fix_descriptiont then_textt do_textt fix_cmdR R ( ( ( s+ /usr/share/setroubleshoot/plugins/device.pyR s ( t gettextt translationt TrueR t setroubleshoot.utilt setroubleshoot.PluginR R ( ( ( s+ /usr/share/setroubleshoot/plugins/device.pyt <module> s