a
qqe @ s d dl Z d dlmZmZ ddlmZ ddlmZ ddlm Z ddl
mZ dd lm
Z
mZ d
ZdZdZd
ZdZdZG dd deZdS ) N)ListUnion )InvalidCheckValue)AnyRBACRule)
RBACRuleQuery )
CheckerModule)ConfigDescriptorConfigSetDescriptorsourcetarget
exempt_source
exempt_target
expect_source
expect_targetc s e Zd ZdZdZeeeee e
efZe
dZe
dZeddddZeddddZeddddZeddddZdd fd d
ZedddZ ZS )
AssertRBACz?Checker module for asserting a RBAC allow rule exists (or not).Zassert_rbacZlookup_roleFT)strictexpandN)returnc s t ||| tt| _|t| _|t | _
|t| _|t
| _|t| _|t| _t| j| j
fs|td| j| j@ }|r| jdddd |D | j| j@ }|r| jdddd |D d S )Nz5At least one of source or target 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/assertrbac.py