✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ server.blackpussy.asia ​🇻​♯➤ 5.14.0-611.20.1.el9_7.x86_64 #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 163.245.207.76 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.243
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗞 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ mail,mb_send_mail
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /usr/lib64/python3.9/site-packages/setools/diff/__pycache__//terules.cpython-39.opt-1.pyc
a

q�qe]`�@s�ddlZddlmZddlmZddlmZddlmZm	Z	m
Z
mZmZm
Z
mZmZmZmZddlmZmZmZddlmZmZmZmZmZmZmZd	d
lmZd	dl m!Z!d	dl"m#Z#m$Z$d	d
l%m&Z&m'Z'd	dlm(Z(d	dl)m*Z*ed�Z+ed�Z,Gdd�de
�Z-Gdd�de
�Z.Gdd�de�Z/Gdd�de
�Z0Gdd�de
�Z1Gdd�de
�Z2eee3fZ4ee5e3fZ6e
e4e
e6e
e3e
e3e
e3e1fffffZ7eee7e2e/dd�dd �Z8e7dd!�d"d#�Z9e7e2eeeeeee-fd$�d%d&�Z:e3e	d'gdfd(�d)d*�Z;eeed+d,�d-d.�Z<e3e	d'gdfd(�d/d0�Z=e3e	egdfd(�d1d2�Z>Gd3d'�d'e#�Z?Gd4d+�d+e$e�Z@Gd5d6�d6e$�ZAdS)7�N)�defaultdict)�intern)�Enum)
�Any�Callable�Dict�Iterable�List�
NamedTuple�Optional�Set�Tuple�Union�)�RuleNotConditional�RuleUseError�TERuleNoFilename)�	AnyTERule�AVRule�AVRuleXperm�Conditional�IoctlSet�
TERuletype�Type�)�conditional_wrapper_factory)�DiffResultDescriptor)�
Difference�Wrapper)�type_wrapper_factory�type_or_attr_wrapper_factory)�RuleList)�class_wrapper_factoryz<<unconditional>>�Truec@sVeZdZUdZeed<eeee	fed<eeee	fed<eeee	fed<dS)�ModifiedAVRulez5Difference details for a modified access vector rule.�rule�added_perms�
removed_perms�
matched_permsN)
�__name__�
__module__�__qualname__�__doc__r�__annotations__rr�strr�r/r/�:/usr/lib64/python3.9/site-packages/setools/diff/terules.pyr$s

r$c@s*eZdZUdZeed<eed<eed<dS)�ModifiedTERulez.Difference details for a modified type_* rule.r%Z
added_defaultZremoved_defaultN)r)r*r+r,rr-rr/r/r/r0r1$s
r1c@seZdZdZdZdS)�SiderrN)r)r*r+�left�rightr/r/r/r0r20sr2c@s"eZdZUeeed<eed<dS)�RuleDBSideDataRecord�perms�	orig_ruleN)r)r*r+rr.r-rr/r/r/r0r55s
r5c@s&eZdZUeeed<eeed<dS)�RuleDBSidesRecordr3r4N)r)r*r+rr5r-r/r/r/r0r8:s
r8c@s.eZdZUeeefed<eeefed<dS)�TypeDBRecordr3r4N)r)r*r+rr.rr-r/r/r/r0r9?s
r9)�	rule_list�rule_db�type_db�side�returnc	Cs�|tjkr|j}n|j}|D�]�}z tt|j��}tt|j��}Wnty\t}t	}Yn0||vr�t
�||<t
�|||<n|||vr�t
�|||<|jj}t
|j�}	t|	|�}
|||}|j��D�]}|j}
|
|vr�|||
<|
|vr�t
�||
<|j��D]�}|j}||v�r |||<|||
v�r<t
�||
|<d}d}|||
|v�rr||
||}|j}|j}|tjk�r�|�s�|
}n|j|	B}|j}t||�}n&|�s�|
}n|j|	B}|j}t||�}t||�||
||<�qq�qdS)aP
    Using rule_list, build up rule_db which is a data structure which consists
    of nested dicts that store BOTH the left and the right policies. All of the
    keys are interned strings. The permissions are stored as a set. The basic
    structure is rule_db[cond_exp][block_bool][src][tgt][tclass] = sides
    where:
      cond_exp is a boolean expression
      block_bool is either true or false
      src is the source type
      tgt is the target type
      tclass is the target class
      sides is a named tuple with attributes "left" and "right" referring to the
        left or right policy. Each attribute in the sides named tuple refers to a
        named tuple with attributes "perms" and "orig_rule" which refer to a
        permission set and the original unexpanded rule.
        sides = ((left_perms, left_orig_rule),(right_perms, right_orig_rule))
    There are a few advantages to this structure. First, it takes up way less
    memory. Second, it allows redundant rules to be easily eliminated. And,
    third, it makes it easy to create the added, removed, and modified rules.
    N)r2r3r4rr.�conditional�conditional_blockr�TERULES_UNCONDITIONAL�TERULES_UNCONDITIONAL_BLOCK�dict�tclass�name�setr6r5�source�expand�targetr7r8)r:r;r<r=�types�unexpanded_rule�cond_expZ
block_boolrDr6�	side_data�block�srcZsrc_str�tgtZtgt_str�	left_side�
right_sideZsides�pZorigr/r/r0�_avrule_expand_generatorJsb










rT)r;r>cCsR|tt}|��D�]6\}}|tkr(q|��D�]}|��D�]\}}||vrRq>|��D]�\}}|||vrpqZ|��D]�\}	}
|	|||vr�qx||||	}|
j}|
j}
|jr�|r�|j|jj@}|r�|j|}|r�t||j�}nd}t	||
�||	<|jrx|
rx|
j|jj@}|rx|
j|}|�r2t||
j�}
nd}
t	||
�||	<qxqZq>q0qdS�N)
rArB�items�valuesr3r4r6r5r7r8)r;Zuncond_blockrL�cond_blocksrNrO�src_datarP�tgt_datarDrMZuncond_side_datarQrR�crSr/r/r0�_av_remove_redundant_rules�sB



r\)r;r<r>cCsTg}g}g}|��D�]2}|��D�]"}|��D�]\}}|��D�]�\}	}
|
��D]�}|jr�|jr�|jj|jj@}|jj|}
|jj|}|
s�|r�|jj}|�|j||j|	|jj�}|�t|||
|��qT|j�r
|jj}|�|j||j|	|jj�}|�|�qT|jrT|jj}|�|j||j|	|jj�}|�|�qTqBq0q"q|||fSrU)	rWrVr3r4r6r7Zderive_expanded�appendr$)r;r<�added�removed�modifiedrXrNrOrYrPrZrMZcommon_permsZ
left_permsZright_permsZ
original_ruler%r/r/r0�_av_generate_diffs�sJ�
���ra�TERulesDifference)�ruletyper>cs t����dd��fdd�}|S)z�
    This is a template for the access vector diff functions.

    Parameters:
    ruletype    The rule type, e.g. "allow".
    N�r>cs2|j�d��|��|jdus(|jdur0|��tt�t��}t�}t�|t<t�|tt	<|j�d�|��t
|j�||tj�|j�d�|��t
|j�||tj
�|j�d�t|�|j�d�t||�\}}}|j��|j
��|��t|d���|�t|d���|�t|d	���|�dS)
�6Generate the difference in rules between the policies.�CGenerating {0} differences from {1.left_policy} to {1.right_policy}Nz(Expanding AV rules from {0.left_policy}.z)Expanding AV rules from {0.right_policy}.zRemoving redundant AV rules.zGenerating AV rule diff.�
added_{0}s�removed_{0}s�
modified_{0}s)�log�info�format�_left_te_rules�_right_te_rules�_create_te_rule_listsr9rCrArBrTr2r3r4r\ra�clear�setattr)�selfr<r;r^r_r`�rcr/r0�diff�s2��


zav_diff_template.<locals>.diff�r�lookup�rcrtr/rsr0�av_diff_template�s
#rx�AVRuleXpermWrapper)r:r>c
Cs�t�}|D]N}|��D]@}t|�}z||j|jO_WqtyT|||<Yq0qq
|rzt�t��d�	|t
|���|��S)z`
    Generator that yields wrapped, expanded, av(x) rules with
    unioned permission sets.
    z/Expanded {0.ruletype} rules for {0.policy}: {1})rCrHryr6�KeyError�loggingZ	getLoggerr)�debugrl�len�keys)r:rVrKZ
expanded_ruleZexpanded_wrapped_ruler/r/r0�_avxrule_expand_generator"s
��rcs t����dd��fdd�}|S)z�
    This is a template for the extended permission access vector diff functions.

    Parameters:
    ruletype    The rule type, e.g. "allowxperm".
    Nrdc

s|j�d��|��|jr |js(|��|jt|j��t|j��dd�\}}}g}|D]V\}}|j|j|jdd�\}}}	|s�|rZ|�	t
|jt|�t|�tdd�|	D����qZt
|d���tdd�|D���t
|d���td	d�|D���t
|d
���|�dS)rerfF)�unwrapcss|]}|dVqdS)rNr/)�.0rSr/r/r0�	<genexpr>f�z2avx_diff_template.<locals>.diff.<locals>.<genexpr>rgcss|]}|jVqdSrU��origin)r��ar/r/r0r�hr�rhcss|]}|jVqdSrUr�)r��rr/r/r0r�ir�riN)rjrkrlrmrnro�	_set_diffrr6r]r$r�rrqrF)
rrr^r_�matchedr`�	left_rule�
right_ruler&r'r(rsr/r0rtHs6����
�  zavx_diff_template.<locals>.diffrurwr/rsr0�avx_diff_template>s
$r�cs t����dd��fdd�}|S)z�
    This is a template for the type_* diff functions.

    Parameters:
    ruletype    The rule type, e.g. "type_transition".
    Nrdcs�|j�d��|��|jdus(|jdur0|��|�|�|j�t�|�|j�t��\}}}g}|D]2\}}t	|j
�t	|j
�krf|�t||j
|j
��qft
|d���|�t
|d���|�t
|d���|�dS)rerfNrgrhri)rjrkrlrmrnror�Z_expand_generator�
TERuleWrapperr�defaultr]r1rq)rrr^r_r�r`r�r�rsr/r0rtys*���
�zte_diff_template.<locals>.diffrurwr/rsr0�te_diff_templateos
r�c@s�eZdZUdZed�Zed�Zed�Zed�Z	ed�Z
ed�Zed�Zed�Z
ed�Zed�Zed�Zed�Zed�Zed	�Zed	�Zed	�Zed
�Zed�Zed�Zed�Zed�Zed
�Zed
�Zed
�Zed�Zed�Z ed�Z!ed�Z"ed�Z#ed�Z$ed�Z%ed�Z&e'd�Z(ed�Z)ed�Z*ed�Z+e'd�Z,ed�Z-ed�Z.ed�Z/e'd�Z0ed�Z1ed�Z2ed�Z3dZ4e5e6e7fe8d<dZ9e5e6e7fe8d<dd�dd�Z:dd�dd�Z;dS) rbzV
    Determine the difference in type enforcement rules
    between two policies.
    Zallow�diff_allowsZ
auditallow�diff_auditallowsZ
neverallow�diff_neverallowsZ	dontaudit�diff_dontauditsZ
allowxperm�diff_allowxpermsZauditallowxperm�diff_auditallowxpermsZneverallowxperm�diff_neverallowxpermsZdontauditxperm�diff_dontauditxpermsZtype_transition�diff_type_transitionsZtype_change�diff_type_changesZtype_member�diff_type_membersNrmrnrdcCs�|j�d�|��tt�|_|j��D]}|j|j�	|�q&|j�
�D] \}}|j�d�t|�|��qH|j�d�|��tt�|_|j
��D]}|j|j�	|�q�|j�
�D] \}}|j�d�t|�|��q�|j�d�dS)z$Create rule lists for both policies.z+Building TE rule lists from {0.left_policy}zLoaded {0} {1} rules.z,Building TE rule lists from {0.right_policy}z!Completed building TE rule lists.N)rjr|rlr�listrmZleft_policyZterulesrcr]rVr}rnZright_policy)rrr%rcZrulesr/r/r0ro�s

z'TERulesDifference._create_te_rule_listscCs�|j�d�d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_!d|_"d|_#d|_$dS)z%Reset diff results on policy changes.zResetting TE rule differencesN)%rjr|�added_allows�removed_allows�modified_allows�added_auditallows�removed_auditallows�modified_auditallows�added_neverallows�removed_neverallows�modified_neverallows�added_dontaudits�removed_dontaudits�modified_dontaudits�added_allowxperms�removed_allowxperms�modified_allowxperms�added_auditallowxperms�removed_auditallowxperms�modified_auditallowxperms�added_neverallowxperms�removed_neverallowxperms�modified_neverallowxperms�added_dontauditxperms�removed_dontauditxperms�modified_dontauditxperms�added_type_transitions�removed_type_transitions�modified_type_transitions�added_type_changes�removed_type_changes�modified_type_changes�added_type_members�removed_type_members�modified_type_membersrmrn�rrr/r/r0�_reset_diff�sHzTERulesDifference._reset_diff)<r)r*r+r,rxr�rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rmr!rrr-rnror�r/r/r/r0rb�sb
c@s<eZdZdZdZedd�dd�Zdd�Zd	d
�Zdd�Z	dS)
ryzEWrap extended permission access vector rules to allow set operations.)rGrIrD�
xperm_typer6N)r%r>cCsL||_t|j�|_t|j�|_t|j�|_|j|_t|j�|_t	|�|_
dSrU)r�r rGrIr"rDr�rFr6�hash�key�rrr%r/r/r0�__init__!szAVRuleXpermWrapper.__init__cCs|jSrU�r�r�r/r/r0�__hash__*szAVRuleXpermWrapper.__hash__cCs|j|jkSrUr��rr�otherr/r/r0�__lt__-szAVRuleXpermWrapper.__lt__cCs0|j|jko.|j|jko.|j|jko.|j|jkSrU)rGrIrDr�r�r/r/r0�__eq__0s
�
�
�zAVRuleXpermWrapper.__eq__)
r)r*r+r,�	__slots__rr�r�r�r�r/r/r/r0rys	c@s4eZdZdZdZdd�Zdd�Zdd�Zd	d
�ZdS)r�z*Wrap type_* rules to allow set operations.�rGrIrDr?r@�filenamec	Cs�||_t|j�|_t|j�|_t|j�|_t|�|_zt|j	�|_	|j
|_
Wntyjd|_	d|_
Yn0z|j|_Wnt
tfy�d|_Yn0dSrU)r�r rGrIr"rDr�r�rr?r@rr�rrr�r/r/r0r�?s
zTERuleWrapper.__init__cCs|jSrUr�r�r/r/r0r�RszTERuleWrapper.__hash__cCs|j|jkSrUr�r�r/r/r0r�UszTERuleWrapper.__lt__cCsH|j|jkoF|j|jkoF|j|jkoF|j|jkoF|j|jkoF|j|jkSrUr�r�r/r/r0r�Xs
�
�
�
�
�zTERuleWrapper.__eq__N)	r)r*r+r,r�r�r�r�r�r/r/r/r0r�9sr�)Br{�collectionsr�sysr�enumr�typingrrrrr	r
rrr
r�	exceptionrrrZ	policyreprrrrrrrr?rZdescriptorsr�
differencerrrJrr r!Zobjclassr"rArBr$r1r2r5r8r9r.ZCondExp�boolZ	CondBlockZRuleDBrTr\rarxrr�r�rbryr�r/r/r/r0�<module>sL0$
,
�[&�'01(

Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]

Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
17 Jan 2026 3.14 PM
root / root
0755
__init__.cpython-39.opt-1.pyc
2.032 KB
3 Apr 2024 4.13 PM
root / root
0644
__init__.cpython-39.pyc
2.032 KB
3 Apr 2024 4.13 PM
root / root
0644
bool.cpython-39.opt-1.pyc
2.556 KB
3 Apr 2024 4.13 PM
root / root
0644
bool.cpython-39.pyc
2.556 KB
3 Apr 2024 4.13 PM
root / root
0644
bounds.cpython-39.opt-1.pyc
3.884 KB
3 Apr 2024 4.13 PM
root / root
0644
bounds.cpython-39.pyc
3.884 KB
3 Apr 2024 4.13 PM
root / root
0644
commons.cpython-39.opt-1.pyc
2.11 KB
3 Apr 2024 4.13 PM
root / root
0644
commons.cpython-39.pyc
2.11 KB
3 Apr 2024 4.13 PM
root / root
0644
conditional.cpython-39.opt-1.pyc
1.65 KB
3 Apr 2024 4.13 PM
root / root
0644
conditional.cpython-39.pyc
1.65 KB
3 Apr 2024 4.13 PM
root / root
0644
constraints.cpython-39.opt-1.pyc
7.133 KB
3 Apr 2024 4.13 PM
root / root
0644
constraints.cpython-39.pyc
7.403 KB
3 Apr 2024 4.13 PM
root / root
0644
context.cpython-39.opt-1.pyc
1.553 KB
3 Apr 2024 4.13 PM
root / root
0644
context.cpython-39.pyc
1.553 KB
3 Apr 2024 4.13 PM
root / root
0644
default.cpython-39.opt-1.pyc
3.322 KB
3 Apr 2024 4.13 PM
root / root
0644
default.cpython-39.pyc
3.322 KB
3 Apr 2024 4.13 PM
root / root
0644
descriptors.cpython-39.opt-1.pyc
1.201 KB
3 Apr 2024 4.13 PM
root / root
0644
descriptors.cpython-39.pyc
1.201 KB
3 Apr 2024 4.13 PM
root / root
0644
difference.cpython-39.opt-1.pyc
5.412 KB
3 Apr 2024 4.13 PM
root / root
0644
difference.cpython-39.pyc
5.572 KB
3 Apr 2024 4.13 PM
root / root
0644
fsuse.cpython-39.opt-1.pyc
2.98 KB
3 Apr 2024 4.13 PM
root / root
0644
fsuse.cpython-39.pyc
2.98 KB
3 Apr 2024 4.13 PM
root / root
0644
genfscon.cpython-39.opt-1.pyc
3.077 KB
3 Apr 2024 4.13 PM
root / root
0644
genfscon.cpython-39.pyc
3.077 KB
3 Apr 2024 4.13 PM
root / root
0644
ibendportcon.cpython-39.opt-1.pyc
3.095 KB
3 Apr 2024 4.13 PM
root / root
0644
ibendportcon.cpython-39.pyc
3.095 KB
3 Apr 2024 4.13 PM
root / root
0644
ibpkeycon.cpython-39.opt-1.pyc
3.069 KB
3 Apr 2024 4.13 PM
root / root
0644
ibpkeycon.cpython-39.pyc
3.069 KB
3 Apr 2024 4.13 PM
root / root
0644
initsid.cpython-39.opt-1.pyc
2.145 KB
3 Apr 2024 4.13 PM
root / root
0644
initsid.cpython-39.pyc
2.145 KB
3 Apr 2024 4.13 PM
root / root
0644
mls.cpython-39.opt-1.pyc
9.57 KB
3 Apr 2024 4.13 PM
root / root
0644
mls.cpython-39.pyc
9.57 KB
3 Apr 2024 4.13 PM
root / root
0644
mlsrules.cpython-39.opt-1.pyc
3.846 KB
3 Apr 2024 4.13 PM
root / root
0644
mlsrules.cpython-39.pyc
3.974 KB
3 Apr 2024 4.13 PM
root / root
0644
netifcon.cpython-39.opt-1.pyc
3.163 KB
3 Apr 2024 4.13 PM
root / root
0644
netifcon.cpython-39.pyc
3.163 KB
3 Apr 2024 4.13 PM
root / root
0644
nodecon.cpython-39.opt-1.pyc
2.979 KB
3 Apr 2024 4.13 PM
root / root
0644
nodecon.cpython-39.pyc
2.979 KB
3 Apr 2024 4.13 PM
root / root
0644
objclass.cpython-39.opt-1.pyc
2.901 KB
3 Apr 2024 4.13 PM
root / root
0644
objclass.cpython-39.pyc
2.901 KB
3 Apr 2024 4.13 PM
root / root
0644
polcap.cpython-39.opt-1.pyc
1.504 KB
3 Apr 2024 4.13 PM
root / root
0644
polcap.cpython-39.pyc
1.504 KB
3 Apr 2024 4.13 PM
root / root
0644
portcon.cpython-39.opt-1.pyc
3.012 KB
3 Apr 2024 4.13 PM
root / root
0644
portcon.cpython-39.pyc
3.012 KB
3 Apr 2024 4.13 PM
root / root
0644
properties.cpython-39.opt-1.pyc
1.664 KB
3 Apr 2024 4.13 PM
root / root
0644
properties.cpython-39.pyc
1.664 KB
3 Apr 2024 4.13 PM
root / root
0644
rbacrules.cpython-39.opt-1.pyc
5.319 KB
3 Apr 2024 4.13 PM
root / root
0644
rbacrules.cpython-39.pyc
5.49 KB
3 Apr 2024 4.13 PM
root / root
0644
roles.cpython-39.opt-1.pyc
2.827 KB
3 Apr 2024 4.13 PM
root / root
0644
roles.cpython-39.pyc
2.827 KB
3 Apr 2024 4.13 PM
root / root
0644
terules.cpython-39.opt-1.pyc
15.376 KB
3 Apr 2024 4.13 PM
root / root
0644
terules.cpython-39.pyc
15.376 KB
3 Apr 2024 4.13 PM
root / root
0644
typeattr.cpython-39.opt-1.pyc
2.986 KB
3 Apr 2024 4.13 PM
root / root
0644
typeattr.cpython-39.pyc
2.986 KB
3 Apr 2024 4.13 PM
root / root
0644
types.cpython-39.opt-1.pyc
3.607 KB
3 Apr 2024 4.13 PM
root / root
0644
types.cpython-39.pyc
3.607 KB
3 Apr 2024 4.13 PM
root / root
0644
typing.cpython-39.opt-1.pyc
0.577 KB
3 Apr 2024 4.13 PM
root / root
0644
typing.cpython-39.pyc
0.577 KB
3 Apr 2024 4.13 PM
root / root
0644
users.cpython-39.opt-1.pyc
3.635 KB
3 Apr 2024 4.13 PM
root / root
0644
users.cpython-39.pyc
3.635 KB
3 Apr 2024 4.13 PM
root / root
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF