+
        B"                        a  R t0 t ^ RIH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                  ]P                   4      tR# )	    )IterableN)	exceptionmixins	policyrepqueryutil)CriteriaDescriptorCriteriaSetDescriptorTERuleQueryc                     a  ] tR t^t o Rt]]P                  ,          ! ]P                  R7      t]	]P                  ,          ! RR4      tRtRt]	]P                  ,          ! RR4      tRtRt]	]P"                  ,          ! RR4      tRt]]P(                  ,          ! R	R
4      tRtRtRtRt]V 3R lR l4       t]P8                  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 Type Enforcement 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 type/attribute to match.
source_indirect   If true, members of an attribute will be
                  matched rather than the attribute itself.
                  Default is true.
source_regex      If true, regular expression matching will
                  be used on the source type/attribute.
                  Obeys the source_indirect option.
                  Default is false.
target            The name of the target type/attribute to match.
target_indirect   If true, members of an attribute will be
                  matched rather than the attribute itself.
                  Default is true.
target_regex      If true, regular expression matching will
                  be used on the target type/attribute.
                  Obeys target_indirect option.
                  Default is false.
tclass            The object class(es) to match.
tclass_regex      If true, use a regular expression for
                  matching the rule's object class.
                  Default is false.
perms             The set of permission(s) to match.
perms_equal       If true, the permission set of the rule
                  must exactly match the permissions
                  criteria.  If false, any set intersection
                  will match.
                  Default is false.
perms_regex       If true, regular expression matching will be used
                  on the permission names instead of set logic.
                  Default is false.
perms_subset      If true, the rule matches if the permissions criteria
                  is a subset of the rule's permission set.
                  Default is false.
default           The name of the default type to match.
default_regex     If true, regular expression matching will be
                  used on the default type.
                  Default is false.
boolean           The set of boolean(s) to match.
boolean_regex     If true, regular expression matching will be
                  used on the booleans.
                  Default is false.
boolean_equal     If true, the booleans in the conditional
                  expression of the rule must exactly match the
                  criteria.  If false, any set intersection
                  will match.  Default is false.
)
enum_classsource_regexlookup_type_or_attrFTtarget_regexdefault_regexboolean_regexlookup_booleanNc                B   < V ^8  d   QhRS[ P                  R,          /# )   returnN)r   XpermSet)format__classdict__s   ":/usr/lib64/python3.14/site-packages/setools/terulequery.py__annotate__TERuleQuery.__annotate__W   s      	**T1     c                    V P                   # N_xperms)selfs   &r   xpermsTERuleQuery.xpermsV   s    ||r   c                X   < V ^8  d   QhRS[ S[S[S[3,          ,          R,          RR/# )r   valueNr   )r   tupleint)r   r   s   "r   r   r   [   s-        HU38_5<    r   c           	        V'       d   \         \        ,          ! 4       pV Fu  w  r4^ Tu;8:  d   R8:  g   M \        VR R24      h^ Tu;8:  d   R8:  g   M \        VR R24      hWC8  d   Y4r4VP                  R \	        W4^,           4       4       4       Kw  	  \
        P                  ! V4      V n        R# RV n        R# )r   i  z#07xz is not a valid ioctl.c              3   $   "   T F  qx  K  	  R # 5ir    ).0is   & r   	<genexpr>%TERuleQuery.xperms.<locals>.<genexpr>i   s     %F1EAa1Es   N)setr(   
ValueErrorupdateranger   r   r!   )r"   r&   pending_xpermslowhighs   &&   r   r#   r$   Z   s     XZN"	S*F*$Dz1G%HIIT+V+$T{2H%IJJ: ##%%%Fs1H1E%FF # %--n=DLDLr   c                D   < V ^8  d   QhRS[ S[P                  ,          /# )r   r   )r   r   	AnyTERule)r   r   s   "r   r   r   o   s"     p p)"5"56 pr   c              #  R
  "   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                  V P                   4       V P                   P                  R	V P                  : R
V P                  : 24       V P                   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                  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   V P0                  '       d   VP2                  '       dv   V P4                  '       d   \7        V P0                  4      ^8  d   EKW  \9        V\:        P<                  4      '       g   Q R4       hVP>                  V P0                  9  d   EK  MV PA                  V4      '       g   EK    V P                  '       dA   \*        PF                  ! VP0                  V P                  V P                  R4      '       g   EK  T P                  '       dC    \*        P,                  ! TP                  T P                  RT P                   4      '       g   EK^   T P"                  '       dW    \*        PF                  ! TPH                  PJ                  T P"                  T P$                  T P&                  4      '       g   EK   Tx  EK  	  R#   \B        PD                   d     EK  i ; i  \B        PD                   d     EK  i ; i  \B        PD                   d     EK%  i ; i  \B        PL                   d     EKB  i ; i5i)z-Generator which yields all matching TE rules.z Generating TE 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.xperms=z, self.xperms_equal=zself.default=z, self.default_regex=zself.boolean=z, self.boolean_equal=z, self.boolean_regex=z@Rule is not an extended permission rule, this is an SETools bug.FTN)'loginfopolicydebugruletypesourcesource_indirectr   targettarget_indirectr   _match_object_class_debug_match_perms_debugr#   xperms_equaldefaultr   booleanboolean_equalr   terulesr   match_indirect_regex_match_object_classpermsextendedperms_equallen
isinstancer   AVRuleXperm
xperm_type_match_permsr   RuleUseErrormatch_regex_or_setconditionalbooleansRuleNotConditional)r"   rules   & r   resultsTERuleQuery.resultso   s    8FG.$--)*+,$++'?$*>*>)@@U4CTCTBVWX,$++'?$*>*>)@@U4CTCTBVWX&&txx0),$++'<$*;*;)=>?-$,,(>4+=+=*?@A-$,,(>4+=+=*??U$BTBTAVWXKK'')D }}}==5
 {{{4#<#<KKKK((%%	$' $'
 
 {{{4#<#<KKKK((%%	$' $'
 
 ++D11
:::$---'''C

Oa,? !%dI,A,ABB [Z[Bdjj8  9**400 1	;;;t'>'>

))	( (
  |||  44 LL LL  ..	0 0
 !0 |||22 ,,55 LL .. ..	0 0
 !0 JI *f ))  )) " !--  !33 s   H#T'&AT'-T'AT'T'!T'%R37R3	R3R35T'8AR3:T'>R3T'S,<S)T'?<S-<T'AT
$T'3ST'ST'S*%T')S**T'-TT'TT'
T$T'#T$$T'c                   < V ^8  d   Qh/ S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[P                  R,          ;R	&   S[ ;R
&   # )r   r   r@   r   rB   r   r   rH   Nr!   rE   )boolr   r   )r   r   s   "r   r   r      s     t u v  w z { |  } @ A D E F G H $&-I J K r   r    )!__name__
__module____qualname____firstlineno____doc__r
   r   
TERuletyper>   r	   
TypeOrAttrr?   r   r@   rA   r   rB   TyperF   r   BooleanrG   r   rH   r!   rE   propertyr#   setterrZ   __annotate_func____static_attributes____classdictcell__)r   s   @r   r   r      s     4l %Y%9%9:iFZFZ[H	 4 45nF[\FL O	 4 45nF[\FL O 0BWXGM#I$5$56HXYGMM)-GL  ]]   (p pA  r   c                    V ^8  d   Qh/ ^ \         9   d,   \        P                  \        \        R3,          ,          ;R&   # )r   .__all__)__conditional_annotations__typingFinalr'   str)r   s   "r   r   r      s+     $ $ : 9eCHo	& 9 %r   )r   )rn   collections.abcr   ro    r   r   r   r   r   descriptorsr	   r
   rm   MatchObjClassMatchPermissionPolicyQueryr   r   )rn   s   @r   <module>rx      sF    % $  7 7 B)9 9P&&&(>(>@Q@Q Pr   