JFIF$        dd7 

Viewing File: /usr/lib64/python3.9/site-packages/setools/__pycache__/userquery.cpython-39.pyc

a

q�qe��@szddlZddlZddlmZddlmZmZddlmZddl	m
Z
ddlmZddl
mZmZmZGd	d
�d
ee�ZdS)�N)�Iterable�)�CriteriaDescriptor�CriteriaSetDescriptor)�	MatchName)�User)�PolicyQuery)�match_regex_or_set�match_level�match_rangecs�eZdZUdZedd�ZdZeed<dZ	eed<dZ
eed<edd�ZdZeed	<dZ
eed
<dZeed<dZeed<ed
d�ZdZeed<dZeed
<dd��fdd�Zeed�dd�Z�ZS)�	UserQueryaf
    Query SELinux policy users.

    Parameter:
    policy            The policy to query.

    Keyword Parameters/Class attributes:
    name            The user name to match.
    name_regex      If true, regular expression matching
                    will be used on the user names.
    roles           The attribute to match.
    roles_equal     If true, only types with role sets
                    that are equal to the criteria will
                    match.  Otherwise, any intersection
                    will match.
    roles_regex     If true, regular expression matching
                    will be used on the role names instead
                    of set logic.
    level           The criteria to match the user's default level.
    level_dom       If true, the criteria will match if it dominates
                    the user's default level.
    level_domby     If true, the criteria will match if it is dominated
                    by the user's default level.
    level_incomp    If true, the criteria will match if it is incomparable
                    to the user's default level.
    range_          The criteria to match the user's range.
    range_subset    If true, the criteria will match if it is a subset
                    of the user's range.
    range_overlap   If true, the criteria will match if it overlaps
                    any of the user's range.
    range_superset  If true, the criteria will match if it is a superset
                    of the user's range.
    range_proper    If true, use proper superset/subset operations.
                    No effect if not using set operations.
    Zlookup_level)Zlookup_functionF�	level_dom�level_domby�level_incompZlookup_range�
range_overlap�range_subset�range_superset�range_proper�roles_regexZlookup_role�roles_equalN)�returncs(tt|�j|fi|��t�t�|_dS)N)�superr�__init__�loggingZ	getLogger�__name__�log)�self�policy�kwargs��	__class__��7/usr/lib64/python3.9/site-packages/setools/userquery.pyrCszUserQuery.__init__ccs�|j�d�|��|�|j�|j�d�|��|j�d�|��|j�d�|��|j��D]|}|�|�snq^|jr�t	|j|j|j
|j�s�q^|jr�t
|j|j|j|j|j�s�q^|jr�t|j|j|j|j|j|j�s�q^|Vq^dS)z*Generator which yields all matching users.z'Generating user results from {0.policy}z?Roles: {0.roles!r}, regex: {0.roles_regex}, eq: {0.roles_equal}zXLevel: {0.level!r}, dom: {0.level_dom}, domby: {0.level_domby}, incomp: {0.level_incomp}z�Range: {0.range_!r}, subset: {0.range_subset}, overlap: {0.range_overlap}, superset: {0.range_superset}, proper: {0.range_proper}N)r�info�formatZ_match_name_debug�debugrZusersZ_match_name�rolesr	rr�levelr
Z	mls_levelr
rr�range_rZ	mls_rangerrrr)r�userr!r!r"�resultsGsN
�
�
�
���zUserQuery.results)r�
__module__�__qualname__�__doc__rr'r
�bool�__annotations__rrr(rrrrrr&rrrrrr*�
__classcell__r!r!rr"rs
$


r)r�re�typingrZdescriptorsrrZmixinsrZ	policyrepr�queryr�utilr	r
rrr!r!r!r"�<module>s
Back to Directory  nL+D550H?Mx ,D"v]qv;6*Zqn)ZP0!1 A "#a$2Qr D8 a Ri[f\mIykIw0cuFcRı?lO7к_f˓[C$殷WF<_W ԣsKcëIzyQy/_LKℂ;C",pFA:/]=H  ~,ls/9ć:[=/#f;)x{ٛEQ )~ =𘙲r*2~ a _V=' kumFD}KYYC)({ *g&f`툪ry`=^cJ.I](*`wq1dđ#̩͑0;H]u搂@:~וKL Nsh}OIR*8:2 !lDJVo(3=M(zȰ+i*NAr6KnSl)!JJӁ* %݉?|D}d5:eP0R;{$X'xF@.ÊB {,WJuQɲRI;9QE琯62fT.DUJ;*cP A\ILNj!J۱+O\͔]ޒS߼Jȧc%ANolՎprULZԛerE2=XDXgVQeӓk yP7U*omQIs,K`)6\G3t?pgjrmۛجwluGtfh9uyP0D;Uڽ"OXlif$)&|ML0Zrm1[HXPlPR0'G=i2N+0e2]]9VTPO׮7h(F*癈'=QVZDF,d߬~TX G[`le69CR(!S2!P <0x<!1AQ "Raq02Br#SCTb ?Ζ"]mH5WR7k.ۛ!}Q~+yԏz|@T20S~Kek *zFf^2X*(@8r?CI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