File: //lib64/python3.9/site-packages/borg/__pycache__/xattr.cpython-39.opt-1.pyc
a
HZ�hd � @ s d Z ddlZddlZddlZddlZddlZddlZddlmZ ddl
mZ ddlm
Z
e
� ZddlmZmZmZmZ dZej�d �r�ej�d
d�Ze�de�ZeD ]TZe�d
�r�edd�Zejddged�Ze e�d��� d �Zee d�kr�dZ q�q�ddd�Z ddd�Z!ddd�Z"dS )zPA basic extended attributes (xattr) implementation for Linux, FreeBSD and macOS.� N)�parse� )�prepare_subprocess_env)�
create_logger)� listxattr�getxattr�setxattr�ENOATTRFZlinux�
LD_PRELOAD� z[ :]ZlibfakerootT)�systemZfakerootz-v)�env�ascii���z1.20.2c C s� t j| dd���}|�� }d\}}zt|||� W n tyP Y W d � dS 0 zt|�}W n ty~ Y W d � dS 0 ||vr�W d � dS t||�|kW d � S 1 s�0 Y dS )z4Determine if xattr is enabled on the filesystem
zborg-tmp)�dir�prefix)s user.names valueNF)�tempfileZNamedTemporaryFile�filenor �OSErrorr r )�path�f�fd�name�value�names� r �0/usr/lib64/python3.9/site-packages/borg/xattr.py�
is_enabled) s r c C s� t | t�rt�| �} i }z�t| |d�}|D ]l}zt| ||d�p@d||<