3 �^U � @ sH d dl mZ ddlmZ ddlmZ eddddg�ZG d d � d e�ZdS )� )� namedtuple� )�DiffResultDescriptor)� DifferenceZmodified_property�propertyZaddedZremovedc @ s( e Zd ZdZed�Zdd� Zdd� ZdS )�PropertiesDifferencezr Determine the difference in policy properties (unknown permissions, MLS, etc.) between two policies. �diff_propertiesc C s� g | _ | jj| jjkr2| j jtd| jj| jj�� | jj| jjkr^| j jtd| jj| jj�� | jj| jjkr�| j jtd| jj| jj�� d S )N�handle_unknownZMLS�version)�modified_propertiesZleft_policyr Zright_policy�append�modified_properties_recordZmlsr )�self� r �"/usr/lib64/python3.6/properties.pyr % s z$PropertiesDifference.diff_propertiesc C s | j jd� d| _dS )z%Reset diff results on policy changes.zResetting property differencesN)�log�debugr )r r r r �_reset_diff= s z PropertiesDifference._reset_diffN)�__name__� __module__�__qualname__�__doc__r r r r r r r r r s r N)�collectionsr Zdescriptorsr � differencer r r r r r r �<module> s