a
qqe] @ s d dl mZ d dlmZmZmZmZ ddlmZm Z ddl
mZmZm
Z
eedddZeed d
dZeeddd
ZeeedddZeeedddZeeeeedddZeeeeeedddZd"ee eee ee
ddddZd#eeeeeef dd d!ZdS )$ )suppress)IterableListOptionalTuple )InvalidPermissionNoCommon)LevelObjClass
SELinuxPolicy)regexreturnc C s" |rt |t| S | |kS dS )z
Match the object with optional regular expression.
Parameters:
obj The object to match.
criteria The criteria to match.
regex If regular expression matching should be used.
N)boolsearchstrobjcriteriar
r 2/usr/lib64/python3.9/site-packages/setools/util.pymatch_regex
s
r )equalr c C s |r| |kS t | |S dS )a
Match the object (a set) with optional set equality.
Parameters:
obj The object to match. (a set)
criteria The criteria to match. (a set)
equal If set equality should be used. Otherwise
any set intersection will match.
N)r intersection)r r r r r r match_set s r c s&