a
qéqex ã @ sN d dl Z d dlmZ ddlmZ ddlmZ ddlmZ G dd„ deeƒZ dS ) é N)ÚIterableé )Ú MatchName)ÚPolicyCapability)ÚPolicyQueryc s8 e Zd ZdZddœ‡ fdd„Zee dœdd„Z‡ ZS )ÚPolCapQuerya/
Query SELinux policy capabilities
Parameter:
policy The policy to query.
Keyword Parameters/Class attributes:
name The name of the policy capability to match.
name_regex If true, regular expression matching will
be used for matching the name.
N)Úreturnc s( t t| ƒj|fi |¤Ž t t¡| _d S )N)Úsuperr Ú__init__ÚloggingZ getLoggerÚ__name__Úlog)ÚselfÚpolicyÚkwargs©Ú __class__© ú9/usr/lib64/python3.9/site-packages/setools/polcapquery.pyr
s zPolCapQuery.__init__c c sD | j d | ¡¡ | | j ¡ | j ¡ D ]}| |¡s8q(|V q(dS )z8Generator which yields all matching policy capabilities.z4Generating policy capability results from {0.policy}N)r
ÚinfoÚformatZ_match_name_debugr ZpolcapsZ_match_name)r Zcapr r r Úresults s
zPolCapQuery.results) r Ú
__module__Ú__qualname__Ú__doc__r
r r r Ú
__classcell__r r r r r
s r )
r Útypingr Zmixinsr Z policyrepr Úqueryr r r r r r Ú