HEX
Server: Apache
System: Linux hp3-stn-1011028.hostingp3.local 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: csh958633 (951153)
PHP: 8.3.30
Disabled: shell_exec,exec,system,popen,set_time_limit
Upload Files
File: //usr/share/setroubleshoot/plugins/restorecon.pyo
�
c�L]c@s�ddlZejdde�ZejZddlTddlmZddlZddlTddl	Z	dad�ZdgZ
d�Zddl	Z	d	efd
��YZdS(i����Nssetroubleshoot-pluginstfallback(t*(tPlugincCsDts:ttj��}|j�jd�a|j�n|tkS(Ns
(tcustomizable_typestopentselinuxtselinux_customizable_types_pathtreadtsplittclose(ttargettfd((s//usr/share/setroubleshoot/plugins/restorecon.pytcustomizable s

s/sys/fscCs(x!tD]}|j|�rtSqWtS(N(texcluded_pathst
startswithtTruetFalse(ttarget_pathtpath((s//usr/share/setroubleshoot/plugins/restorecon.pyt
excluded_path,s
tplugincBsleZed�ZdZed�Zd�Zed�Zd�Zedd�Z	dZ
d	�Zd
�ZRS(sN
    SELinux is preventing $SOURCE_PATH "$ACCESS" access to $TARGET_PATH.
    s/sbin/restorecon $TARGET_PATHs�
    You can restore the default system context to this file by executing the
    restorecon command.  restorecon '$TARGET_PATH', if this file is a directory,
    you can recursively restore using restorecon -R '$TARGET_PATH'.
    cCstd�|dS(Ns�
    SELinux denied access requested by $SOURCE. $TARGET_PATH may
    be mislabeled.  $TARGET_PATH default SELinux type is
    <B>%s</B>, but its current type is <B>$TARGET_TYPE</B>. Changing
    this file back to the default type may fix your problem.
    <p>
    File contexts can be assigned to a file in the following ways.
    <ul>
        <li>Files created in a directory receive the file context of the parent directory by default.
        <li>The SELinux policy might override the default label inherited from the parent directory by
            specifying a process running in context A which creates a file in a directory labeled B
            will instead create the file with label C. An example of this would be the dhcp client running
            with the dhclient_t type and creating a file in the directory /etc. This file would normally
            receive the etc_t type due to parental inheritance but instead the file
            is labeled with the net_conf_t type because the SELinux policy specifies this.
        <li>Users can change the file context on a file using tools such as chcon, or restorecon.
    </ul>
    This file could have been mislabeled either by user error, or if an normally confined application
    was run under the wrong domain.
    <p>
    However, this might also indicate a bug in SELinux because the file should not have been labeled
    with this type.
    <p>
    If you believe this is a bug, please file a bug report against this package.
    i(t_(tselftavctargs((s//usr/share/setroubleshoot/plugins/restorecon.pytget_problem_description?ssGIf you want to fix the label. 
$TARGET_PATH default label should be %s.cCs|j|dS(Ni(tif_text(RRR((s//usr/share/setroubleshoot/plugins/restorecon.pytget_if_text\ssTyou can run restorecon. The access attempt may have been stopped due to insufficientsh permissions to access a parent directory in which case try to change the following command accordingly.s"# /sbin/restorecon -v $TARGET_PATHcCsBtj|t�|jd�d|_t|_td�|_dS(NidtgreensRestore
Context(	Rt__init__t__name__tset_prioritytlevelRtfixableRtbutton_text(R((s//usr/share/setroubleshoot/plugins/restorecon.pyRds

		cCs�|js
dS|jjdkr#dS|jjtkr9dS|jd�rLdSi}t|d<t|d<t|d<t	|d<t
|d<|j|j��r}|j
dkr�dS|j
d	kr�dS|j
d
d	kr�dSt|j
�r�dSt|jj�r�dSyetj|j
jd�||j�d}|jd
�d}||jjkrc|jd
|f�SWq}tk
ry}q}XndS(Ntcifs_ttnfs_tt	relabeltotdirtfiletlnk_filetchr_filetblk_filet/it"it:i(R#R$(tquery_environmenttNonettcontextttypet
file_typestall_accesses_are_intS_IFDIRtS_IFREGtS_IFLNKtS_IFCHRtS_IFBLKt
has_tclass_intkeysttpathRRRtmatchpathcontstripttclassRtreporttOSError(RRtrestorecon_filestmcont	mcon_typete((s//usr/share/setroubleshoot/plugins/restorecon.pytanalyzeksB	




)(
Rt
__module__Rtsummarytfix_cmdtfix_descriptionRRRt	then_texttdo_textRRE(((s//usr/share/setroubleshoot/plugins/restorecon.pyR2s				
	(tgettextttranslationRRtsetroubleshoot.utiltsetroubleshoot.PluginRtoststatRR/RRR
RR(((s//usr/share/setroubleshoot/plugins/restorecon.pyt<module>s