File: //usr/share/setroubleshoot/plugins/allow_execmod.pyc
�
c�L]c @ st d d l Z d d l Td 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����N( t *s setroubleshoot-pluginst fallback( t Plugint pluginc B sz e Z e d � Z e d � Z e d � Z d Z e d � Z d Z d Z d Z
d Z d � Z d � Z
d
� Z d � Z RS( sf
SELinux is preventing $SOURCE_PATH from loading $TARGET_PATH which requires text relocation.
sC
The $SOURCE application attempted to load $TARGET_PATH which
requires text relocation. This is a potential security problem.
Most libraries do not need this permission. Libraries are
sometimes coded incorrectly and request this permission. The
<a href="http://people.redhat.com/drepper/selinux-mem.html">SELinux Memory Protection Tests</a>
web page explains how to remove this requirement. You can configure
SELinux temporarily to allow $TARGET_PATH to use relocation as a
workaround, until the library is fixed. Please file a
bug report.
s�
The $SOURCE application attempted to load $TARGET_PATH which
requires text relocation. This is a potential security problem.
Most libraries should not need this permission. The
<a href="http://people.redhat.com/drepper/selinux-mem.html">
SELinux Memory Protection Tests</a>
web page explains this check. This tool examined the library and it looks
like it was built correctly. So setroubleshoot can not determine if this
application is compromised or not. This could be a serious issue. Your
system may very well be compromised.
Contact your security administrator and report this issue.
s: Contact your security administrator and report this issue.sR
If you trust $TARGET_PATH to run correctly, you can change the
file context to textrel_shlib_t. "chcon -t textrel_shlib_t
'$TARGET_PATH'"
You must also change the default file context files on the system in order to preserve them even on a full relabel. "semanage fcontext -a -t textrel_shlib_t '$FIX_TARGET_PATH'"
s�
setroubleshoot examined '$FIX_TARGET_PATH' to make sure it was built correctly, but can not determine if this application has been compromised. This alert could be a serious issue and your system could be compromised.
s2 You need to change the label on '$FIX_TARGET_PATH's_ # semanage fcontext -a -t textrel_shlib_t '$FIX_TARGET_PATH'
# restorecon -v '$FIX_TARGET_PATH'c C s t | � d k r | j S| j S( Ni ( t lent unsafe_then_textt then_text( t selft avct args( ( s2 /usr/share/setroubleshoot/plugins/allow_execmod.pyt
get_then_textO s c C s t | � d k r | j S| j S( Ni ( R t unsafe_do_textt do_text( R R R ( ( s2 /usr/share/setroubleshoot/plugins/allow_execmod.pyt get_do_textT s c C s! t j | t � | j d � d S( Ni
( R t __init__t __name__t set_priority( R ( ( s2 /usr/share/setroubleshoot/plugins/allow_execmod.pyR Y s c C s d d l } | j d g � r yR | j d d | j g d | j �} | j d d d g d | j d | j �} Wn d SX| j j � | j � | j � | j d
k r� | j
d � St j | j j
d � t � d
} | j d
� d d k r | j
� Sn d S( Ni����t execmods
eu-readelfs -dt stdoutt fgreps -qt TEXTRELt stdini t unsafet "t :i t lib_t( t
subprocesst has_any_access_int Popent tpatht PIPER t Nonet closet waitt
returncodet reportt selinuxt matchpathcont stript S_IFREGt split( R R R t p1t p2t mcon( ( s2 /usr/share/setroubleshoot/plugins/allow_execmod.pyt analyze] s $.
"
( R t
__module__t _t summaryt problem_descriptiont unsafe_problem_descriptiont unsafe_fix_descriptiont fix_descriptionR R R R R
R
R R, ( ( ( s2 /usr/share/setroubleshoot/plugins/allow_execmod.pyR s"