
    b                     6    d dl mZ d dlZd dlZd dlZd Zd ZdS )    )xattrNc                     t           j        dfD ]T}	 t          j                            | |          }t          j                            |||           E# t          $ r Y Qw xY wdS )z8Copy ACL related attributes from a path to another path.zsystem.posix_acl_accessN)r   XATTR_NTACL_NAMEsambaxattr_nativewrap_getxattrwrap_setxattr	Exception)frompathtopath	attr_name	attributes       -/usr/lib/python3/dist-packages/samba/xattr.py	copyattrsr      s    ,.GH 	 			*889BD DI,,V-6-68 8 8 8  	 	 	D		 	s   AA
A! A!c                 F   t          j        |           }t          j        |           |D ]}t           j                            | |          }t           j                            ||          }t           j                            |          r*t          j        |          }t          j        ||           t           j                            |          rt          ||           t          j        ||           t          j        | |           t          | |           dS )zRecursively copy a directory tree using shutil.copy2(), preserving xattrs.

    The destination directory must not already exist.
    If exception(s) occur, an Error is raised with a list of reasons.
    N)oslistdirmakedirspathjoinislinkreadlinksymlinkisdircopytree_with_xattrsshutilcopy2copystatr   )srcdstnamesnamesrcnamedstnamelinktos          r   r   r   '   s     JsOOEK 
+ 
+',,sD))',,sD))7>>'"" 	+[))FJvw''''W]]7## 	+ '2222 L'****
OCc3    )samba.dcerpcr   r   samba.xattr_nativer   r   r   r    r&   r   <module>r*      s_   $       				           r&   