Sh3ll
OdayForums


Server : Apache
System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User : nobody ( 99)
PHP Version : 8.1.23
Disable Function : NONE
Directory :  /usr/lib/python2.7/site-packages/tuned/plugins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib/python2.7/site-packages/tuned/plugins/plugin_selinux.pyc
�
��\c@s~ddlZddlmZddlTddlZddlmZddlm	Z	ej
j�Zdej
fd��YZdS(	i����Ni(tbase(t*(t
exceptions(tcommandst
SelinuxPlugincBsqeZdZed��Zd�Zed��Zd�Zd�Ze	d�d��Z
ed�d��ZRS(	s&
	Plugin for tuning SELinux options.
	cCs@d}tjj|�s<d}tjj|�s<d}q<n|S(Ns/sys/fs/selinuxs/selinux(tostpathtexiststNone(tselfR((s@/usr/lib/python2.7/site-packages/tuned/plugins/plugin_selinux.pyt_get_selinux_pathscOswt�|_|j�|_|jdkr<tjd��ntjj	|jdd�|_
tt|�j
||�dS(NsFSELinux is not enabled on your system or incompatible version is used.tavctcache_threshold(Rt_cmdR
t
_selinux_pathRRtNotSupportedPluginExceptionRRtjoint_cache_threshold_pathtsuperRt__init__(R	targstkwargs((s@/usr/lib/python2.7/site-packages/tuned/plugins/plugin_selinux.pyRscCsidd6S(Ntavc_cache_threshold(R(R	((s@/usr/lib/python2.7/site-packages/tuned/plugins/plugin_selinux.pyt_get_config_options scCst|_t|_dS(N(tTruet_has_static_tuningtFalset_has_dynamic_tuning(R	tinstance((s@/usr/lib/python2.7/site-packages/tuned/plugins/plugin_selinux.pyt_instance_init&s	cCsdS(N((R	R((s@/usr/lib/python2.7/site-packages/tuned/plugins/plugin_selinux.pyt_instance_cleanup*sRcCsS|dkrdSt|�}|dkrK|sG|jj|j|�n|SdSdS(Ni(RtintR
t
write_to_fileR(R	tvaluetsimt	threshold((s@/usr/lib/python2.7/site-packages/tuned/plugins/plugin_selinux.pyt_set_avc_cache_threshold-scCs5|jj|j�}t|�dkr1t|�SdS(Ni(R
t	read_fileRtlenRR(R	R!((s@/usr/lib/python2.7/site-packages/tuned/plugins/plugin_selinux.pyt_get_avc_cache_threshold9s
(
t__name__t
__module__t__doc__tclassmethodR
RRRRtcommand_setR$tcommand_getR'(((s@/usr/lib/python2.7/site-packages/tuned/plugins/plugin_selinux.pyR
s				(RtRt
decoratorst
tuned.logsttunedt
tuned.pluginsRttuned.utils.commandsRtlogstgettlogtPluginR(((s@/usr/lib/python2.7/site-packages/tuned/plugins/plugin_selinux.pyt<module>s


ZeroDay Forums Mini