/usr/lib64/python3.9/site-packages/setools/diff
NameSizeModeActions
__pycache__/-0755rm
bool.py24860644editdlrm
bounds.py37820644editdlrm
commons.py21990644editdlrm
conditional.py12560644editdlrm
constraints.py83960644editdlrm
context.py13940644editdlrm
default.py36240644editdlrm
descriptors.py10630644editdlrm
difference.py54880644editdlrm
fsuse.py25500644editdlrm
genfscon.py27190644editdlrm
ibendportcon.py26410644editdlrm
ibpkeycon.py26540644editdlrm
initsid.py20010644editdlrm
mls.py101470644editdlrm
mlsrules.py46560644editdlrm
netifcon.py31270644editdlrm
nodecon.py26530644editdlrm
objclass.py31560644editdlrm
polcap.py11210644editdlrm
portcon.py26320644editdlrm
properties.py18200644editdlrm
rbacrules.py65540644editdlrm
roles.py27260644editdlrm
terules.py246690644editdlrm
typeattr.py28630644editdlrm
types.py42710644editdlrm
typing.py4580644editdlrm
users.py54810644editdlrm
__init__.py25850644editdlrm
Edit: /usr/lib64/python3.9/site-packages/setools/diff/context.py (1394B)
# Copyright 2016, Tresys Technology, LLC # Copyright 2018, Chris PeBenito # # SPDX-License-Identifier: LGPL-2.1-only # from typing import Optional from ..exception import MLSDisabled from ..policyrep import Context from .difference import Wrapper from .mls import RangeWrapper from .roles import role_wrapper_factory from .types import type_wrapper_factory from .users import user_wrapper_factory class ContextWrapper(Wrapper[Context]): """Wrap contexts to allow comparisons.""" __slots__ = ("user", "role", "type_", "range_") def __init__(self, ctx: Context) -> None: self.origin = ctx self.user = user_wrapper_factory(ctx.user) self.role = role_wrapper_factory(ctx.role) self.type_ = type_wrapper_factory(ctx.type_) try: self.range_: Optional[RangeWrapper] = RangeWrapper(ctx.range_) except MLSDisabled: self.range_ = None def __hash__(self): return hash(self.origin) def __eq__(self, other): return self.user == other.user and \ self.role == other.role and \ self.type_ == other.type_ and \ self.range_ == other.range_ def __lt__(self, other): return self.user < other.user and \ self.role < other.role and \ self.type_ < other.type_ and \ self.range_ < other.range_