✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ server.blackpussy.asia ​🇻​♯➤ 5.14.0-611.20.1.el9_7.x86_64 #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 163.245.207.76 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.243
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗞 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ mail,mb_send_mail
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /usr/lib/python3.9/site-packages/sepolgen/__pycache__//policygen.cpython-39.opt-1.pyc
a

B�i�;�@s�dZddlZddlZddlmZzddlTWnYn0ddlmZddlmZddlm	Z	ddlm
Z
dd	lmZdd
lmZdZ
dZdZGdd
�d
�Zdefdd�Zdd�ZGdd�d�Zdd�ZdS)z>
classes and algorithms for the generation of SELinux policy.
�N)�*�)�	refpolicy)�objectmodel)�access)�
interfaces)�matching)�util�c@s�eZdZdZddd�Zd dd�Zd!dd	�Zefd
d�Zdd
�Z	dd�Z
dd�Zd"dd�Zdd�Z
dd�Zdd�Zdd�Zdd�ZdS)#�PolicyGeneratora�Generate a reference policy module from access vectors.

    PolicyGenerator generates a new reference policy module
    or updates an existing module based on requested access
    in the form of access vectors.

    It generates allow rules and optionally module require
    statements, reference policy interfaces, and extended
    permission access vector rules. By default only allow rules
    are generated. The methods .set_gen_refpol, .set_gen_requires
    and .set_gen_xperms turns on interface generation,
    requires generation, and xperms rules generation respectively.

    PolicyGenerator can also optionally add comments explaining
    why a particular access was allowed based on the audit
    messages that generated the access. The access vectors
    passed in must have the .audit_msgs field set correctly
    and .explain set to SHORT|LONG_EXPLANATION to enable this
    feature.

    The module created by PolicyGenerator can be passed to
    output.ModuleWriter to output a text representation.
    NcCs>d|_t|_d|_|r||_n
t��|_d|_d|_d|_	dS)z�Initialize a PolicyGenerator with an optional
        existing module.

        If the module parameter is not None then access
        will be added to the passed in module. Otherwise
        a new reference policy module will be created.
        NF)
�ifgen�NO_EXPLANATION�explain�gen_requires�modulerZModule�	dontaudit�xperms�domains)�selfr�r�6/usr/lib/python3.9/site-packages/sepolgen/policygen.py�__init__Es
zPolicyGenerator.__init__cCs*|rt||�|_d|_nd|_|��dS)a?Set whether reference policy interfaces are generated.

        To turn on interface generation pass in an interface set
        to use for interface generation. To turn off interface
        generation pass in None.

        If interface generation is enabled requires generation
        will also be enabled.
        TN)�InterfaceGeneratorrr�"_PolicyGenerator__set_module_style)rZif_set�	perm_mapsrrr�set_gen_refpolYs

zPolicyGenerator.set_gen_refpolTcCs
||_dS)a&Set whether module requires are generated.

        Passing in true will turn on requires generation and
        False will disable generation. If requires generation is
        disabled interface generation will also be disabled and
        can only be re-enabled via .set_gen_refpol.
        N)r)r�statusrrr�set_gen_requiresksz PolicyGenerator.set_gen_requirescCs
||_dS)z)Set whether access is explained.
        N)r)rrrrr�set_gen_explainuszPolicyGenerator.set_gen_explaincCs
||_dS�N)r)rrrrr�set_gen_dontauditzsz!PolicyGenerator.set_gen_dontauditcCs
||_dS)zSSet whether extended permission access vector rules
        are generated.
        N)r)rrrrr�set_gen_xperms}szPolicyGenerator.set_gen_xpermscCs*|jrd}nd}|j��D]
}||_qdS)NTF)rr�module_declarationsr)rr�modrrrZ__set_module_style�s
z"PolicyGenerator.__set_module_style�1.0cCsXd}|j��D]}|}q|s4t��}|jj�d|�||_||_|jrNd|_nd|_dS)z?Set the name of the module and optionally the version.
        NrTF)	rr"rZModuleDeclaration�children�insert�name�versionr)rr'r(�mr#rrr�set_module_name�szPolicyGenerator.set_module_namecCs|jrt|j�|jSr)rr)rrrr�
get_module�s
zPolicyGenerator.get_modulec	Csnt�|�}|jr|j|_d|_|jr>tt�t	||jd���|_|j
tjkrl|jd7_|j
rl|jd7_|j
tjkr�|jd7_|j
tjkr�t|j�dkr�|jdd�d	d
�|jD��7_n|jd|jdd7_|j
tjk�rL|jd
7_|jd7_|jd|jd7_|jdd�D]}|jd|7_�q2�z|j
tjk�rLd|jv�rLd|jv�s�d|jv�rL|j�s�ttdd�dd|_g}dd
�ttgt|jt|jt|ji�D�D]}||jv�r�|�|��q�t|�dk�r|jd|j|jd�|�f7_n0t|�dk�rL|jd|j|jd�|�f7_WnYn0|jj �|�dS)z Add access vector rule.
        �)�	verbosityz0
#!!!! This avc is allowed in the current policyzN
#!!!! This av rule may have been overridden by an extended permission av rulez:
#!!!! This avc has a dontaudit rule in the current policyrzH
#!!!! This avc can be allowed using one of the these booleans:
#     %sz, cSsg|]}|d�qS)rr��.0�xrrr�
<listcomp>��z1PolicyGenerator.__add_av_rule.<locals>.<listcomp>z5
#!!!! This avc can be allowed using the boolean '%s'rz�
#!!!! This avc is a constraint violation.  You would need to modify the attributes of either the source or target types to allow this access.z
#Constraint rule: z
#	Nz?
#	Possible cause is the source %s and target %s are different.�write�dir�open�domain)r'�typescSsg|]}|t�qSr)ZTCONTEXTr.rrrr1�r2zL
#!!!! The source type '%s' can write to a '%s' of the following type:
# %s
zM
#!!!! The source type '%s' can write to a '%s' of the following types:
# %s
)!rZAVRulerZ	DONTAUDIT�	rule_type�commentr�str�Comment�explain_access�type�	audit2whyZALLOWrZBOOLEAN�len�data�joinZ
CONSTRAINTZTERULE�perms�	obj_classrZseinfoZ	ATTRIBUTEZsesearchZSCONTEXT�src_typeZCLASSZPERMS�appendrr%)r�avZrule�reasonr7�irrrZ
__add_av_rule�sV
&���,$&zPolicyGenerator.__add_av_rulecCs<|j��D],}t�||�}|jr(|j|_|jj�	|�q
dS)z5Add extended permission access vector rules.
        N)
r�keysrZ	AVExtRulerZDONTAUDITXPERMr8rr%rE)rrF�opZextrulerrrZ__add_ext_av_rules�s
z"PolicyGenerator.__add_ext_av_rulescCs\|jr*|j�||j�\}}|jj�|�n|}|D]$}|�|�|jr2|jr2|�|�q2dS)zJAdd the access from the access vector set to this
        module.
        N)	r�genrrr%�extend�_PolicyGenerator__add_av_ruler�"_PolicyGenerator__add_ext_av_rules)rZav_setZ	raw_allow�ifcallsrFrrr�
add_access�s	
zPolicyGenerator.add_accesscCs|D]}|jj�|�qdSr)rr%rE)rZ
role_type_set�	role_typerrr�add_role_types�szPolicyGenerator.add_role_types)N)NN)T)r$)�__name__�
__module__�__qualname__�__doc__rrr�SHORT_EXPLANATIONrr r!rr*r+rMrNrPrRrrrrr-s




5rc	sg���fdd�}|tkr�|jD]�}��d|j���dt|j�t|j�f���d|jt�	|j
�f���d|j|j|j
f���tjd|jdd	d
dd��q |�nb|�r��d
|j|j|j|j��f�t|j�dk�r|jd}��d|j|j|j
f�|��S)a�Explain why a policy statement was generated.

    Return a string containing a text explanation of
    why a policy statement was generated. The string is
    commented and wrapped and can be directly inserted
    into a policy.

    Params:
      av - access vector representing the access. Should
       have .audit_msgs set appropriately.
      verbosity - the amount of explanation provided. Should
       be set to NO_EXPLANATION, SHORT_EXPLANATION, or
       LONG_EXPLANATION.
    Returns:
      list of strings - strings explaining the access or an empty
       string if verbosity=NO_EXPLANATION or there is not sufficient
       information to provide an explanation.
    csJ�sdS��d����D]*}t|j�j�}��d|��|jf�qdS)Nz Interface options:z   %s # [%d])rE�all�call_interface�	interfacerFZ	to_stringZdist)�match�ifcall��ml�srr�explain_interfacess
z*explain_access.<locals>.explain_interfacesz %sz  scontext="%s" tcontext="%s"z  class="%s" perms="%s"z  comm="%s" exe="%s" path="%s"z	message="�"�Pz  z   )�initial_indent�subsequent_indentz) src="%s" tgt="%s" class="%s", perms="%s"rz comm="%s" exe="%s" path="%s")�LONG_EXPLANATIONZ
audit_msgsrE�headerr:ZscontextZtcontextZtclassrZlist_to_space_strZaccessesZcommZexe�pathrL�textwrap�wrap�messagerD�tgt_typerCrBZto_space_strr?)rFr^r-r`�msgrr]rr<�s2
���
�
r<cCs�g}g}|�|j���|jdd�dd�t��}|j|_tt	|��D]r}||j
tjkrj|j�
|j�qF||j
tjkr�|j�
|j�qF||j
tjkr�|j�
|j�qFt||j
�qF|S)NcSs|jSr��num�Zparamrrr�<lambda>9r2z call_interface.<locals>.<lambda>T��key�reverse)rL�params�values�sortrZ
InterfaceCallr'Zifname�ranger?r=�SRC_TYPE�argsrErD�TGT_TYPErk�	OBJ_CLASSrC�print)rZrFrtryr\rHrrrrY4s rYc@s.eZdZd
dd�Zdd�Zdd�Zdd	�ZdS)rNcCs&||_|�|�t�|�|_g|_dSr)�ifs�hack_check_ifsrZ
AccessMatcher�matcher�calls)rr}rrrrrNs
zInterfaceGenerator.__init__cCs�|j��D]|}g}|�|j���|jdd�dd�tt|��D]D}|d||jkr`d|_q
||j	t
jt
jt
j
fvr@d|_q
q@q
dS)NcSs|jSrrmrorrrrp\r2z3InterfaceGenerator.hack_check_ifs.<locals>.<lambda>TrqrF)rrurLrtrvrwr?rnZenabledr=rrxrzr{)rr}r0rtrHrrrr~Ts�z!InterfaceGenerator.hack_check_ifscCs�|�|�}g}|jD]>}t|��j|j�}|rDt�t|j||��|_	|�
||f�qg}|D]L\}}d}	|D],}
|
�|�rl|
j	r�|j	r�|
j	�|j	�d}	ql|	s\|�
|�q\||fS)NFT)
r[r�rYZbestrZrFrr;r<r9rE�matches�merge)r�avsr-�raw_avrOr^r\�dr}�foundZo_ifcallrrrrKks$


zInterfaceGenerator.gencCsLg}|D]>}t��}|j�|j||�t|�r<|j�|�q|�|�q|Sr)rZ	MatchListrZ
search_ifsr}r?r�rE)rr�r�rFZansrrrr[�szInterfaceGenerator.match)N)rSrTrUrr~rKr[rrrrrMs
rcCs"dd�}|��D]}||�qdS)z*Add require statements to the module.
    cSs�t��}|��D]:}|j�|j�|j�|j�|jD]}|�||j	�q6q|�
�D]}|jD]}|j�|�q^qT|�
�D] }|j�|j�|j�|j�qz|j�d�|j�d|�dS)Nrr)rZRequireZavrulesr7�updateZ	src_typesZ	tgt_typesZobj_classesZ
add_obj_classrBZinterface_callsry�addZ
role_typesZrolesZrole�discardr%r&)�node�rZavrule�objr\�argrQrrr�collect_requires�s

z&gen_requires.<locals>.collect_requiresN)Znodes)rr�r�rrrr�sr)rV�	itertoolsrhZselinux.audit2whyr>Zsetoolsr,rrrrrr	r
rWrerr<rYrrrrrr�<module>s,Q7B

Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]

Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
27 May 2026 4.58 AM
root / root
0755
__init__.cpython-39.opt-1.pyc
0.141 KB
5 Apr 2026 11.05 AM
root / root
0644
__init__.cpython-39.pyc
0.141 KB
5 Apr 2026 11.05 AM
root / root
0644
access.cpython-39.opt-1.pyc
11.095 KB
5 Apr 2026 11.05 AM
root / root
0644
access.cpython-39.pyc
11.095 KB
5 Apr 2026 11.05 AM
root / root
0644
audit.cpython-39.opt-1.pyc
16.855 KB
5 Apr 2026 11.05 AM
root / root
0644
audit.cpython-39.pyc
16.855 KB
5 Apr 2026 11.05 AM
root / root
0644
classperms.cpython-39.opt-1.pyc
2.413 KB
5 Apr 2026 11.05 AM
root / root
0644
classperms.cpython-39.pyc
2.413 KB
5 Apr 2026 11.05 AM
root / root
0644
defaults.cpython-39.opt-1.pyc
2.244 KB
5 Apr 2026 11.05 AM
root / root
0644
defaults.cpython-39.pyc
2.244 KB
5 Apr 2026 11.05 AM
root / root
0644
interfaces.cpython-39.opt-1.pyc
12.297 KB
5 Apr 2026 11.05 AM
root / root
0644
interfaces.cpython-39.pyc
12.297 KB
5 Apr 2026 11.05 AM
root / root
0644
lex.cpython-39.opt-1.pyc
20.876 KB
5 Apr 2026 11.05 AM
root / root
0644
lex.cpython-39.pyc
20.876 KB
5 Apr 2026 11.05 AM
root / root
0644
matching.cpython-39.opt-1.pyc
6.024 KB
5 Apr 2026 11.05 AM
root / root
0644
matching.cpython-39.pyc
6.024 KB
5 Apr 2026 11.05 AM
root / root
0644
module.cpython-39.opt-1.pyc
7.002 KB
5 Apr 2026 11.05 AM
root / root
0644
module.cpython-39.pyc
7.002 KB
5 Apr 2026 11.05 AM
root / root
0644
objectmodel.cpython-39.opt-1.pyc
3.878 KB
5 Apr 2026 11.05 AM
root / root
0644
objectmodel.cpython-39.pyc
3.878 KB
5 Apr 2026 11.05 AM
root / root
0644
output.cpython-39.opt-1.pyc
3.462 KB
5 Apr 2026 11.05 AM
root / root
0644
output.cpython-39.pyc
3.462 KB
5 Apr 2026 11.05 AM
root / root
0644
policygen.cpython-39.opt-1.pyc
12.585 KB
5 Apr 2026 11.05 AM
root / root
0644
policygen.cpython-39.pyc
12.617 KB
5 Apr 2026 11.05 AM
root / root
0644
refparser.cpython-39.opt-1.pyc
28.573 KB
5 Apr 2026 11.05 AM
root / root
0644
refparser.cpython-39.pyc
28.573 KB
5 Apr 2026 11.05 AM
root / root
0644
refpolicy.cpython-39.opt-1.pyc
39.231 KB
5 Apr 2026 11.05 AM
root / root
0644
refpolicy.cpython-39.pyc
39.231 KB
5 Apr 2026 11.05 AM
root / root
0644
sepolgeni18n.cpython-39.opt-1.pyc
0.385 KB
5 Apr 2026 11.05 AM
root / root
0644
sepolgeni18n.cpython-39.pyc
0.385 KB
5 Apr 2026 11.05 AM
root / root
0644
util.cpython-39.opt-1.pyc
6.215 KB
5 Apr 2026 11.05 AM
root / root
0644
util.cpython-39.pyc
6.215 KB
5 Apr 2026 11.05 AM
root / root
0644
yacc.cpython-39.opt-1.pyc
51.888 KB
5 Apr 2026 11.05 AM
root / root
0644
yacc.cpython-39.pyc
51.965 KB
5 Apr 2026 11.05 AM
root / root
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF