PATH:
usr
/
lib64
/
python3.9
/
site-packages
/
setools
# Copyright 2014-2015, Tresys Technology, LLC # Copyright 2018, Chris PeBenito <pebenito@ieee.org> # # SPDX-License-Identifier: LGPL-2.1-only # from abc import ABC, abstractmethod from logging import Logger from typing import Iterable from .policyrep import SELinuxPolicy class PolicyQuery(ABC): """Abstract base class for SELinux policy queries.""" log: Logger policy: SELinuxPolicy def __init__(self, policy: SELinuxPolicy, **kwargs) -> None: self.policy = policy # keys are sorted in reverse order so regex settings # are set before the criteria, e.g. name_regex # is set before name. This ensures correct behavior # since the criteria descriptors are sensitve to # regex settings. for name in sorted(kwargs.keys(), reverse=True): attr = getattr(self, name, None) # None is not callable if callable(attr): raise ValueError("Keyword parameter {0} conflicts with a callable.".format(name)) setattr(self, name, kwargs[name]) @abstractmethod def results(self) -> Iterable: """ Generator which returns the matches for the query. This method should be overridden by subclasses. """ pass
[-] netifconquery.py
[edit]
[-] constraintquery.py
[edit]
[-] terulequery.py
[edit]
[-] permmap.py
[edit]
[-] py.typed
[edit]
[-] nodeconquery.py
[edit]
[+]
checker
[-] util.py
[edit]
[-] perm_map
[edit]
[-] typequery.py
[edit]
[-] commonquery.py
[edit]
[-] defaultquery.py
[edit]
[-] pirqconquery.py
[edit]
[-] policyrep.pyi
[edit]
[-] ioportconquery.py
[edit]
[-] ibpkeyconquery.py
[edit]
[-] pcideviceconquery.py
[edit]
[-] ibendportconquery.py
[edit]
[-] __init__.py
[edit]
[+]
diff
[-] policyrep.cpython-39-x86_64-linux-gnu.so
[edit]
[-] categoryquery.py
[edit]
[-] genfsconquery.py
[edit]
[-] polcapquery.py
[edit]
[-] boundsquery.py
[edit]
[-] objclassquery.py
[edit]
[-] boolquery.py
[edit]
[-] userquery.py
[edit]
[-] rolequery.py
[edit]
[+]
..
[-] descriptors.py
[edit]
[-] iomemconquery.py
[edit]
[-] dta.py
[edit]
[-] sensitivityquery.py
[edit]
[-] fsusequery.py
[edit]
[-] portconquery.py
[edit]
[-] typeattrquery.py
[edit]
[-] rbacrulequery.py
[edit]
[-] mlsrulequery.py
[edit]
[+]
__pycache__
[-] exception.py
[edit]
[-] devicetreeconquery.py
[edit]
[-] initsidquery.py
[edit]
[-] mixins.py
[edit]
[-] infoflow.py
[edit]
[-] query.py
[edit]