/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 qqe'@sVUddlmZddlmZmZddlmZmZmZm Z m Z ddl m Z ddl mZmZmZddlmZeeZeeed <eeZee ed <Gd d d eZGd ddeZGdddeZeeedddZe ee dddZGdddeZGdddeZGdddeZGdddeeZGdd d eeZGd!d"d"ee Z d#S)$) defaultdict) NamedTupleSet)CategoryLevel LevelDeclRange Sensitivity)DiffResultDescriptor) Difference SymbolWrapperWrapper) SymbolCache _cats_cache _sens_cachec@s6eZdZUdZeeed<eeed<eeed<dS)ModifiedCategoryz+Difference details for a modified category. added_aliasesremoved_aliasesmatched_aliasesN__name__ __module__ __qualname____doc__rstr__annotations__rr6/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.leveladded_categoriesremoved_categoriesmatched_categoriesN)rrrrrrrrrrrrr!%s   r!)categoryreturncCsBzt|j|WSty<t|}|t|j|<|YS0dS)z Wrap category from the specified policy. This caches results to prevent duplicate wrapper objects in memory. N)rpolicyKeyErrorr)r&crrrcategory_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*rrrsensitivity_wrapper_factory>s  r-c@sDeZdZdZedZedZedZddddZddddZ dS) CategoriesDifferencez\z7CategoriesDifference.diff_categories..css|]}t|VqdSr1r2r3rrrr5]r6FunwrapN) loginfoformat _set_diff left_policy categories right_policyr#r$dictmodified_categoriesaliasesr)selfr%Z left_categoryZright_categoryrrrrrrr/Us"  z$CategoriesDifference.diff_categoriescCs"|jdd|_d|_d|_dS)%Reset diff results on policy changes.zResetting category differencesN)r9debugr#r$rArCrrr _reset_diffos z CategoriesDifference._reset_diff) rrrrr r#r$rAr/rGrrrrr.Ms r.c@sDeZdZdZedZedZedZddddZddddZ dS) SensitivitiesDifferencez?Determine the difference in sensitivities between two policies.diff_sensitivitiesNr0cCs|jd||dd|jDdd|jD\|_|_}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|VqdSr1r-r4srrrr5r6z=SensitivitiesDifference.diff_sensitivities..css|]}t|VqdSr1rJrKrrrr5r6Fr7N) r9r:r;r<r=Z sensitivitiesr?added_sensitivitiesremoved_sensitivitiesr@modified_sensitivitiesrBr )rCZmatched_sensitivitiesZ left_sensZ right_sensrrrrrrrIs(   z*SensitivitiesDifference.diff_sensitivitiescCs"|jdd|_d|_d|_dSrDz!Resetting sensitivity differencesN)r9rErMrNrOrFrrrrGs z#SensitivitiesDifference._reset_diff) rrrrr rMrNrOrIrGrrrrrHws rHc@sDeZdZdZedZedZedZddddZddddZ dS) LevelDeclsDifferencez8Determine the difference in levels between two policies. diff_levelsNr0cCs|jd||dd|jDdd|jD\|_|_}g|_ |D]T\}}|dd| Ddd| 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|VqdSr1LevelDeclWrapperrKrrrr5r6z3LevelDeclsDifference.diff_levels..css|]}t|VqdSr1rSrKrrrr5r6css|]}t|VqdSr1r2r3rrrr5r6css|]}t|VqdSr1r2r3rrrr5r6N) r9r:r;r<r=Zlevelsr? added_levelsremoved_levelsmodified_levelsr>appendr!)rCZmatched_levelsZ left_levelZ right_levelr#r$r%rrrrRs(   z LevelDeclsDifference.diff_levelscCs"|jdd|_d|_d|_dSrP)r9rErUrVrWrFrrrrGs z LevelDeclsDifference._reset_diff) rrrrr rUrVrWrRrGrrrrrQs rQc@s<eZdZdZdZeddddZddZd d Zd d Z dS) rTz-Wrap level declarations to allow comparisons.r,Nr"r'cCs ||_t|j|_t||_dSr1)originr-r,hashkeyrCr"rrr__init__s zLevelDeclWrapper.__init__cCs|jSr1)r]rFrrr__hash__szLevelDeclWrapper.__hash__cCs |j|jkSr1rYrCotherrrr__eq__szLevelDeclWrapper.__eq__cCs |j|jkSr1rYrarrr__lt__szLevelDeclWrapper.__lt__) rrrr __slots__rr_r`rcrdrrrrrTs rTc@s<eZdZdZdZeddddZddZd d Zd d Z dS) LevelWrapperz!Wrap levels to allow comparisons.)r,r>NrZcCs.||_t|j|_tdd|D|_dS)Ncss|]}t|VqdSr1r2r3rrrr5r6z(LevelWrapper.__init__..)r[r-r,setr>r^rrrr_s zLevelWrapper.__init__cCs t|jSr1r\r[rFrrrr`szLevelWrapper.__hash__cCs4z|j|jko|j|jkWSty.YdS0dSNFr,r>AttributeErrorrarrrrcs    zLevelWrapper.__eq__cCs4z|j|jko|j|jkWSty.YdS0dSrirjrarrrrds    zLevelWrapper.__lt__) rrrrrerr_r`rcrdrrrrrfs  rfc@s<eZdZdZdZeddddZddZd 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. )lowhighN)range_r'cCs"||_t|j|_t|j|_dSr1)r[rfrmrn)rCrorrrr_s zRangeWrapper.__init__cCs t|jSr1rhrFrrrr`szRangeWrapper.__hash__cCs4z|j|jko|j|jkWSty.YdS0dSrirmrnrkrarrrrcs    zRangeWrapper.__eq__cCs4z|j|jko|j|jkWSty.YdS0dSrirprarrrrd$s    zRangeWrapper.__lt__) rrrrrer r_r`rcrdrrrrrls  rlN)! collectionsrtypingrrZ policyreprrrr r Z descriptorsr differencer rrrr@rrrrr r!r+r-r.rHrQrTrfrlrrrrs$     *,,!