/usr/lib/python3.9/site-packages/sepolgen/__pycache__
Edit: /usr/lib/python3.9/site-packages/sepolgen/__pycache__/objectmodel.cpython-39.pyc (3971B)
a
BÒiw ã @ sb d Z g d¢ZdZdZdZeeB ZeeeedœZedededed iZG d
d„ dƒZG dd
„ d
ƒZ dS )z¬
This module provides knowledge object classes and permissions. It should
be used to keep this knowledge from leaking into the more generic parts of
the policy generation.
) ZsocketÚfdZprocessÚfileZlnk_fileZ fifo_fileZdbusZ
capabilityZunix_stream_socketé é é )ÚnÚrÚwÚbr r r r c @ s e Zd ZdZdd„ Zdd„ ZdS )ÚPermMapa A mapping between a permission and its information flow properties.
PermMap represents the information flow properties of a single permission
including the direction (read, write, etc.) and an abstract representation
of the bandwidth of the flow (weight).
c C s || _ || _|| _d S ©N)ÚpermÚdirÚweight)Úselfr r
r © r ú8/usr/lib/python3.9/site-packages/sepolgen/objectmodel.pyÚ__init__T s zPermMap.__init__c C s d| j t| j | jf S )Nz'
)r Ú
dir_to_strr
r ©r r r r Ú__repr__Y s þzPermMap.__repr__N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r r r r r r r
M s r
c @ s@ e Zd ZdZdd„ Zdd„ Zdd„ Zdd „ Zd
d„ Zdd
„ Z dS )ÚPermMappingszÛThe information flow properties of a set of object classes and permissions.
PermMappings maps one or more classes and permissions to their PermMap objects
describing their information flow characteristics.
c C s i | _ d| _t| _d S )Né )ÚclassesÚdefault_weightÚ FLOW_BOTHÚdefault_dirr r r r r d s zPermMappings.__init__c C sÊ d}|D ]¼}| ¡ }t|ƒdkst|ƒdks|d dkr:q|d dkrv|d }|| jv r`tdƒ‚i | j|<