+
    4Ssi                         ^ RI t ^ RIt^ RIt^ RIHtHtHt ^ RIHt ^ RI	H
t
Ht ^ RIHt R tR tR t ! R	 R
]]4      tR# )    N)
gp_xml_extcheck_safe_pathgp_file_applier)NamedTemporaryFile)copyfilemove)logc                    ^ pV P                  R4       EF3  pVP                  R4      pVR8X  dY   VP                  R4      e
   VR,          pVP                  R4      e
   V^,          pVP                  R4      e   V^@,          pKr  Kt  VR8X  dY   VP                  R4      e
   V^ ,          pVP                  R4      e
   V^,          pVP                  R4      e   V^,          pK  K  VR	8X  g   K  VP                  R4      e
   V^,          pVP                  R4      e
   V^,          pVP                  R4      f   EK*  V^,          pEK6  	  V# )
r   permissionstypeuserread   writeexecutegroupother)findallgetfind)entrymoder   ptypes   &   8/usr/lib/python3/dist-packages/samba/gp/vgp_files_ext.py	calc_moder      s:   D}}]3'F?'3(4	*6 7g'3(4	*6 7g'3(4	*6- 4. K    c                     R p\        ^RR4       FQ  p^R^R^R/pVP                  4        F2  pWV,          ,          '       d   WV,          ,          pK)  VR ,          pK4  	  KS  	  V# )-rwx)rangekeys)r   statimaskr!   s   &    r   stat_from_moder)   2   sb    D1b"S#sC-AAvQ	   Kr   c                     \         P                  P                  V 4      '       d(   R \         P                  ! V 4      P                  ,          # R# )   %dN)ospathexistsr&   st_ctime)fnames   &r   source_file_changer1   =   s3    	ww~~erwwu~.... r   c                   2   a  ] tR t^At o R tR tR tRtV tR# )vgp_files_extc                    R # )zVGP/Unix Settings/Files )selfs   &r   __str__vgp_files_ext.__str__B   s    (r   c                   V FR  w  r4\        V 4      V9   g   K  V\        V 4      ,          P                  4        F  w  rVV P                  W5V4       K  	  KT  	  V EF  pVP                  '       g   K  R p\        P
                  P                  VP                  V4      p	V P                  V	4      p
V
'       g   K_  V
P                  R4      pVP                  R4      pVP                  R4       EF  pV P                  P                  R4      pVP                  R4      P                  p\        P
                  P                  V\        P
                  P                  \        V	4      4      P                  4       VP                  4       4      p\        P
                  P!                  V4      '       g   \"        P$                  ! RV4       K  VP                  R4      P                  pVP                  R4      P                  pVP                  R	4      P                  p\'        V4      pTpV P)                  \+        V4      VVR
V,          4      pR pV P-                  VP.                  VVVVVVVV4	       EK  	  EK  	  R# )(MACHINE/VGP/VTLA/Unix/Files/manifest.xmlpolicysettingdatafile_properties	gpo_cachesourcezSource file does not existtargetr   r   r+   c           	         \        \        P                  P                  V4      R R7      ;_uu_ 4       p\	        WP
                  4       \        P                  ! VP
                  \        P                  ! V4      P                  \        P                  ! V4      P                  4       \        P                  ! VP
                  V4       \        VP
                  V4       RRR4       V.#   + '       g   i     T.# ; i)F)dirdeleteN)r   r,   r-   dirnamer   namechownpwdgetpwnampw_uidgrpgetgrnamgr_gidchmodr   )source_filer@   r   r   r   fs   &&&&& r   applier_func8vgp_files_ext.process_group_policy.<locals>.applier_funck   s    /BGGOOF4K7<> >AB$[&&9HHQVVS\\$-?-F-F%(\\%%8%?%?AHHQVVT2 0> !'x> > !'xs   B+C))C;	N)stritemsunapplyfile_sys_pathr,   r-   joinparser   r   lp
cache_pathtextrD   r   upperr.   r	   warnr   generate_value_hashr1   applyrE   )r6   deleted_gpo_listchanged_gpo_listguidsettings	attribute_gpoxmlr-   xml_confpolicyr<   r   
local_pathr?   rN   r@   r   r   r   
value_hashrP   s   &&&                    r   process_group_policy"vgp_files_ext.process_group_policyE   s   .ND4yH$$,SY$7$=$=$?LILL)< %@ /
 $C   @ww||C$5$5s;::d+!7{{6*!\\*;<E!%!3!3K!@J"ZZ166F"$'',,z(=>DDF(.#8K 77>>+66!={K "ZZ166F ::f-22D!JJw/44E$U+D !'I
 "&!9!9.{; %"7J( JJsxxJ*FD%GA = $r   c           
        / pR pVP                   '       Edb   \        P                  P                  VP                   V4      pV P	                  V4      pV'       g   V# VP                  R4      pVP                  R4      pVP                  R4       F  pVP                  R4      P                  p	VP                  R4      P                  p
VP                  R4      P                  pVP                  R4      P                  p\        V4      p\        V4      : RV: RV: RV
: R	V	: 2	p\        V 4      VP                  4       9  d   . V\        V 4      &   V\        V 4      ,          P                  V4       K  	  V# )
r:   r;   r<   r=   r?   r@   r   r   	z -> )rU   r,   r-   rV   rW   r   r   rZ   r   r)   rR   r%   append)r6   re   outputrf   r-   rg   rh   r<   r   r?   r@   r   r   r   ps   &&             r   rsopvgp_files_ext.rsopw   s(   877<< 1 137Dzz$'H]]?3F;;v&D&78H-22H-22zz&)..

7+00 '#D)4Ht9FKKM1(*F3t9%s4y!((+ 9 r   r5   N)	__name__
__module____qualname____firstlineno__r7   rk   rr   __static_attributes____classdictcell__)__classdict__s   @r   r3   r3   A   s     )0Gd r   r3   )r,   rG   rJ   samba.gp.gpclassr   r   r   tempfiler   shutilr   r   samba.gp.util.loggingr	   r   r)   r1   r3   r5   r   r   <module>r      s;   "   I I ' ! %6	/KJ Kr   