3 �^j@ � @ s� d dl Z d dlZd dlZd dlmZ d dlmZ d dlmZ d dl Z ddl mZ ddl mZ ddl mZ dd lmZ d ddd dgZdZdZG dd� d�Zdd� Zdd� Zdd� ZG dd� d�ZdS )� N)�OrderedDict)�ENOENT)�suppress� )� exception)� policyrep)�PermissionMapDescriptor)� TERuletype�r�w�b�n�u� c @ s� e Zd ZdZd%dd�Zdd� Zdd� Zd d � Zdd� Zd d� Z dd� Z dd� Zdd� Zdd� Z dd� Zdd� Zdd� Zdd� Zdd � Zd!d"� Zd#d$� ZdS )&� PermissionMapz-Permission Map for information flow analysis.Nc C sN t jt�| _t� | _d| _|r*| j|� n tj d�}dj |j�}| j|� dS )z\ Parameter: permmapfile The path to the permission map to load. NZsetoolsz{0}/setools/perm_map)�loggingZ getLogger�__name__�logr �permmap�permmapfile�load� pkg_resourcesZget_distribution�format�location)�selfr Zdistro�path� r �/usr/lib64/python3.6/permmap.py�__init__* s zPermissionMap.__init__c C s | j S )N)r )r r r r �__str__; s zPermissionMap.__str__c C s8 t jt �}| j|_tj| j�|_| j|_||t| �<