HEX
Server: Apache
System: Linux linweb06.linvh1.fasthosts.co.uk 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: user_1036302171 (1036307171)
PHP: 8.2.30
Disabled: shell_exec,exec,system,popen,set_time_limit
Upload Files
File: //usr/share/setroubleshoot/plugins/allow_execstack.pyc
�
c�L]c@s�ddlZejdde�ZejZddlTddlmZddlZddlZd�Z	d�Z
defd	��YZdS(
i����Nssetroubleshoot-pluginstfallback(t*(tPlugincCsU|ddkrtSy(tjdd|gdt�j�}WntSX|ddkS(Nit/t	execstacks-qtuniversal_newlinestX(tFalset
subprocesstcheck_outputtTruetsplit(tpathtx((s4/usr/share/setroubleshoot/plugins/allow_execstack.pytis_execstacks(cCs�g}y%tjd|gdt�j�}Wn|SXx6|D].}t|�r=||kr=|j|�q=q=Wymtd|d�}xS|j�D]E}x<|j�D].}t|�r�||kr�|j|�q�q�Wq�WWntk
r�nX|S(NtlddRs
/proc/%s/mapstr(	RR	R
RRtappendtopent	readlinestIOError(texetpidt
execstacklisttpathsRtfdtrec((s4/usr/share/setroubleshoot/plugins/allow_execstack.pytfind_execstack's"%

tplugincBs�eZed�Zed�Zed�ZdZed�Zed�Zed�Z	d�Z
d�Zd	�Zd
�Z
d�ZRS(sV
    SELinux is preventing $SOURCE_PATH from making the program stack executable.
    s#
    The $SOURCE application attempted to make its stack
    executable.  This is a potential security problem.  This should
    never ever be necessary. Stack memory is not executable on most
    OSes these days and this will not change. Executable stack memory
    is one of the biggest security problems. An execstack error might
    in fact be most likely raised by malicious code. Applications 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.  If $SOURCE does not
    work and you need it to work, you can configure SELinux
    temporarily to allow this access until the application is fixed. Please
file a bug report.
    s6
    Sometimes a library is accidentally marked with the execstack flag,
    if you find a library with this flag you can clear it with the
    execstack -c LIBRARY_PATH.  Then retry your application.  If the
    app continues to not work, you can turn the flag back on with
    execstack -s LIBRARY_PATH.
    tsfIf you do not think $SOURCE_PATH should need to map stack memory that is both writable and executable.sByou need to report a bug. 
This is a potentially dangerous access.s:Contact your security administrator and report this issue.cCs;y)|d}|s|jStd�|SWn|jSXdS(Nis4If you believe that 
%s
should not require execstack(tif_textt_(tselftavctargsR((s4/usr/share/setroubleshoot/plugins/allow_execstack.pytget_if_text]s
cCs;y)|d}|s|jStd�|SWn|jSXdS(Nis�you should clear the execstack flag and see if $SOURCE_PATH works correctly.
Report this as a bug on %s.
You can clear the exestack flag by executing:(t	then_textR(R R!R"R((s4/usr/share/setroubleshoot/plugins/allow_execstack.pyt
get_then_textgs
cCs;y)|d}|s|jStd�|SWn|jSXdS(Nisexecstack -c %s(tdo_textR(R R!R"R((s4/usr/share/setroubleshoot/plugins/allow_execstack.pytget_do_textps
cCstj|t�dS(N(Rt__init__t__name__(R ((s4/usr/share/setroubleshoot/plugins/allow_execstack.pyR(zscCs�|jdddddg�r�|jdg�r�g}x9t|j|j�D]"}|j|j||f��qLWt|�dkr�|S|jd�SdSdS(	Ntunconfined_ttstaff_ttuser_ttguest_ttxguest_tRi(NN(	tmatches_source_typesthas_any_access_inRtspathRRtreporttlentNone(R R!treportsti((s4/usr/share/setroubleshoot/plugins/allow_execstack.pytanalyze}s 
(R)t
__module__Rtsummarytproblem_descriptiontfix_descriptiontfix_cmdRR$R&R#R%R'R(R7(((s4/usr/share/setroubleshoot/plugins/allow_execstack.pyR;s	
			
			
	(tgettextttranslationR
Rtsetroubleshoot.utiltsetroubleshoot.PluginRRtsysRRR(((s4/usr/share/setroubleshoot/plugins/allow_execstack.pyt<module>s