HEX
Server: Apache
System: Linux dinesh8189 5.15.98-grsec-sharedvalley-2.lc.el8.x86_64 #1 SMP Thu Mar 9 09:07:30 -03 2023 x86_64
User: cgmgerenciamento1 (814285)
PHP: 8.1.26
Disabled: apache_child_terminate,dl,escapeshellarg,escapeshellcmd,exec,link,mail,openlog,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,php_check_syntax,php_strip_whitespace,popen,proc_close,proc_open,shell_exec,symlink,system
Upload Files
File: //usr/lib64/python3.6/site-packages/setools/diff/__pycache__/fsuse.cpython-36.pyc
3

�^p�@shddlmZddlmZddlmZddlmZmZedddd	g�Z	Gd
d�de�Z
Gdd
�d
e�ZdS)�)�
namedtuple�)�ContextWrapper)�DiffResultDescriptor)�
Difference�WrapperZmodified_fsuse�ruleZ
added_contextZremoved_contextc@s8eZdZdZed�Zed�Zed�Zdd�Zdd�Z	dS)�FSUsesDifferencez@Determine the difference in fs_use_* rules between two policies.�diff_fs_usescCs�|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 fs_use rules between the policies.zHGenerating fs_use_* differences from {0.left_policy} to {0.right_policy}css|]}t|�VqdS)N)�FSUseWrapper)�.0�fs�r�/usr/lib64/python3.6/fsuse.py�	<genexpr>/sz0FSUsesDifference.diff_fs_uses.<locals>.<genexpr>css|]}t|�VqdS)N)r)rr
rrrr0sN)�log�info�formatZ	_set_diffZleft_policyZfs_usesZright_policy�
added_fs_uses�removed_fs_uses�modified_fs_usesr�context�append�modified_fsuse_record)�selfZmatchedZ	left_ruleZ
right_rulerrrr
's 
zFSUsesDifference.diff_fs_usescCs"|jjd�d|_d|_d|_dS)z%Reset diff results on policy changes.z#Resetting fs_use_* rule differencesN)r�debugrrr)rrrr�_reset_diff?szFSUsesDifference._reset_diffN)
�__name__�
__module__�__qualname__�__doc__rrrrr
rrrrrr	sr	c@s4eZdZdZdZdd�Zdd�Zd	d
�Zdd�Zd
S)rz,Wrap fs_use_* rules to allow set operations.�ruletyper
rcCs0||_|j|_|j|_t|j�|_t|�|_dS)N)�originr!r
rr�hash�key)rrrrr�__init__Ms
zFSUseWrapper.__init__cCs|jS)N)r$)rrrr�__hash__TszFSUseWrapper.__hash__cCs|j|jkS)N)r$)r�otherrrr�__lt__WszFSUseWrapper.__lt__cCs|j|jko|j|jkS)N)r!r
)rr'rrr�__eq__ZszFSUseWrapper.__eq__N)r!r
r)	rrrr �	__slots__r%r&r(r)rrrrrGsrN)�collectionsrrrZdescriptorsr�
differencerrrr	rrrrr�<module>s(