← Back
Editing: filesystem_associate.cpython-312.pyc
� �Z`� � �x � d dl Z e j dd�� Zej Zd dl� d dlmZ G d� de� Zy) � Nzsetroubleshoot-pluginsT)�fallback)�*)�Pluginc �x � e Zd Z ed� Z ed� Z ed� Z ed� Z ed� Z ed� Z d� Z d� Zy ) �pluginzq SELinux is preventing $SOURCE_PATH from creating a file with a context of $SOURCE_TYPE on a filesystem. a SELinux is preventing $SOURCE from creating a file with a context of $SOURCE_TYPE on a filesystem. Usually this happens when you ask the cp command to maintain the context of a file when copying between file systems, "cp -a" for example. Not all file contexts should be maintained between the file systems. For example, a read-only file type like iso9660_t should not be placed on a r/w system. "cp -p" might be a better solution, as this will adopt the default file context for the destination. zX Use a command like "cp -p" to preserve all permissions except SELinux context. zTIf you believe $SOURCE_BASE_PATH should be allowed to create $TARGET_BASE_PATH fileszsyou need to use a different command. You are not allowed to preserve the SELinux context on the target file system.zNuse a command like "cp -p" to preserve all permissions except SELinux context.c �Z � t j | t � | j d� y )N�d )r �__init__�__name__�set_priority)�selfs �9/usr/share/setroubleshoot/plugins/filesystem_associate.pyr zplugin.__init__0 s � �����h�'����#�� c �� � |j dg� rP|j dg� r>|j j t v r"|j dg� r| j � S y )Nz.*fs_t� associate� filesystem)�matches_target_types�all_accesses_are_in�tcontext�type� file_types� has_tclass_in�report)r �avcs r �analyzezplugin.analyze4 sS � ��$�$�h�Z�0��#�#�[�M�2��L�L����+����|�n�-��;�;�=� �r N)r � __module__�__qualname__�_�summary�problem_description�fix_description�if_text� then_text�do_textr r � r r r r sg � � � � �G� � � �� � � �O� �f�g�G�� H� I�I��`�a�G��r r )�gettext�translationr �setroubleshoot.util�setroubleshoot.Pluginr r r% r r �<module>r* s<