Revonzy Mini Shell

Revonzy Mini Shell

Şuanki Dizin: /lib64/python3.9/site-packages/setools/diff/__pycache__/
Dosya Yükle :
Şuanki Dosya : //lib64/python3.9/site-packages/setools/diff/__pycache__/genfscon.cpython-39.pyc

a

q�qe�
�@s|ddlmZddlmZmZddlmZddlmZddl	m
Z
mZGdd	�d	e�ZGd
d�de
�Z
Gdd
�d
ee�ZdS)�)�
NamedTuple�)�Context�Genfscon�)�ContextWrapper)�DiffResultDescriptor)�
Difference�Wrapperc@s*eZdZUdZeed<eed<eed<dS)�ModifiedGenfsconz,Difference details for a modified genfscons.�ruleZ
added_contextZremoved_contextN)�__name__�
__module__�__qualname__�__doc__r�__annotations__r�rr�;/usr/lib64/python3.9/site-packages/setools/diff/genfscon.pyrs
rc@sDeZdZdZed�Zed�Zed�Zdd�dd�Zdd�dd�Z	dS)	�GenfsconsDifferencez@Determine the difference in genfscon rules between two policies.�diff_genfsconsN)�returncCs�|j�d�|��|�dd�|j��D�dd�|j��D��\|_|_}g|_	|D]4\}}t
|j�t
|j�krR|j	�t
||j|j��qRdS)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�fsrrr�	<genexpr>'�z5GenfsconsDifference.diff_genfscons.<locals>.<genexpr>css|]}t|�VqdSrrrrrrr(rN)�log�info�formatZ	_set_diffZleft_policyZ	genfsconsZright_policy�added_genfscons�removed_genfscons�modified_genfsconsr�context�appendr)�selfZmatchedZ	left_ruleZ
right_rulerrrrs ���
�z"GenfsconsDifference.diff_genfsconscCs"|j�d�d|_d|_d|_dS)z%Reset diff results on policy changes.z#Resetting genfscon rule differencesN)r�debugr"r#r$�r'rrr�_reset_diff7szGenfsconsDifference._reset_diff)
r
rrrrr"r#r$rr*rrrrrsrc@s<eZdZdZdZedd�dd�Zdd�Zd	d
�Zdd�Z	dS)
rz,Wrap genfscon rules to allow set operations.)r�path�filetyper%N)rrcCs8||_|j|_|j|_|j|_t|j�|_t|�|_dSr)�originrr+r,rr%�hash�key)r'rrrr�__init__EszGenfsconWrapper.__init__cCs|jSr�r/r)rrr�__hash__MszGenfsconWrapper.__hash__cCs|j|jkSrr1�r'�otherrrr�__lt__PszGenfsconWrapper.__lt__cCs$|j|jko"|j|jko"|j|jkSr)rr+r,r3rrr�__eq__Ss

�
�zGenfsconWrapper.__eq__)
r
rrr�	__slots__rr0r2r5r6rrrrr?srN)�typingrZ	policyreprrr%rZdescriptorsr�
differencer	r
rrrrrrr�<module>s	(

EliteHackz.ORG
Revonzy Mini Shell
root@revonzy.com

Linux 65-254-81-4.cprapid.com 5.14.0-284.11.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 9 05:49:00 EDT 2023 x86_64
Apache
65.254.81.4