
    g                     4    S SK Jr  S SKrS SKrS SKrS rS rg)    )xattrNc                     [         R                  S4 HE  n [        R                  R	                  U U5      n[        R                  R                  UUU5        MG     g! [         a     MW  f = f)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      sj    ,,.GH		**889BDI,,V-6-68 I  		s   AA
A+*A+c                 ^   [         R                  " U 5      n[         R                  " U5        U H  n[         R                  R	                  X5      n[         R                  R	                  X5      n[         R                  R                  U5      (       a.  [         R                  " U5      n[         R                  " Xe5        M  [         R                  R                  U5      (       a  [        XE5        M  [        R                  " XE5        M     [        R                  " X5        [        X5        g)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'',,s)'',,s)77>>'""[[)FJJv'WW]]7## 2 LL*  OOCc    )samba.dcerpcr   r   samba.xattr_nativer   r   r   r    r&   r   <module>r*      s   $  	  r&   