✘✘ 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__//interfaces.cpython-39.opt-1.pyc
a

B�iP@�@s�dZddlZddlZddlmZddlmZddlmZddlmZddlm	Z	Gd	d
�d
�Z
dd�Zd
d�Zdd�Z
dd�Zdd�ZGdd�d�ZGdd�d�ZGdd�d�ZGdd�d�ZdS)z7
Classes for representing and manipulating interfaces.
�N�)�access)�	refpolicy)�objectmodel)�matching)�_c@sHeZdZdZdd�Zdd�Zdd�Zeee�Zedd	�d
�Z	dd�Z
d
S)�Paramz;
    Object representing a parameter for an interface.
    cCs"d|_tj|_t��|_d|_dS)N�T)�_Param__namer�SRC_TYPE�type�IdSet�obj_classes�required��self�r�7/usr/lib/python3.9/site-packages/sepolgen/interfaces.py�__init__&s
zParam.__init__cCs t�|�std|��||_dS)NzName [%s] is not a param)r�
is_idparam�
ValueErrorr
)r�namerrr�set_name,s
zParam.set_namecCs|jS�N)r
rrrr�get_name1szParam.get_namecCst|jdd��S�Nr)�intrrrrr�<lambda>6�zParam.<lambda>)�fgetcCs d|jtj|jd�|j�fS)Nz0<sepolgen.policygen.Param instance [%s, %s, %s]>� )rr�field_to_strr�joinrrrrr�__repr__8s�zParam.__repr__N)�__name__�
__module__�__qualname__�__doc__rrr�propertyr�numr#rrrrr"s
rcCs�d}||vr�||}||jkr"dS|tjks6|tjkr�|jtjksN|jtjkr�d}|r`|jg}ng}t�|j|�D]}|tj	vrrd}q�qrtj|_q�d}nt
�}||_||_|||j<|r�|j�|j�|S�Nrr)
rrr�TGT_TYPE�	obj_class�	itertools�chainrrZimplicitly_typed_objectsrr�add)rr�av�params�ret�pZavobjs�objrrr�__param_insert>s6

�
�



r5cCs~d}d}t�|j�r.t|jtj||�dkr.d}t�|j�rTt|jtj||�dkrTd}t�|j�rzt|jtj	||�dkrzd}|S)ajExtract the parameters from an access vector.

    Extract the parameters (in the form $N) from an access
    vector, storing them as Param objects in a dictionary.
    Some attempt is made at resolving conflicts with other
    entries in the dict, but if an unresolvable conflict is
    found it is reported to the caller.

    The goal here is to figure out how interface parameters are
    actually used in the interface - e.g., that $1 is a domain used as
    a SRC_TYPE. In general an interface will look like this:

    interface(`foo', `
       allow $1 foo : file read;
    ')

    This is simple to figure out - $1 is a SRC_TYPE. A few interfaces
    are more complex, for example:

    interface(`foo_trans',`
       domain_auto_trans($1,fingerd_exec_t,fingerd_t)

       allow $1 fingerd_t:fd use;
       allow fingerd_t $1:fd use;
       allow fingerd_t $1:fifo_file rw_file_perms;
       allow fingerd_t $1:process sigchld;
    ')

    Here the usage seems ambiguous, but it is not. $1 is still domain
    and therefore should be returned as a SRC_TYPE.

    Returns:
      0  - success
      1  - conflict found
    rFr)
rr�src_typer5rr�tgt_typer+r,�	OBJ_CLASS)r0r1r2Z	found_srcrrr�av_extract_paramsjs$r9cCs"t�|j�rt|jtjd|�SdSr)rr�roler5rZROLE)r:r1rrr�role_extract_params�sr;csl�fdd�}d}||jtj�r"d}||jtj�r4d}||jtj�rFd}t�|j	�rht
|j	tjd��rhd}|S)Ncs.d}|D] }t�|�rt||d��rd}q|Sr*)rrr5)�setrr2�x�r1rr�extract_from_set�s
z2type_rule_extract_params.<locals>.extract_from_setrr)�	src_typesrr�	tgt_typesr+rr8rrZ	dest_typer5Z	DEST_TYPE)�ruler1r?r2rr>r�type_rule_extract_params�srCcCs2d}|jD]"}t�|�r
t|tjd|�r
d}q
|Sr*)�argsrrr5rr)�ifcallr1r2�argrrr�ifcall_extract_params�s

rGc@seZdZdd�Zdd�ZdS)�AttributeVectorcCsd|_t��|_dS)Nr	)rr�AccessVectorSetrrrrr�szAttributeVector.__init__cCs|j�|�dSr)r�add_av�rr0rrrrJ�szAttributeVector.add_avN)r$r%r&rrJrrrrrH�srHc@s$eZdZdd�Zdd�Zdd�ZdS)�AttributeSetcCs
i|_dSr)�
attributesrrrrr�szAttributeSet.__init__cCs||j|j<dSr)rMr)r�attrrrr�add_attr�szAttributeSet.add_attrcCszdd�}d}|D]V}|dd�}|ddkrD|r:|�|�||�}q|r|�d�}t�|�}|�|�q|rv|�|�dS)NcSsH|dd���}t|�dks(|ddkr4td|��t�}|d|_|S)Nr����rZ	Attributez#Syntax error Attribute statement %s)�split�len�SyntaxErrorrHr)�line�fields�arrr�
parse_attr�s
z*AttributeSet.from_file.<locals>.parse_attrrPr�[�,)rOrRr�AccessVectorrJ)r�fdrXrWrU�lr0rrr�	from_file�s	



zAttributeSet.from_fileN)r$r%r&rrOr^rrrrrL�srLc@sFeZdZdifdd�Zifdd�Zdd�Zdd	�Zd
d�Zdd
�ZdS)�InterfaceVectorNcCs6d|_d|_t��|_i|_|r,|�||�d|_dS)NTr	F)�enabledrrrIr1�from_interface�expanded)r�	interfacerMrrrr�s
zInterfaceVector.__init__c
Cs"|j|_|��D]>}|jtjjkr$qd|jvr0qt�|�}|D]}|�|�q>q|r�|�	�D]n}|j
D]b}||j
vrvqf|j
|}|jD]@}	t�|	�}|j|jkr�|j
|_|j|jkr�|j
|_|�|�q�qfq\|��D]}
t|
|j�r�q�|��D]}t||j�r�q�|��D]}t||j��r�qdS)NZ	dontaudit)rZavrulesZ	rule_typerZAVRuleZALLOWrZavrule_to_access_vectorsrJZtypeattributesrM�copyr6rr7Zrolesr;r1Z	typerulesrC�interface_callsrG)
rrcrMZavruleZavsr0Z
typeattributerNZattr_vecrWr:rBrErrrra�s>






zInterfaceVector.from_interfacecCs t||j�dkr|j�|�dSr)r9r1rrJrKrrrrJ3szInterfaceVector.add_avcCs8g}|�d|j�|jD]}|�t|��qd�|�S)Nz[InterfaceVector %s]�
)�appendrr�strr")r�sr0rrr�	to_string9s

zInterfaceVector.to_stringcCs|��Sr)r#rrrr�__str__@szInterfaceVector.__str__cCsd|j|jfS)Nz<InterfaceVector %s:%s>)rr`rrrrr#CszInterfaceVector.__repr__)	r$r%r&rrarJrjrkr#rrrrr_�s4r_c@sxeZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zifdd�Z	difdd�Z
dd�Zdd�Zdd�Z
dd�ZdS)�InterfaceSetNcCsi|_i|_g|_||_dSr)�
interfaces�tgt_type_map�tgt_type_all�output)rrprrrrHszInterfaceSet.__init__cCs|jr|j�|d�dS)Nrf)rp�write)rrhrrr�oNszInterfaceSet.ocCs�t|j��dd�d�D]�}|�d|j�t|j��dd�d�D] }|�d|jtj|jf�q@|�d�t|j	�
��}|D]}|�d�|��|�d	�q~qdS)
NcSs|jSr�r�r=rrrrSrz&InterfaceSet.to_file.<locals>.<lambda>)�keyz[InterfaceVector %s cSs|jSrrsrtrrrrUrz%s:%s z]
rZrf)�sortedrm�valuesrqrr1rr!rrZto_listr")rr\Ziv�paramZavlr0rrr�to_fileRs
zInterfaceSet.to_filecCs�dd�}d}|D]V}|dd�}|ddkrD|r:|�|�||�}q|r|�d�}t�|�}|�|�q|rv|�|�|��dS)NcSs�|dd���}t|�dks(|ddkr4td|��t�}|d|_t|�dkrTdS|dd�D]R}|�d�}t|�dkr�td|��t�}|d|_tj|d|_||j	|j<q`|S)	NrrPrQrr_z)Syntax error InterfaceVector statement %s�:z-Invalid param in InterfaceVector statement %s)
rRrSrTr_rrrZstr_to_fieldrr1)rUrV�ifvZfieldr3rxrrr�	parse_ifv^s 


z)InterfaceSet.from_file.<locals>.parse_ifvrPrrYrZ)�add_ifvrRrr[rJ�index)rr\r|r{rUr]r0rrrr^]s




zInterfaceSet.from_filecCs||j|j<dSr)rmr)rr{rrrr}�szInterfaceSet.add_ifvcCsv|j��D]f}t�}|jD]2}t�|j�r@|j�|�t�}qN|�|j�q|D]}|j	�
|g�}|�|�qRq
dSr)rmrwr<rrr7rorgr/rn�
setdefault)rr{rAr0rr]rrrr~�s
zInterfaceSet.indexcCst||�}|�|�dSr)r_r})rrcrMr{rrrr/�s
zInterfaceSet.addcCs<t�|��|���D]}|�||�q|�|�|��dSr)r-r.rm�	templatesr/�expand_ifcallsr~)r�headersrprM�irrr�add_headers�s
zInterfaceSet.add_headerscCsZt�|�rPt|dd��}|t|j�kr,dS|j|d}t|t�rH|S|gSn|gSdSr)rrrrSrD�
isinstance�list)r�idrEr)rFrrr�	map_param�s

zInterfaceSet.map_paramc
	Cs�|�|j|�}|durdS|�|j|�}|dur4dS|�|j|�}|durNdSt��}|jD]&}|�||�}	|	durxq\q\|�|	�q\t|�dkr�dS|D]*}
|D] }|D]}|j	�
|
|||�q�q�q�dS)Nr)r�r6r7r,rr
Zperms�updaterSrr/)
rr{r0rEr@rArZ	new_permsZpermr3r6r7r,rrr�
map_add_av�s*
zInterfaceSet.map_add_avc	Cs�|dfg}|j|j}d|_t|�dkr�|�d�\}}|j|j}||krl|jD]}|�|||�qP|jrlq|��D]l}	|	j|jkr�|�	t
d��dSz||	j}
Wn*ty�|�	t
d|	j��YqtYn0|�|
|	f�qtqdS)NTrrPzFound circular interface classz#Missing interface definition for %s)
rmrrbrS�poprr�reZifnamerrr�KeyErrorrg)rrc�
if_by_name�stackr{ZcurZ
cur_ifcallZcur_ifvr0rEZnewifrrr�do_expand_ifcalls�s*


zInterfaceSet.do_expand_ifcallscCsRi}t�|��|���D]}|||j<qt�|��|���D]}|�||�q<dSr)r-r.rmr�rr�)rr�r�r�rcrrrr��s
zInterfaceSet.expand_ifcalls)N)r$r%r&rrrryr^r}r~r/r�r�r�r�r�rrrrrlGs
#$rl)r'rdr-r	rrrrZsepolgeni18nrrr5r9r;rCrGrHrLr_rlrrrr�<module>s",4Z

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