+
    ,i  c                   s   a  R t0 t ^ RIHt ^ RIt^ RIt^RIHtHtHtH	t	H
t
 ^RIHtHt Rt] ^ k  ! R R]P                  ]	P                   4      tR# )	i    )IterableN)	exceptionmixins	policyrepqueryutil)CriteriaDescriptorCriteriaSetDescriptorRBACRuleQueryc                   s  a  ] tR t^t o Rt]]P                  ,          ! ]P                  R7      t]	]P                  ,          ! RR4      tRtRtRtRtRt]]P"                  ,          ! RR	4      tRt]	]P                  ,          ! R
R4      tRt]V 3R lR l4       t]P0                  V 3R lR l4       tV 3R lR ltV 3R ltRtV tR# )r   a~  
Query the RBAC rules.

Parameter:
policy            The policy to query.

Keyword Parameters/Class attributes:
ruletype        The list of rule type(s) to match.
source          The name of the source role/attribute to match.
source_indirect If true, members of an attribute will be
                matched rather than the attribute itself.
source_regex    If true, regular expression matching will
                be used on the source role/attribute.
                Obeys the source_indirect option.
target          The name of the target role/attribute to match.
target_indirect If true, members of an attribute will be
                matched rather than the attribute itself.
target_regex    If true, regular expression matching will
                be used on the target role/attribute.
                Obeys target_indirect option.
tclass          The object class(es) to match.
tclass_regex    If true, use a regular expression for
                matching the rule's object class.
default         The name of the default role to match.
default_regex   If true, regular expression matching will
                be used on the default role.
)Z
enum_classsource_regexlookup_roleFTNtclass_regexZlookup_classdefault_regexc                s   < V ^8  d   QhRS[ P                  S[,          S[P                  ,          S[P
                  ,          R,          /# )   returnN)rePatternstrr   Role
TypeOrAttrformat__classdict__   "</usr/lib64/python3.14/site-packages/setools/rbacrulequery.py__annotate__RBACRuleQuery.__annotate__:   s6      

3)..89;O;OORVV     c                s    V P                   # N_target)selfs   &r   targetRBACRuleQuery.target9   s    ||r   c                sz   < V ^8  d   QhRS[ S[P                  ,          S[P                  ,          R,          RR/# )r   valueNr   )r   r   r   r   r   r   r   r   r   >   s5     > >C)..093G3GG$N >SW >r   c                s
   V'       g
   R V n         R # V P                  '       d'   \        P                  ! \	        V4      4      V n         R #  V P
                  P                  \        P                  ! \        \        P                  ,          V4      4      V n         R #   \        P                   dS    T P
                  P                  \        P                  ! \        \        P                  ,          T4      4      T n          R # i ; ir   )r   target_regexr   Zcompiler   policyZlookup_type_or_attrtypingZcastr   r   r   ZInvalidTyper
   r   )r   r"   s   &&r   r    r!   =   s    DL::c%j1DL>#{{>>KKi&:&: :EB D(( >#{{66KKinn 4e< >>s   AB A#DDc                sD   < V ^8  d   QhRS[ S[P                  ,          /# )r   r   )r    r   ZAnyRBACRuler   r   r   r   r   K   s"     @ @)"7"78 @r   c              #  s  "   V P                   P                  RV P                   24       V P                   P                  RV P                  : 24       V P                   P                  RV P
                  : RV P                  : RV P                  : 24       V P                   P                  RV P                  : RV P                  : RV P                  : 24       V P                  V P                   4       V P                   P                  R	V P                  : R
V P                  : 24       V P                  P                  4        EF]  pV P                  '       d   VP                  V P                  9  d   K3  V P
                  '       dJ   \        P                   ! VP
                  V P
                  V P                  V P                  4      '       g   K  V P                  '       dJ   \        P                   ! VP                  V P                  V P                  V P                  4      '       g   K   V P#                  V4      '       g   EK   T P                  '       dC    \        P                   ! TP                  T P                  RT P                  4      '       g   EKX   Tx  EK`  	  R#   \$        P&                   d     EK}  i ; i  \$        P&                   d     EK  i ; i5i)z/Generator which yields all matching RBAC rules.z"Generating RBAC rule results from zself.ruletype=zself.source=z, self.source_indirect=z, self.source_regex=zself.target=z, self.target_indirect=z, self.target_regex=zself.default=z, self.default_regex=TN)ZlogZinfor$   Zdebugruletypesourcesource_indirectr	   r    target_indirectr#   Z_match_object_class_debugdefaultr   Z	rbacrulesr   Zmatch_indirect_regexZ_match_object_classr   ZRuleUseError)r   Zrules   & r   resultsZRBACRuleQuery.resultsK   sA    :4;;-HI.$--)*+,$++'?$*>*>)@@U4CTCTBVWX,$++'?$*>*>)@@U4CTCTBVWX&&txx0-$,,(>4+=+=*?@AKK))+D }}}==5
 {{{4#<#<KKKK((%%	$' $'
 
 {{{4#<#<KKKK((%%	$' $'
 
//55 6 |||  44 LL LL  ..	0 0
 !0 Jo ,D )) " !-- sh   FK(AK(K(*AK(1K(4J.K("<KK(.KK(KK(K% K($K%%K(c                s   < V ^8  d   Qh/ S[ ;R&   S[ ;R&   S[P                  S[,          S[P
                  ,          S[P                  ,          R,          ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   # )	r   r	   r(   Nr   r#   r)   r   r   )Zboolr   r   r   r   r   r   r   r   r   r   r      s     @ A B  C D ZZ_y~~-	0D0DDtKRE F G H  I L M P Q r   r   )Z__name__Z
__module__Z__qualname__Z__firstlineno__Z__doc__r   r   ZRBACRuletyper&   r   r   r'   r	   r(   r   r#   r)   ZObjClassZtclassr   r*   r   Zpropertyr    Zsetterr+   Z__annotate_func__Z__static_attributes__Z__classdictcell__)r      @r   r   r      s     8 %Y%;%;<	H^H^_H	/NFL ONRGL O"9#5#56~~VFL 0-PGM  ]]> >@ @y  r   c                s    V ^8  d   Qh/ ^ \         9   d,   \        P                  \        \        R3,          ,          ;R&   # )r   .__all__)__conditional_annotations__r%   ZFinalZtupler   )r   s   "r   r   r      s+     $ $ < ;eCHo	& ; %r   )r   )r.   Zcollections.abcr    r   r%   Z r   r   r   r   r   Zdescriptorsr   r   r-   ZMatchObjClassZPolicyQueryr   r   )r.   r,   r   <module>r/      sA   
 % $ 	  7 7 B); ;|F((%*;*; |r   