HEX
Server: Apache
System: Linux dinesh8189 5.15.98-grsec-sharedvalley-2.lc.el8.x86_64 #1 SMP Thu Mar 9 09:07:30 -03 2023 x86_64
User: cgmgerenciamento1 (814285)
PHP: 8.1.26
Disabled: apache_child_terminate,dl,escapeshellarg,escapeshellcmd,exec,link,mail,openlog,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,php_check_syntax,php_strip_whitespace,popen,proc_close,proc_open,shell_exec,symlink,system
Upload Files
File: //usr/share/setroubleshoot/plugins/__pycache__/restorecon_source.cpython-36.pyc
3

m��a�@sdddlZejddd�ZejZddlTddlmZddlZddlTddlZddlZGdd�de�Z	dS)	�Nzsetroubleshoot-pluginsT)Zfallback)�*)�Pluginc@sTeZdZed�ZdZed�Zdd�Zed�Zdd�Z	ed	�Z
d
Zdd�Zd
d�Z
dS)�pluginzN
    SELinux is preventing $SOURCE_PATH "$ACCESS" access to $TARGET_PATH.
    z/sbin/restorecon $SOURCE_PATHz�
    You can restore the default system context to this file by executing the
    restorecon command.  restorecon '$SOURCE_PATH'.
    cCstd�|dS)Nam
    SELinux denied access requested by $SOURCE. $SOURCE_PATH may
    be mislabeled.  $SOURCE_PATH default SELinux type is
    <B>%s</B>, but its current type is <B>$SOURCE_TYPE</B>. Changing
    this file back to the default type may fix your problem.
    <p>
    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.
    �)�_)�self�avc�args�r
�6/usr/share/setroubleshoot/plugins/restorecon_source.py�get_problem_description,s
zplugin.get_problem_descriptionzGIf you want to fix the label. 
$SOURCE_PATH default label should be %s.cCs|j|dS)Nr)�if_text)rrr	r
r
r�get_if_text>szplugin.get_if_textzyou can run restorecon.z"# /sbin/restorecon -v $SOURCE_PATHcCs0tj|t�|jd�d|_d|_td�|_dS)N�dZgreenTzRestore
Context)r�__init__�__name__Zset_priority�levelZfixablerZbutton_text)rr
r
rrDs

zplugin.__init__cCs�|js
dS|jdkrdS|jddkr*dSydtj|jjd�t�d}|jd�d}tj|jjd��d}|jd�d}||kr�|jd|f�SWnt	k
r�YnXdS)Nr�/�"r�:�)
Zquery_environmentZspath�selinuxZmatchpathcon�strip�S_IFREG�splitZ
getfileconZreport�OSError)rrZmconZ	mcon_typeZgconZ	gcon_typer
r
r�analyzeKs 
zplugin.analyzeN)r�
__module__�__qualname__rZsummaryZfix_cmdZfix_descriptionrr
rZ	then_textZdo_textrrr
r
r
rr sr)
�gettextZtranslationrZsetroubleshoot.utilZsetroubleshoot.Pluginr�os�statrrr
r
r
r�<module>s