/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__/bounds.cpython-39.pyc (3977B)
a qéqeÆã@sŒddlmZmZmZmZddlmZmZmZddl m Z ddl m Z m Z ddlmZGdd „d eƒZGd d „d e ƒZGd d „d e eƒZdS)é)ÚcastÚListÚ NamedTupleÚOptionalé)ÚBoundsÚBoundsRuletypeÚTypeé)ÚDiffResultDescriptor)Ú DifferenceÚWrapper)Útype_wrapper_factoryc@s*eZdZUdZeed<eed<eed<dS)ÚModifiedBoundsz.Difference details for a modified bounds rule.ÚruleZ added_boundZ removed_boundN)Ú__name__Ú __module__Ú __qualname__Ú__doc__rÚ__annotations__r ©rrú9/usr/lib64/python3.9/site-packages/setools/diff/bounds.pyrs rc@s|eZdZUdZedƒZedƒZedƒZdZe e e e d<dZ e e e e d<ddœdd„Zddœd d „Zddœd d „ZdS) ÚBoundsDifferencez9Determine the difference in *bounds between two policies.Údiff_typeboundsNÚ_left_typeboundsÚ_right_typebounds)ÚreturncCs¼|j d |¡¡|jdus&|jdur.| ¡|jdd„ttt |jƒDƒdd„ttt |jƒDƒdd„d�\|_ |_ }g|_ |D]4\}}t |jƒt |jƒkr‚|j  t||j|jƒ¡q‚dS) z@Generate the difference in typebound rules between the policies.zJGenerating typebounds differences from {0.left_policy} to {0.right_policy}Ncss|]}t|ƒVqdS©N©Ú BoundsWrapper©Ú.0ÚcrrrÚ -óz3BoundsDifference.diff_typebounds..css|]}t|ƒVqdSrrr rrrr#.r$cSs t|jƒSr)ÚstrÚchild)ÚbrrrÚ/r$z2BoundsDifference.diff_typebounds..©Úkey)ÚlogÚinfoÚformatrrÚ_create_typebound_listsZ _set_diffrrrÚadded_typeboundsÚremoved_typeboundsÚmodified_typeboundsrÚparentÚappendr)ÚselfZmatched_typeboundsZ left_boundZ right_boundrrrr#s  ÿý  ÿz BoundsDifference.diff_typeboundscCsŒg|_|j ¡D]2}|jtjkr.|j |¡q|j d  |j¡¡qg|_ |j  ¡D]2}|jtjkrr|j  |¡qT|j d  |j¡¡qTdS)z$Create rule lists for both policies.z/Unknown rule type: {0} (This is an SETools bug)N) rZ left_policyZboundsÚruletyperZ typeboundsr3r+Úerrorr-rZ right_policy©r4rrrrr.;s  ÿ  ÿz(BoundsDifference._create_typebound_listscCs(|j d¡d|_d|_d|_d|_dS)z%Reset diff results on policy changes.z!Resetting all *bounds differencesN)r+Údebugr/r0rr©r4rrrÚ _reset_diffMs  zBoundsDifference._reset_diff)rrrrr r/r0r1rrrrrrrr.r:rrrrrs rc@s<eZdZdZdZeddœdd„Zdd„Zd d „Zd d „Z dS) rzWrap *bounds for diff purposes.)r5r2r&N)rrcCs4||_|j|_t|jƒ|_t|jƒ|_t|ƒ|_dSr)Úoriginr5rr2r&Úhashr*r7rrrÚ__init__^s   zBoundsWrapper.__init__cCs|jSrr)r9rrrÚ__hash__eszBoundsWrapper.__hash__cCs |j|jkSrr)©r4ÚotherrrrÚ__lt__hszBoundsWrapper.__lt__cCs|j|jko|j|jkSr)r5r&r?rrrÚ__eq__ks  ÿzBoundsWrapper.__eq__) rrrrÚ __slots__rr=r>rArBrrrrrXs rN)ÚtypingrrrrZ policyreprrr Z descriptorsr Ú differencer r ÚtypesrrrrrrrrÚs   A