dbfdg
3
nma @ sT d dl Z d dlT d dlZejdddZejZd dlT d dlmZ G dd deZdS ) N)*zsetroubleshoot-pluginsT)Zfallback)Pluginc @ s e Zd ZedZedZedZdZedZdZ dZ
dZd Zd
Z
dZdZd
d Zdd Zdd Zdd Zdd Zdd Zdd ZdS )pluginzf
SELinux is preventing $SOURCE_PATH from loading $TARGET_PATH which requires text relocation.
aC
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
SELinux Memory Protection Tests
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.
a
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
SELinux Memory Protection Tests
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.
z:Contact your security administrator and report this issue.aR
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'"
z6If this issue occurred during normal system operation.zThis alert could be a serious issue and your system could be compromised. Setroubleshoot examined '$FIX_TARGET_PATH' to make sure it was built correctly, but can not determine if this application has been compromised.z9Contact your security administrator and report this issuezOIf you trust $TARGET_PATH to run correctly and want to allow $SOURCE to load itzFYou need to change the label on '$FIX_TARGET_PATH' to textrel_shlib_t.z# chcon -t textrel_shlib_t '$FIX_TARGET_PATH'
If you want this to survive a relabel, execute
# semanage fcontext -a -t textrel_shlib_t '$FIX_TARGET_PATH';restorecon -v '$FIX_TARGET_PATH'
zo/usr/sbin/semanage fcontext -a -t textrel_shlib_t '$FIX_TARGET_PATH';/usr/sbin/restorecon -v '$FIX_TARGET_PATH'c C s t |dkrd| _d| _d S )Nr FT)lenfixableZ
report_bug)selfargs r 2/usr/share/setroubleshoot/plugins/allow_execmod.py init_argsV s zplugin.init_argsc C s t |dkr| jS | jS )Nr )r unsafe_problem_descriptionproblem_description)r avcr r r r
get_problem_description[ s zplugin.get_problem_descriptionc C s t |dkr| jS | jS )Nr )r unsafe_if_textif_text)r r r r r r
get_if_text` s zplugin.get_if_textc C s t |dkr| jS | jS )Nr )r unsafe_then_text then_text)r r r r r r
get_then_texte s zplugin.get_then_textc C s t |dkr| jS | jS )Nr )r unsafe_do_textdo_text)r r r r r r
get_do_textj s zplugin.get_do_textc C s* t j| t d| _td| _| jd d S )NTzChange label on the library.
)r __init____name__r _Zbutton_textZset_priority)r r r r
r o s
zplugin.__init__c C s dd l }|jdgry6|jdd|jg|jd}|jdddg|j|jd }W n
d S |jj |j |j |jd
kr| j dgS t
j|jjdt
d
}|jd
d dkr| j S d S )Nr Zexecmodz
eu-readelfz-d)stdoutZfgrepz-qZTEXTREL)stdinr Zunsafe": Zlib_t)
subprocessZhas_any_access_inPopenZtpathPIPEr closewait
returncodeZreportselinuxZmatchpathconstripS_IFREGsplit)r r r# Zp1Zp2Zmconr r r
analyzeu s
zplugin.analyzeN)r
__module____qualname__r Zsummaryr
r Zunsafe_fix_descriptionZfix_descriptionr r r r r r Zfix_cmdr r r r r r r- r r r r
r s.
r ) r) statgettextZtranslationr Zsetroubleshoot.utilZsetroubleshoot.Pluginr r r r r r
s