
    Id                     4    d dl mZ d dlZd dlZd dlZd Zd Zy)    )xattrNc                     t         j                  dfD ]D  }	 t        j                  j	                  | |      }t        j                  j                  |||       F y# t        $ r Y Sw xY w)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      sn    ,,.GH 			**889BDI,,V-6-68	  		s   AA	A'&A'c                 D   t        j                  |       }t        j                  |       |D ]  }t         j                  j	                  | |      }t         j                  j	                  ||      }t         j                  j                  |      r,t        j                  |      }t        j                  ||       t         j                  j                  |      rt        ||       t        j                  ||        t        j                  | |       t        | |       y)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     JJsOEKK 
+'',,sD)'',,sD)77>>'"[[)FJJvw'WW]]7# '2 LL'*
+ OOCc3    )samba.dcerpcr   r   samba.xattr_nativer   r   r   r    r&   r   <module>r*      s   $  	  r&   