/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__/mls.cpython-39.pyc (9800B)
a qéqe£'ã@sVUddlmZddlmZmZddlmZmZmZm Z m Z ddl m Z ddl mZmZmZddlmZeeƒZeeed <eeƒZee ed <Gd d „d eƒZGd d„deƒZGdd„deƒZeeedœdd„Ze ee dœdd„ZGdd„deƒZGdd„deƒZGdd„deƒZGdd„deeƒZGdd „d eeƒZGd!d"„d"ee ƒZ d#S)$é)Ú defaultdict)Ú NamedTupleÚSeté)ÚCategoryÚLevelÚ LevelDeclÚRangeÚ Sensitivityé)ÚDiffResultDescriptor)Ú DifferenceÚ SymbolWrapperÚWrapper)Ú SymbolCacheÚ _cats_cacheÚ _sens_cachec@s6eZdZUdZeeed<eeed<eeed<dS)ÚModifiedCategoryz+Difference details for a modified category.Ú added_aliasesÚremoved_aliasesÚmatched_aliasesN©Ú__name__Ú __module__Ú __qualname__Ú__doc__rÚstrÚ__annotations__©rrú6/usr/lib64/python3.9/site-packages/setools/diff/mls.pyrs   rc@s6eZdZUdZeeed<eeed<eeed<dS)ÚModifiedSensitivityz.Difference details for a modified sensitivity.rrrNrrrrrr s   r c@s>eZdZUdZeed<eeed<eeed<eeed<dS)ÚModifiedLevelDeclz4Difference details for a modified level declaration.ÚlevelÚadded_categoriesÚremoved_categoriesÚmatched_categoriesN)rrrrrrrrrrrrr!%s   r!)ÚcategoryÚreturncCsBzt|j|WSty<t|ƒ}|t|j|<|YS0dS)z Wrap category from the specified policy. This caches results to prevent duplicate wrapper objects in memory. N)rÚpolicyÚKeyErrorr)r&ÚcrrrÚcategory_wrapper_factory/s  r+)Ú sensitivityr'cCsBzt|j|WSty<t|ƒ}|t|j|<|YS0dS)z‚ Wrap sensitivity from the specified policy. This caches results to prevent duplicate wrapper objects in memory. N)rr(r)r)r,r*rrrÚsensitivity_wrapper_factory>s  r-c@sDeZdZdZedƒZedƒZedƒZddœdd„Zddœdd„Z dS) ÚCategoriesDifferencez\óz7CategoriesDifference.diff_categories..css|]}t|ƒVqdSr1r2r3rrrr5]r6F©ÚunwrapN) ÚlogÚinfoÚformatÚ _set_diffÚ left_policyÚ categoriesÚ right_policyr#r$ÚdictÚmodified_categoriesÚaliasesr)Úselfr%Z left_categoryZright_categoryrrrrrrr/Us"ÿþ ÿ þz$CategoriesDifference.diff_categoriescCs"|j d¡d|_d|_d|_dS)ú%Reset diff results on policy changes.zResetting category differencesN)r9Údebugr#r$rA©rCrrrÚ _reset_diffos z CategoriesDifference._reset_diff) rrrrr r#r$rAr/rGrrrrr.Ms r.c@sDeZdZdZedƒZedƒZedƒZddœdd„Zddœdd„Z dS) ÚSensitivitiesDifferencez?Determine the difference in sensitivities between two policies.Údiff_sensitivitiesNr0cCsš|j d |¡¡| dd„|j ¡Dƒdd„|j ¡Dƒ¡\|_|_}t ƒ|_ |D]@\}}|j|  ¡|  ¡dd�\}}}|s‚|rTt |||ƒ|j |<qTdS)z>Generate the difference in sensitivities between the policies.zKGenerating sensitivity differences from {0.left_policy} to {0.right_policy}css|]}t|ƒVqdSr1©r-©r4Úsrrrr5ˆr6z=SensitivitiesDifference.diff_sensitivities..css|]}t|ƒVqdSr1rJrKrrrr5‰r6Fr7N) r9r:r;r<r=Z sensitivitiesr?Úadded_sensitivitiesÚremoved_sensitivitiesr@Úmodified_sensitivitiesrBr )rCZmatched_sensitivitiesZ left_sensZ right_sensrrrrrrrIs(ÿÿþÿ  ÿ þz*SensitivitiesDifference.diff_sensitivitiescCs"|j d¡d|_d|_d|_dS©rDz!Resetting sensitivity differencesN)r9rErMrNrOrFrrrrG›s z#SensitivitiesDifference._reset_diff) rrrrr rMrNrOrIrGrrrrrHws rHc@sDeZdZdZedƒZedƒZedƒZddœdd„Zddœdd„Z dS) ÚLevelDeclsDifferencez8Determine the difference in levels between two policies.Ú diff_levelsNr0cCs¬|j d |¡¡| dd„|j ¡Dƒdd„|j ¡Dƒ¡\|_|_}g|_ |D]T\}}| dd„|  ¡Dƒdd„|  ¡Dƒ¡\}}}|s�|rR|j   t ||||ƒ¡qRdS)z7Generate the difference in levels between the policies.zJGenerating level decl differences from {0.left_policy} to {0.right_policy}css|]}t|ƒVqdSr1©ÚLevelDeclWrapperrKrrrr5´r6z3LevelDeclsDifference.diff_levels..css|]}t|ƒVqdSr1rSrKrrrr5µr6css|]}t|ƒVqdSr1r2r3rrrr5½r6css|]}t|ƒVqdSr1r2r3rrrr5¾r6N) r9r:r;r<r=Zlevelsr?Ú added_levelsÚremoved_levelsÚmodified_levelsr>Úappendr!)rCZmatched_levelsZ left_levelZ right_levelr#r$r%rrrrR«s(ÿÿþÿ  þ ÿz LevelDeclsDifference.diff_levelscCs"|j d¡d|_d|_d|_dSrP)r9rErUrVrWrFrrrrGÇs z LevelDeclsDifference._reset_diff) rrrrr rUrVrWrRrGrrrrrQ£s rQc@s<eZdZdZdZeddœdd„Zdd„Zd d „Zd d „Z dS) rTz-Wrap level declarations to allow comparisons.©r,N©r"r'cCs ||_t|jƒ|_t|ƒ|_dSr1)Úoriginr-r,ÚhashÚkey©rCr"rrrÚ__init__Õs zLevelDeclWrapper.__init__cCs|jSr1)r]rFrrrÚ__hash__ÚszLevelDeclWrapper.__hash__cCs |j|jkSr1rY©rCÚotherrrrÚ__eq__ÝszLevelDeclWrapper.__eq__cCs |j|jkSr1rYrarrrÚ__lt__âszLevelDeclWrapper.__lt__) rrrrÚ __slots__rr_r`rcrdrrrrrTÏs rTc@s<eZdZdZdZeddœdd„Zdd„Zd d „Zd d „Z dS) Ú LevelWrapperz!Wrap levels to allow comparisons.)r,r>NrZcCs.||_t|jƒ|_tdd„| ¡Dƒƒ|_dS)Ncss|]}t|ƒVqdSr1r2r3rrrr5ïr6z(LevelWrapper.__init__..)r[r-r,Úsetr>r^rrrr_ìs zLevelWrapper.__init__cCs t|jƒSr1©r\r[rFrrrr`ñszLevelWrapper.__hash__cCs4z|j|jko|j|jkWSty.YdS0dS©NF©r,r>ÚAttributeErrorrarrrrcôs   ÿ zLevelWrapper.__eq__cCs4z|j|jko|j|jkWSty.YdS0dSrirjrarrrrdýs   ÿ zLevelWrapper.__lt__) rrrrrerr_r`rcrdrrrrrfæs  rfc@s<eZdZdZdZeddœdd„Zdd„Zd d „Zd d „Z dS) Ú RangeWrapperzÝ Wrap ranges to allow comparisons. This only compares the low and high levels of the range. It does not detect additions/removals/modifications to levels between the low and high levels of the range. )ÚlowÚhighN)Úrange_r'cCs"||_t|jƒ|_t|jƒ|_dSr1)r[rfrmrn)rCrorrrr_s zRangeWrapper.__init__cCs t|jƒSr1rhrFrrrr`szRangeWrapper.__hash__cCs4z|j|jko|j|jkWSty.YdS0dSri©rmrnrkrarrrrcs   ÿ zRangeWrapper.__eq__cCs4z|j|jko|j|jkWSty.YdS0dSrirprarrrrd$s   ÿ zRangeWrapper.__lt__) rrrrrer r_r`rcrdrrrrrls  rlN)!Ú collectionsrÚtypingrrZ policyreprrrr r Z descriptorsr Ú differencer rrrr@rrrrr r!r+r-r.rHrQrTrfrlrrrrÚs$     *,,!