| Server IP : 162.144.4.212 / Your IP : 216.73.216.108 Web Server : Apache System : Linux gator2125.hostgator.com 5.14.0-162.23.1.9991722448259.nf.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 31 18:11:45 UTC 2024 x86_64 User : cozeellc ( 2980) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3.9/site-packages/sepolgen/__pycache__/ |
Upload File : |
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'<sepolgen.objectmodel.PermMap %s %s %d>)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|<