404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@18.191.189.101: ~ $
3

Kl�fv�	@spdZddddddddd	g	Zd
ZdZdZeeBZeeeed
�ZedededediZGdd�d�ZGdd�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�brrrr	c@s eZdZdZdd�Zdd�ZdS)�PermMapaA 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).
    cCs||_||_||_dS)N)�perm�dir�weight)�selfrrr
�r�!/usr/lib/python3.6/objectmodel.py�__init__TszPermMap.__init__cCsd|jt|j|jfS)Nz'<sepolgen.objectmodel.PermMap %s %s %d>)r�
dir_to_strrr
)rrrr�__repr__YszPermMap.__repr__N)�__name__�
__module__�__qualname__�__doc__rrrrrrr
Msr
c@s@eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�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 charecteristics.
    cCsi|_d|_t|_dS)N�)�classes�default_weight�	FLOW_BOTH�default_dir)rrrrrdszPermMappings.__init__cCs�d}x�|D]�}|j�}t|�dks
t|�dks
|ddkr<q
|ddkrx|d}||jkrbtd��i|j|<|j|}q
t|�dkr�td��|dkr�td	��t|dt|dt|d
��}|||j<q
WdS)zsRead the permission mappings from a file. This reads the format used
        by Apol in the setools suite.
        Nrr�#�classzduplicate class in perm map�z"error in object classs permissionszpermission outside of classr)�split�lenr�
ValueErrorr
�
str_to_dir�intr)rrZcur�lineZfields�c�pmrrr�	from_fileis"	
$

 zPermMappings.from_filecCs|j||S)z�Get the permission map for the object permission.

        Returns:
          PermMap representing the permission
        Raises:
          KeyError if the object or permission is not defined
        )r)r�objrrrr�get�szPermMappings.getcCs8y|j||}Wn tk
r2t||j|j�SX|S)aGet the permission map for the object permission or a default.

        getdefault is the same as get except that a default PermMap is
        returned if the object class or permission is not defined. The
        default is FLOW_BOTH with a weight of 5.
        )r�KeyErrorr
rr)rr*rr(rrr�
getdefault�s
zPermMappings.getdefaultcCs,t}x"|D]}|j||�}||jB}q
W|S)N)�	FLOW_NONEr-r)rr*�permsrrr(rrr�getdefault_direction�s

z!PermMappings.getdefault_directioncCs,d}x"|D]}|j||�}||j7}q
W|S)Nr)r-r
)rr*r/Ztotalrr(rrr�getdefault_distance�s

z PermMappings.getdefault_distanceN)
rrrrrr)r+r-r0r1rrrrr^s

rN)
rZimplicitly_typed_objectsr.Z	FLOW_READZ
FLOW_WRITErr$rr
rrrrr�<module>s


Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 113 B 0644
__init__.cpython-36.pyc File 113 B 0644
access.cpython-36.opt-1.pyc File 11.02 KB 0644
access.cpython-36.pyc File 11.02 KB 0644
audit.cpython-36.opt-1.pyc File 17.29 KB 0644
audit.cpython-36.pyc File 17.29 KB 0644
classperms.cpython-36.opt-1.pyc File 2.43 KB 0644
classperms.cpython-36.pyc File 2.43 KB 0644
defaults.cpython-36.opt-1.pyc File 2.19 KB 0644
defaults.cpython-36.pyc File 2.19 KB 0644
interfaces.cpython-36.opt-1.pyc File 12.25 KB 0644
interfaces.cpython-36.pyc File 12.25 KB 0644
lex.cpython-36.opt-1.pyc File 20.92 KB 0644
lex.cpython-36.pyc File 20.92 KB 0644
matching.cpython-36.opt-1.pyc File 5.95 KB 0644
matching.cpython-36.pyc File 5.95 KB 0644
module.cpython-36.opt-1.pyc File 6.95 KB 0644
module.cpython-36.pyc File 6.95 KB 0644
objectmodel.cpython-36.opt-1.pyc File 3.83 KB 0644
objectmodel.cpython-36.pyc File 3.83 KB 0644
output.cpython-36.opt-1.pyc File 3.42 KB 0644
output.cpython-36.pyc File 3.42 KB 0644
policygen.cpython-36.opt-1.pyc File 12.52 KB 0644
policygen.cpython-36.pyc File 12.57 KB 0644
refparser.cpython-36.opt-1.pyc File 28.38 KB 0644
refparser.cpython-36.pyc File 28.38 KB 0644
refpolicy.cpython-36.opt-1.pyc File 39.9 KB 0644
refpolicy.cpython-36.pyc File 39.9 KB 0644
sepolgeni18n.cpython-36.opt-1.pyc File 304 B 0644
sepolgeni18n.cpython-36.pyc File 304 B 0644
util.cpython-36.opt-1.pyc File 6.22 KB 0644
util.cpython-36.pyc File 6.22 KB 0644
yacc.cpython-36.opt-1.pyc File 52.77 KB 0644
yacc.cpython-36.pyc File 52.86 KB 0644