/usr/lib64/python3.6/site-packages/setools/__pycache__
NameSizeModeActions
boolquery.cpython-36.opt-1.pyc18480644editdlrm
boolquery.cpython-36.pyc18480644editdlrm
boundsquery.cpython-36.opt-1.pyc17090644editdlrm
boundsquery.cpython-36.pyc17090644editdlrm
categoryquery.cpython-36.opt-1.pyc15240644editdlrm
categoryquery.cpython-36.pyc15240644editdlrm
commonquery.cpython-36.opt-1.pyc17560644editdlrm
commonquery.cpython-36.pyc17560644editdlrm
constraintquery.cpython-36.opt-1.pyc45270644editdlrm
constraintquery.cpython-36.pyc45270644editdlrm
defaultquery.cpython-36.opt-1.pyc21700644editdlrm
defaultquery.cpython-36.pyc21700644editdlrm
descriptors.cpython-36.opt-1.pyc75330644editdlrm
descriptors.cpython-36.pyc77370644editdlrm
devicetreeconquery.cpython-36.opt-1.pyc23630644editdlrm
devicetreeconquery.cpython-36.pyc23630644editdlrm
dta.cpython-36.opt-1.pyc135500644editdlrm
dta.cpython-36.pyc135500644editdlrm
exception.cpython-36.opt-1.pyc88420644editdlrm
exception.cpython-36.pyc88420644editdlrm
fsusequery.cpython-36.opt-1.pyc28770644editdlrm
fsusequery.cpython-36.pyc28770644editdlrm
genfsconquery.cpython-36.opt-1.pyc30340644editdlrm
genfsconquery.cpython-36.pyc30340644editdlrm
ibendportconquery.cpython-36.opt-1.pyc30850644editdlrm
ibendportconquery.cpython-36.pyc30850644editdlrm
ibpkeyconquery.cpython-36.opt-1.pyc43180644editdlrm
ibpkeyconquery.cpython-36.pyc43180644editdlrm
infoflow.cpython-36.opt-1.pyc115970644editdlrm
infoflow.cpython-36.pyc115970644editdlrm
initsidquery.cpython-36.opt-1.pyc24650644editdlrm
initsidquery.cpython-36.pyc24650644editdlrm
iomemconquery.cpython-36.opt-1.pyc37580644editdlrm
iomemconquery.cpython-36.pyc37580644editdlrm
ioportconquery.cpython-36.opt-1.pyc37610644editdlrm
ioportconquery.cpython-36.pyc37610644editdlrm
mixins.cpython-36.opt-1.pyc64620644editdlrm
mixins.cpython-36.pyc64620644editdlrm
mlsrulequery.cpython-36.opt-1.pyc30250644editdlrm
mlsrulequery.cpython-36.pyc30250644editdlrm
netifconquery.cpython-36.opt-1.pyc25380644editdlrm
netifconquery.cpython-36.pyc25380644editdlrm
nodeconquery.cpython-36.opt-1.pyc36140644editdlrm
nodeconquery.cpython-36.pyc36140644editdlrm
objclassquery.cpython-36.opt-1.pyc29350644editdlrm
objclassquery.cpython-36.pyc29350644editdlrm
pcideviceconquery.cpython-36.opt-1.pyc27160644editdlrm
pcideviceconquery.cpython-36.pyc27160644editdlrm
permmap.cpython-36.opt-1.pyc119480644editdlrm
permmap.cpython-36.pyc121900644editdlrm
pirqconquery.cpython-36.opt-1.pyc26430644editdlrm
pirqconquery.cpython-36.pyc26430644editdlrm
polcapquery.cpython-36.opt-1.pyc13160644editdlrm
polcapquery.cpython-36.pyc13160644editdlrm
portconquery.cpython-36.opt-1.pyc43090644editdlrm
portconquery.cpython-36.pyc43090644editdlrm
query.cpython-36.opt-1.pyc10030644editdlrm
query.cpython-36.pyc10030644editdlrm
rbacrulequery.cpython-36.opt-1.pyc38350644editdlrm
rbacrulequery.cpython-36.pyc38350644editdlrm
rolequery.cpython-36.opt-1.pyc19880644editdlrm
rolequery.cpython-36.pyc19880644editdlrm
sensitivityquery.cpython-36.opt-1.pyc21660644editdlrm
sensitivityquery.cpython-36.pyc21660644editdlrm
terulequery.cpython-36.opt-1.pyc62800644editdlrm
terulequery.cpython-36.pyc62800644editdlrm
typeattrquery.cpython-36.opt-1.pyc21410644editdlrm
typeattrquery.cpython-36.pyc21410644editdlrm
typequery.cpython-36.opt-1.pyc28730644editdlrm
typequery.cpython-36.pyc28730644editdlrm
userquery.cpython-36.opt-1.pyc37230644editdlrm
userquery.cpython-36.pyc37230644editdlrm
util.cpython-36.opt-1.pyc47010644editdlrm
util.cpython-36.pyc47010644editdlrm
__init__.cpython-36.opt-1.pyc23920644editdlrm
__init__.cpython-36.pyc23920644editdlrm
Edit: /usr/lib64/python3.6/site-packages/setools/__pycache__/terulequery.cpython-36.pyc (6280B)
3 ^l$@sddlZddlZddlmZmZddlmZmZddlm Z m Z ddl m Z m Z ddlmZmZmZGdd d ejejejZdS) N)mixinsquery)CriteriaDescriptorCriteriaSetDescriptor) RuleUseErrorRuleNotConditional)IoctlSet TERuletype) match_regexmatch_indirect_regexmatch_regex_or_setcseZdZdZeedZeddZdZ dZ eddZ dZ dZ eddZdZed d ZdZdZd ZdZed d Zejdd ZfddZddZZS) TERuleQueryae 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_regexZlookup_type_or_attrFT target_regex default_regex boolean_regexZlookup_booleanNcCs|jS)N)_xperms)selfr#/usr/lib64/python3.6/terulequery.pyxpermsdszTERuleQuery.xpermscCs|rt}x|D]\}}d|ko*dkns>tdj|d|koPdknsdtdj|||krv||}}|jddt||dDqWt||_nd|_dS)Nriz{0:#07x} is not a valid ioctl.css|] }|VqdS)Nr).0irrr wsz%TERuleQuery.xperms..r)set ValueErrorformatupdateranger r)rvalueZpending_xpermsZlowZhighrrrrhs " c s$tt|j|f|tjt|_dS)N)superr__init__loggingZ getLogger__name__log)rpolicykwargs) __class__rrr#}szTERuleQuery.__init__c$csB|jjdj||jjdj||jjdj||jjdj||j|j|j|j|jjdj||jjdj||jjdj|x|jjD]}|jr|j|jkrq|j rt |j |j |j |j  rq|j rt |j |j |j|j rq|j|s qyN|jrJ|jrJ|jr8t|jdkr8w|j|jkrXwn|j|sXwWntk rrwYnXy&|jrt|j|j|jd  rwWntk rwYnX|jryt |j|jd |jswWntk rwYnX|jr4y t|jj|j|j |j!swWnt"k r2wYnX|VqWd S) z-Generator which yields all matching TE rules.z*Generating TE rule results from {0.policy}zRuletypes: {0.ruletype}zLSource: {0.source!r}, indirect: {0.source_indirect}, regex: {0.source_regex}zLTarget: {0.target!r}, indirect: {0.target_indirect}, regex: {0.target_regex}z*Xperms: {0.xperms!r}, eq: {0.xperms_equal}z0Default: {0.default!r}, regex: {0.default_regex}zGBoolean: {0.boolean!r}, eq: {0.boolean_equal}, regex: {0.boolean_regex}rFTN)#r&infordebugZ_match_object_class_debugZ_match_perms_debugr'Zterulesruletypesourcer source_indirectrtargettarget_indirectrZ_match_object_classZpermsZextendedZ perms_equallenZ xperm_typeZ _match_permsrrr xperms_equaldefaultrbooleanZ conditionalZbooleans boolean_equalrr)rZrulerrrresultss              zTERuleQuery.results)r% __module__ __qualname____doc__rr r,rr-rr.r/rr0r3rr4rr5rr2propertyrsetterr#r6 __classcell__rr)r)rrs&6       r)r$rerrZ descriptorsrrZ exceptionrrZ policyrepr r utilr r r Z MatchObjClassZMatchPermissionZ PolicyQueryrrrrrs