404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.17.75.243: ~ $
3

�^��@s�ddlmZmZddlmZddlmZddlmZm	Z	ddl
mZddlm
Z
dd	lmZed
ddd
g�ZGdd�de�ZGdd�de	�ZGdd�de	�ZdS)�)�defaultdict�
namedtuple�)�RBACRuletype�)�DiffResultDescriptor)�
Difference�Wrapper)�class_wrapper_factory)�role_wrapper_factory)�type_or_attr_wrapper_factoryZmodified_rbacrule�ruleZ
added_defaultZremoved_defaultc@sheZdZdZed�Zed�Zed�Zed�Zed�Z	e
e�Ze
e�Z
dd�Zdd�Zdd	�Zd
d�ZdS)
�RBACRulesDifferencez<Determine the difference in RBAC rules between two policies.�diff_role_allows�diff_role_transitionscCsd|jjdj|��|js"|jr*|j�|j|j|jtj	t
�|j|jtj	t
��\|_|_}dS)zAGenerate the difference in role allow rules between the policies.zJGenerating role allow differences from {0.left_policy} to {0.right_policy}N)
�log�info�format�_left_rbac_rules�_right_rbac_rules�_create_rbac_rule_lists�	_set_diff�_expand_generatorrZallow�RoleAllowWrapper�added_role_allows�removed_role_allows)�self�_�r�!/usr/lib64/python3.6/rbacrules.pyr3sz$RBACRulesDifference.diff_role_allowscCs�|jjdj|��|js"|jr*|j�|j|j|jtj	t
�|j|jtj	t
��\}}}g}x:|D]2\}}t|j�t|j�krf|j
t||j|j��qfW||_||_||_dS)zFGenerate the difference in role_transition rules between the policies.zOGenerating role_transition differences from {0.left_policy} to {0.right_policy}N)rrrrrrrrrZrole_transition�RoleTransitionWrapperr�default�append�modified_rbacrule_record�added_role_transitions�removed_role_transitions�modified_role_transitions)rZaddedZremovedZmatchedZmodifiedZ	left_ruleZ
right_rulerrrrAs&z)RBACRulesDifference.diff_role_transitionscCs�|jjdj|��x$|jj�D]}|j|jj|�qW|jjdj|��x$|jj�D]}|j	|jj|�qVW|jjd�dS)z$Create rule lists for both policies.z-Building RBAC rule lists from {0.left_policy}z.Building RBAC rule lists from {0.right_policy}z#Completed building RBAC rule lists.N)
r�debugrZleft_policyZ	rbacrulesrZruletyper"Zright_policyr)rr
rrrrasz+RBACRulesDifference._create_rbac_rule_listscCsH|jjd�d|_d|_d|_d|_d|_d|_|jj	�|j
j	�dS)z%Reset diff results on policy changes.zResetting RBAC rule differencesN)rr'rrZmodified_role_allowsr$r%r&r�clearr)rrrr�_reset_diffos
zRBACRulesDifference._reset_diffN)�__name__�
__module__�__qualname__�__doc__rrrr$r%r&r�listrrrrrr)rrrrr#s rc@s4eZdZdZd
Zdd�Zdd�Zdd	�Zd
d�ZdS)rz.Wrap role allow rules to allow set operations.�source�targetcCs,||_t|j�|_t|j�|_t|�|_dS)N)�originrr/r0�hash�key)rr
rrr�__init__�szRoleAllowWrapper.__init__cCs|jS)N)r3)rrrr�__hash__�szRoleAllowWrapper.__hash__cCs|j|jkS)N)r3)r�otherrrr�__lt__�szRoleAllowWrapper.__lt__cCs|j|jko|j|jkS)N)r/r0)rr6rrr�__eq__�szRoleAllowWrapper.__eq__N)r/r0)	r*r+r,r-�	__slots__r4r5r7r8rrrrr~src@s4eZdZdZdZdd�Zdd�Zd	d
�Zdd�Zd
S)r z3Wrap role_transition rules to allow set operations.r/r0�tclasscCs8||_t|j�|_t|j�|_t|j�|_t|�|_dS)N)	r1rr/rr0r
r:r2r3)rr
rrrr4�s
zRoleTransitionWrapper.__init__cCs|jS)N)r3)rrrrr5�szRoleTransitionWrapper.__hash__cCs|j|jkS)N)r3)rr6rrrr7�szRoleTransitionWrapper.__lt__cCs$|j|jko"|j|jko"|j|jkS)N)r/r0r:)rr6rrrr8�szRoleTransitionWrapper.__eq__N)r/r0r:)	r*r+r,r-r9r4r5r7r8rrrrr �sr N)�collectionsrrZ	policyreprZdescriptorsr�
differencerr	Zobjclassr
Zrolesr�typesrr#rrr rrrr�<module>s[

Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 1.99 KB 0644
__init__.cpython-36.pyc File 1.99 KB 0644
bool.cpython-36.opt-1.pyc File 2.12 KB 0644
bool.cpython-36.pyc File 2.12 KB 0644
bounds.cpython-36.opt-1.pyc File 3.42 KB 0644
bounds.cpython-36.pyc File 3.42 KB 0644
commons.cpython-36.opt-1.pyc File 1.82 KB 0644
commons.cpython-36.pyc File 1.82 KB 0644
conditional.cpython-36.opt-1.pyc File 1.42 KB 0644
conditional.cpython-36.pyc File 1.42 KB 0644
constraints.cpython-36.opt-1.pyc File 7.03 KB 0644
constraints.cpython-36.pyc File 7.03 KB 0644
context.cpython-36.opt-1.pyc File 1.45 KB 0644
context.cpython-36.pyc File 1.45 KB 0644
default.cpython-36.opt-1.pyc File 2.85 KB 0644
default.cpython-36.pyc File 2.85 KB 0644
descriptors.cpython-36.opt-1.pyc File 1.07 KB 0644
descriptors.cpython-36.pyc File 1.07 KB 0644
difference.cpython-36.opt-1.pyc File 4.83 KB 0644
difference.cpython-36.pyc File 5 KB 0644
fsuse.cpython-36.opt-1.pyc File 2.64 KB 0644
fsuse.cpython-36.pyc File 2.64 KB 0644
genfscon.cpython-36.opt-1.pyc File 2.73 KB 0644
genfscon.cpython-36.pyc File 2.73 KB 0644
ibendportcon.cpython-36.opt-1.pyc File 2.75 KB 0644
ibendportcon.cpython-36.pyc File 2.75 KB 0644
ibpkeycon.cpython-36.opt-1.pyc File 2.73 KB 0644
ibpkeycon.cpython-36.pyc File 2.73 KB 0644
initsid.cpython-36.opt-1.pyc File 1.86 KB 0644
initsid.cpython-36.pyc File 1.86 KB 0644
mls.cpython-36.opt-1.pyc File 8.62 KB 0644
mls.cpython-36.pyc File 8.62 KB 0644
mlsrules.cpython-36.opt-1.pyc File 3.4 KB 0644
mlsrules.cpython-36.pyc File 3.4 KB 0644
netifcon.cpython-36.opt-1.pyc File 2.76 KB 0644
netifcon.cpython-36.pyc File 2.76 KB 0644
nodecon.cpython-36.opt-1.pyc File 2.64 KB 0644
nodecon.cpython-36.pyc File 2.64 KB 0644
objclass.cpython-36.opt-1.pyc File 2.43 KB 0644
objclass.cpython-36.pyc File 2.43 KB 0644
polcap.cpython-36.opt-1.pyc File 1.44 KB 0644
polcap.cpython-36.pyc File 1.44 KB 0644
portcon.cpython-36.opt-1.pyc File 2.68 KB 0644
portcon.cpython-36.pyc File 2.68 KB 0644
properties.cpython-36.opt-1.pyc File 1.3 KB 0644
properties.cpython-36.pyc File 1.3 KB 0644
rbacrules.cpython-36.opt-1.pyc File 4.85 KB 0644
rbacrules.cpython-36.pyc File 4.85 KB 0644
roles.cpython-36.opt-1.pyc File 2.39 KB 0644
roles.cpython-36.pyc File 2.39 KB 0644
terules.cpython-36.opt-1.pyc File 14.25 KB 0644
terules.cpython-36.pyc File 14.25 KB 0644
typeattr.cpython-36.opt-1.pyc File 2.52 KB 0644
typeattr.cpython-36.pyc File 2.52 KB 0644
types.cpython-36.opt-1.pyc File 3.08 KB 0644
types.cpython-36.pyc File 3.08 KB 0644
users.cpython-36.opt-1.pyc File 3.05 KB 0644
users.cpython-36.pyc File 3.05 KB 0644