Spade
Mini Shell
| Directory:~$ /proc/self/root/usr/lib/python2.7/site-packages/tuned/plugins/ |
| [Home] [System Details] [Kill Me] |
�
��\c@s~ddlZddlmZddlTddlZddlmZddlm Z ej
j�Zdej
fd��YZdS( i����Ni(tbase(t*(t
exceptions(tcommandst
SelinuxPlugincBsqeZdZed��Zd�Zed��Zd�Zd�Ze d�d��Z
ed�d��ZRS( 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_pathscOswt�|_|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.pyRscCsidd6S(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-scCs5|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