HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/lib64/python3.6/site-packages/setools/diff/__pycache__/commons.cpython-36.opt-1.pyc
3

�^C�@sLddlmZddlmZddlmZmZeddddg�ZGd	d
�d
e�ZdS)�)�
namedtuple�)�DiffResultDescriptor)�
Difference�
SymbolWrapperZmodified_common�added_perms�
removed_perms�
matched_permsc@s8eZdZdZed�Zed�Zed�Zdd�Zdd�Z	dS)�CommonDifferencezV
    Determine the difference in common permission sets
    between two policies.
    �diff_commonscCs�|jjdj|��|jdd�|jj�D�dd�|jj�D��\|_|_}t	�|_
xD|D]<\}}|j|j|jdd�\}}}|s�|rVt|||�|j
|<qVWdS)z8Generate the difference in commons between the policies.zFGenerating common differences from {0.left_policy} to {0.right_policy}css|]}t|�VqdS)N)r)�.0�c�r�/usr/lib64/python3.6/commons.py�	<genexpr>0sz0CommonDifference.diff_commons.<locals>.<genexpr>css|]}t|�VqdS)N)r)rr
rrrr1sF)ZunwrapN)
�log�info�formatZ	_set_diffZleft_policyZcommonsZright_policy�
added_commons�removed_commons�dict�modified_commonsZperms�modified_commons_record)�selfZmatched_commonsZleft_commonZright_commonrrr	rrrr)s zCommonDifference.diff_commonscCs"|jjd�d|_d|_d|_dS)z%Reset diff results on policy changes.zResetting common differencesN)r�debugrrr)rrrr�_reset_diffDszCommonDifference._reset_diffN)
�__name__�
__module__�__qualname__�__doc__rrrrrrrrrrr
sr
N)	�collectionsrZdescriptorsr�
differencerrrr
rrrr�<module>s