File: //lib64/python2.7/site-packages/sepolgen/objectmodel.pyo
^c @ s d Z d d d d d d d d d g Z d
Z d Z d Z e e BZ i e d
6e d 6e d 6e d 6Z i d
e 6d e 6d e 6d e 6Z d d d YZ d d d YZ d S( s
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.
t sockett fdt processt filet lnk_filet fifo_filet dbust
capabilityt unix_stream_socketi i i t nt rt wt bt PermMapc B s e Z d Z d Z d Z RS( s 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( t permt dirt weight( t selfR R R ( ( s: /usr/lib64/python2.7/site-packages/sepolgen/objectmodel.pyt __init__T s c C s d | j t | j | j f S( Ns' <sepolgen.objectmodel.PermMap %s %s %d>( R t
dir_to_strR R ( R ( ( s: /usr/lib64/python2.7/site-packages/sepolgen/objectmodel.pyt __repr__Y s
( t __name__t
__module__t __doc__R R ( ( ( s: /usr/lib64/python2.7/site-packages/sepolgen/objectmodel.pyR
M s t PermMappingsc B sD e Z d Z d Z d Z d Z d Z d Z d Z RS( s 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.
c C s i | _ d | _ t | _ d S( Ni ( t classest default_weightt FLOW_BOTHt default_dir( R ( ( s: /usr/lib64/python2.7/site-packages/sepolgen/objectmodel.pyR d s c C s' d
} x| D]} | j } t | d k s
t | d k s
| d d k rY q
n | d d k r | d } | | j k r t d n i | j | <| j | } q
t | d k r t d n | d
k r t d n t | d t | d t | d } | | | j <q
Wd
S( ss Read the permission mappings from a file. This reads the format used
by Apol in the setools suite.
i i t #t classs duplicate class in perm mapi s"