/usr/lib64/python3.9/site-packages/setools/diff/__pycache__
NameSizeModeActions
bool.cpython-39.opt-1.pyc26170644editdlrm
bool.cpython-39.pyc26170644editdlrm
bounds.cpython-39.opt-1.pyc39770644editdlrm
bounds.cpython-39.pyc39770644editdlrm
commons.cpython-39.opt-1.pyc21610644editdlrm
commons.cpython-39.pyc21610644editdlrm
conditional.cpython-39.opt-1.pyc16900644editdlrm
conditional.cpython-39.pyc16900644editdlrm
constraints.cpython-39.opt-1.pyc73040644editdlrm
constraints.cpython-39.pyc75810644editdlrm
context.cpython-39.opt-1.pyc15900644editdlrm
context.cpython-39.pyc15900644editdlrm
default.cpython-39.opt-1.pyc34020644editdlrm
default.cpython-39.pyc34020644editdlrm
descriptors.cpython-39.opt-1.pyc12300644editdlrm
descriptors.cpython-39.pyc12300644editdlrm
difference.cpython-39.opt-1.pyc55420644editdlrm
difference.cpython-39.pyc57060644editdlrm
fsuse.cpython-39.opt-1.pyc30520644editdlrm
fsuse.cpython-39.pyc30520644editdlrm
genfscon.cpython-39.opt-1.pyc31510644editdlrm
genfscon.cpython-39.pyc31510644editdlrm
ibendportcon.cpython-39.opt-1.pyc31690644editdlrm
ibendportcon.cpython-39.pyc31690644editdlrm
ibpkeycon.cpython-39.opt-1.pyc31430644editdlrm
ibpkeycon.cpython-39.pyc31430644editdlrm
initsid.cpython-39.opt-1.pyc21960644editdlrm
initsid.cpython-39.pyc21960644editdlrm
mls.cpython-39.opt-1.pyc98000644editdlrm
mls.cpython-39.pyc98000644editdlrm
mlsrules.cpython-39.opt-1.pyc39380644editdlrm
mlsrules.cpython-39.pyc40690644editdlrm
netifcon.cpython-39.opt-1.pyc32390644editdlrm
netifcon.cpython-39.pyc32390644editdlrm
nodecon.cpython-39.opt-1.pyc30510644editdlrm
nodecon.cpython-39.pyc30510644editdlrm
objclass.cpython-39.opt-1.pyc29710644editdlrm
objclass.cpython-39.pyc29710644editdlrm
polcap.cpython-39.opt-1.pyc15400644editdlrm
polcap.cpython-39.pyc15400644editdlrm
portcon.cpython-39.opt-1.pyc30840644editdlrm
portcon.cpython-39.pyc30840644editdlrm
properties.cpython-39.opt-1.pyc17040644editdlrm
properties.cpython-39.pyc17040644editdlrm
rbacrules.cpython-39.opt-1.pyc54470644editdlrm
rbacrules.cpython-39.pyc56220644editdlrm
roles.cpython-39.opt-1.pyc28950644editdlrm
roles.cpython-39.pyc28950644editdlrm
terules.cpython-39.opt-1.pyc157450644editdlrm
terules.cpython-39.pyc157450644editdlrm
typeattr.cpython-39.opt-1.pyc30580644editdlrm
typeattr.cpython-39.pyc30580644editdlrm
types.cpython-39.opt-1.pyc36940644editdlrm
types.cpython-39.pyc36940644editdlrm
typing.cpython-39.opt-1.pyc5910644editdlrm
typing.cpython-39.pyc5910644editdlrm
users.cpython-39.opt-1.pyc37220644editdlrm
users.cpython-39.pyc37220644editdlrm
__init__.cpython-39.opt-1.pyc20810644editdlrm
__init__.cpython-39.pyc20810644editdlrm
Edit: /usr/lib64/python3.9/site-packages/setools/diff/__pycache__/mlsrules.cpython-39.pyc (4069B)
a qéqe0ã@s°ddlmZddlmZddlmZmZmZddlm Z ddl m Z m Z ddl mZdd lmZdd lmZdd lmZGd d „d eƒZGdd„de ƒZGdd„de eƒZdS)é)Ú defaultdict)Ú NamedTupleé)ÚMLSRuleÚ MLSRuletypeÚRangeé)ÚDiffResultDescriptor)Ú DifferenceÚWrapper)Ú RangeWrapper)Úclass_wrapper_factory)Útype_or_attr_wrapper_factory)ÚRuleListc@s*eZdZUdZeed<eed<eed<dS)ÚModifiedMLSRulez+Difference details for a modified MLS rule.ÚruleZ added_defaultZremoved_defaultN)Ú__name__Ú __module__Ú __qualname__Ú__doc__rÚ__annotations__r©rrú;/usr/lib64/python3.9/site-packages/setools/diff/mlsrules.pyrs rc@s|eZdZUdZedƒZedƒZedƒZdZe e e fe d<dZ e e e fe d<ddœdd„Zddœd d „Zddœd d „ZdS) ÚMLSRulesDifferencez;Determine the difference in MLS rules between two policies.Údiff_range_transitionsNÚ_left_mls_rulesÚ_right_mls_rules)ÚreturncCsÖ|j d |¡¡|jdus&|jdur.| ¡|jdus@Jdƒ‚|jdusRJdƒ‚| | |jtj t ¡| |jtj t ¡¡\}}}g}|D]2\}}t |j ƒt |j ƒkrŒ|  t||j |j ƒ¡qŒ||_||_||_dS)zGGenerate the difference in range_transition rules between the policies.zPGenerating range_transition differences from {0.left_policy} to {0.right_policy}Nz+Left MLS rules did not load, this is a bug.z,Right MLS rules did not load, this is a bug.)ÚlogÚinfoÚformatrrÚ_create_mls_rule_listsZ _set_diffZ_expand_generatorrZrange_transitionÚMLSRuleWrapperr ÚdefaultÚappendrÚadded_range_transitionsÚremoved_range_transitionsÚmodified_range_transitions)ÚselfZaddedZremovedZmatchedZmodifiedZ left_ruleZ right_rulerrrr(s6ÿÿÿÿý  þz)MLSRulesDifference.diff_range_transitionscCsŒttƒ|_|j d |¡¡|j ¡D]}|j|j  |¡q&ttƒ|_ |j d |¡¡|j  ¡D]}|j |j  |¡qd|j d¡dS)z$Create rule lists for both policies.z,Building MLS rule lists from {0.left_policy}z-Building MLS rule lists from {0.right_policy}z"Completed building MLS rule lists.N) rÚlistrrÚdebugr Z left_policyZmlsrulesÚruletyper$rZ right_policy©r(rrrrr!Ls  z)MLSRulesDifference._create_mls_rule_listscCs.|j d¡d|_d|_d|_d|_d|_dS)z%Reset diff results on policy changes.zResetting MLS rule differencesN)rr*r%r&r'rr©r(rrrÚ _reset_diff\s  zMLSRulesDifference._reset_diff)rrrrr r%r&r'rrrrrrrr!r.rrrrrs $rc@s<eZdZdZdZeddœdd„Zdd„Zd d „Zd d „Z dS) r"z'Wrap MLS rules to allow set operations.)r+ÚsourceÚtargetÚtclassN)rrcCs8||_t|jƒ|_t|jƒ|_t|jƒ|_t|ƒ|_dS©N)Úoriginrr/r0r r1ÚhashÚkeyr,rrrÚ__init__ns    zMLSRuleWrapper.__init__cCs|jSr2©r5r-rrrÚ__hash__uszMLSRuleWrapper.__hash__cCs |j|jkSr2r7©r(ÚotherrrrÚ__lt__xszMLSRuleWrapper.__lt__cCs$|j|jko"|j|jko"|j|jkSr2)r/r0r1r9rrrÚ__eq__{s   ÿ þzMLSRuleWrapper.__eq__) rrrrÚ __slots__rr6r8r;r<rrrrr"hs r"N)Ú collectionsrÚtypingrZ policyreprrrZ descriptorsr Ú differencer r Zmlsr Zobjclassr Útypesrrrrr"rrrrÚs        L