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: //lib64/python3.6/site-packages/setools/diff/__pycache__/initsid.cpython-36.pyc
3

�^�	�@sVddlmZddlmZddlmZddlmZmZedddg�Z	Gd	d
�d
e�Z
dS)�)�
namedtuple�)�ContextWrapper)�DiffResultDescriptor)�
Difference�
SymbolWrapperZmodified_initsidZ
added_contextZremoved_contextc@s8eZdZdZed�Zed�Zed�Zdd�Zdd�Z	dS)�InitialSIDsDifferencez:Determine the difference in initsids between two policies.�diff_initialsidscCs�|jjdj|��|jdd�|jj�D�dd�|jj�D��\|_|_}t	�|_
x8|D]0\}}t|j�t|j�krVt
|j|j�|j
|<qVWdS)z=Generate the difference in initial SIDs between the policies.zKGenerating initial SID differences from {0.left_policy} to {0.right_policy}css|]}t|�VqdS)N)r)�.0�i�r�/usr/lib64/python3.6/initsid.py�	<genexpr>,sz9InitialSIDsDifference.diff_initialsids.<locals>.<genexpr>css|]}t|�VqdS)N)r)r
rrrr
r-sN)�log�info�formatZ	_set_diffZleft_policyZinitialsidsZright_policy�added_initialsids�removed_initialsids�dict�modified_initialsidsr�context�modified_initsids_record)�selfZmatched_initialsidsZleft_initialsidZright_initialsidrrr
r	%s
 z&InitialSIDsDifference.diff_initialsidscCs"|jjd�d|_d|_d|_dS)z%Reset diff results on policy changes.z Resetting initialsid differencesN)r�debugrrr)rrrr
�_reset_diff;sz!InitialSIDsDifference._reset_diffN)
�__name__�
__module__�__qualname__�__doc__rrrrr	rrrrr
rsrN)�collectionsrrrZdescriptorsr�
differencerrrrrrrr
�<module>s