a
qqe @ s d dl Z d dlmZmZ ddlmZ ddlmZ ddlm Z ddl
mZ dd lm
Z
mZmZ d
ZdZdZd
ZdZdZdZdZG dd deZdS ) N)ListUnion )InvalidCheckValue) AnyTERule)TERuleQuery )
CheckerModule)ConfigDescriptorConfigSetDescriptorConfigPermissionSetDescriptorsourcetargettclassperms
exempt_source
exempt_target
expect_source
expect_targetc s e Zd ZdZdZeeeee e
eee
fZedZedZeddddZe ZeddddZeddddZeddddZeddddZdd fd
dZed dd
Z ZS )AssertTEzKChecker module for asserting a type enforcement allow rule exists (or not).Z assert_teZlookup_type_or_attrZlookup_classTF)strictexpandN)returnc s t ||| tt| _|t| _|t | _
|t| _|t
| _|t| _|t| _|t| _|t| _t| j| j
| j| jfstd| j| j@ }|r| jdddd |D | j| j@ }|r| jdddd |D d S )NzEAt least one of source, target, tclass, or perms options must be set.z.Overlap in expect_source and exempt_source: {}z, c s s | ]}|j V qd S Nname.0i r >/usr/lib64/python3.9/site-packages/setools/checker/assertte.py