+
    4Ssi!                         ^ RI t ^ RIt^ RIHtHt ^ RIHt ^ RIHt ^ RI	H
t
 R tR t ! R R	]]4      t ! R
 R]4      tR# )    N)
gp_pol_extgp_misc_applier)misc)
get_string)logc                 L   V P                   \        P                  8X  d<   \        V P                  4      P                  R R4      p\        P                  ! V4      # V P                   \        P                  8X  d!   V P                  R9   d   V P                  ^8H  # V P                  # )  )r      )	typer   REG_MULTI_SZr   datareplacejsonloads	REG_DWORD)er   s   & 9/usr/lib/python3/dist-packages/samba/gp/gp_firefox_ext.pyparse_entry_datar      sp    vv"""!&&!))&"5zz$	
4>>	!aff&6vv{66M    c                 `   / p/ pV EF"  pVP                   P                  V 4      '       g   K'  R VP                  9   d   K:  VP                   P                  V R4      P	                  R4      pV'       Ed   VP                  R4      pTpRpVR,          P                  4       '       d   RP                  VRR 4      pMTVP                  P                  4       '       d   VP                   pM'RP                  VP                   VP                  .4      p\        \        V4      4       EF  p	WY,          R8X  d   RWY&   \        p
V	\        V4      ^,
          8X  d<   VP                  P                  4       '       d   \        p
\        VP                  4      pV	\        V4      ^,
          8  dB   WY^,           ,          P                  4       '       d   \        p
\        WY^,           ,          4      p\        V4      \        8X  dB   WY,          V9  d#   V
\        8X  d   / WeV	,          &   M. WeV	,          &   WeV	,          ,          pEK  W9  d   / W8&   WsV,          P                  4       9  dJ   V
\        8X  d   VP                  / 4       MVP                  . 4       \        V4      ^,
          W8,          V&   WcV,          V,          ,          pEK  	  \        V4      \        8X  d   VP                  \!        V4      4       EK  \!        V4      WdP                  &   EK  \!        V4      W$P                  &   EK%  	  V# )z
**delvals.r
   \NPDFjsPSFjs)keyname
startswith	valuenamer   stripsplit	isnumericjoinrangelendictlistintr   keysappendr   )sectionentriesresult	index_mapr   sub_keyscurrentindexnameictypes   &&         r   convert_pol_to_jsonr4       s`   FIyy##G,,1;;&99$$Wb177=8~~d+HGE|%%''yy#2/&&((yyyy!))Q[[!9:3x=);')")HKHa'AKK,A,A,C,C E,Es8}Q&8aC=+B+B+D+D E1.E=D({'1 D=35GQK035GQK0%qk2G,*,	dO$8$8$:: D=#NN2.#NN2.14Wa	.%oe&<=G5 *6 G}$/23'7':$"21"5F;;a b Mr   c                      a a ] tR t^Vt oRt]P                  P                  ]R4      tR t	R t
R tV 3R ltR tR tR	 tRR
 ltR tRtVtV ;t# )gp_firefox_extz/etc/firefox/policiespolicies.jsonc                    R # )zMozilla/Firefox selfs   &r   __str__gp_firefox_ext.__str__Z   s     r   c                    \         P                  ! V P                  R R7       \        V P                  R4      ;_uu_ 4       p\
        P                  ! W4       \        P                  ! RV P                  4       RRR4       R#   + '       g   i     R# ; i  \         d&    \        P                  ! RT P                  4        R# i ; i)T)exist_okwzWrote Firefox preferencesNz#Failed to write Firefox preferences)
osmakedirsfirefox_installdiropendestfiler   dumpr   debugPermissionError)r;   policiesfs   && r   set_machine_policy!gp_firefox_ext.set_machine_policy]   s    	-KK//$?dmmS))Q		(&		5t}}E *)))  	-II;"mm-	-s0   A B 8B:B B	B B ,CCc                T   \         P                  P                  V P                  4      '       da   \	        V P                  R 4      ;_uu_ 4       p\
        P                  ! V4      p\        P                  ! RV P                  4       RRR4       V# R/ /pV#   + '       g   i     X# ; i)rzRead Firefox preferencesNrI   )	rA   pathexistsrE   rD   r   loadr   rG   )r;   rN   rI   s   &  r   get_machine_policy!gp_firefox_ext.get_machine_policyg   sy    77>>$--((dmmS))Q99Q<		4dmmD *
  #B'H *)
 s   8BB'	c                   < \         SV `  V4      pVP                  4        F  w  r4 \        P                  ! V4      W#&   K   	  V#   \        P
                  P                   d     KF  i ; iN)superparse_valueitemsr   r   decoderJSONDecodeError)r;   valuer   kv	__class__s   &&   r   rW   gp_firefox_ext.parse_valuep   s]    w"5)JJLDA**Q- !
  <<// s   AA('A(c                    R  pV P                  4       pW&R,          P                  4       9   dN   Ve'   VR,          V,          V8X  d   V! VR,          W$4       MV! VR,          W$4       V P                  V4       R# R# )c                     Vf   W R # W V&   R # rU   r9   )rI   policyvals   &&&r   set_val.gp_firefox_ext.unapply_policy.<locals>.set_valz   s    {$#& r   rI   N)rR   r(   rK   )r;   guidrb   applied_valrc   rd   r/   s   &&&&&  r   unapply_policygp_firefox_ext.unapply_policyy   su    	'
 ))+Z(--//&:&v.+=GJ/=
+V9##G, 0r   c                   V P                  V4      pVR 8X  dp   V P                  4       pVR,          P                  4        FC  pWdR,          R,          9   d   VR,          R,          V,          MRpV P                  WRV4       KE  	  M*T P                  YRV9   d
   VR,          MRVR,          4       V P	                  W4       R# )r7   rI   old_valNnew_val)rW   rR   r(   rh   cache_remove_attribute)r;   rf   rb   rc   cacher/   attrs   &&&&   r   unapplygp_firefox_ext.unapply   s      %_$--/G
+002#3J#?? I&z248EI ##Dc: 3
 4=4Fi 0D %i 02 	##D1r   c                   V P                  W4      pVe   V P                  WV4       V P                  4       pR pW%R,          P                  4       9   d   VR,          V,          pV P	                  \
        P                  ! V4      \
        P                  ! V4      R7      pW5R,          V&   V P                  V4       V P                  W\        V4      4       R # )NrI   )rk   rl   )
cache_get_attribute_valuerp   rR   r(   generate_valuer   dumpsrK   cache_add_attributer   )r;   rf   rb   rc   r   r/   before	new_values   &&&&    r   applygp_firefox_ext.apply   s    --d;LLt,))+Z(--//Z(0F ''

60B04

3 ( A	&)
F#(  z)/DEr   c                H   Ve,   W0n         \        P                  P                  VR4      V n        V FR  w  rE\        V 4      V9   g   K  V\        V 4      ,          P                  4        F  w  rgV P                  WFV4       K  	  KT  	  V EF  pVP                  '       g   K  Rp	Rp
\        P                  P                  VP                  V	4      pV P                  V4      pV'       g   Ka  V P                  VP                  R4      pVe   V P                  VP                  RV4       \        WP                  4      pVP                  4        F!  w  rgV P                  VP                  Wg4       K#  	  V P                  VP                  VP!                  4       R7       EK  	  R # )Nr7   MACHINE/Registry.pol!Software\Policies\Mozilla\Firefox)keep)rC   rA   rO   r"   rE   strrX   rp   file_sys_pathparsers   r1   r4   r+   ry   cleanr(   )r;   deleted_gpo_listchanged_gpo_list
policy_dirrf   settingsrb   rc   gpopol_filer*   rO   pol_confr   rI   s   &&&&           r   process_group_policy#gp_firefox_ext.process_group_policy   s;   !&0#GGLL_EDM.ND4yH$#+CI#6#<#<#>KFLLs3 $? /
 $C   1@ww||C$5$5x@::d+ 55chhP#LL?DA.w8H8HI#+>>#3KFJJsxx5 $4 

388(--/
:' $r   c                ~   / pR pRpVP                   '       d   \        P                  P                  VP                   V4      pV P	                  V4      pV'       g   V# VP
                   FO  pVP                  P                  V4      '       g   K&  VP                  W'P                  : RVP                  : 2&   KQ  	  V# )r|   r}   r   )
r   rA   rO   r"   r   r+   r   r   r   r   )r;   r   outputr   r*   rO   r   r   s   &&      r   rsopgp_firefox_ext.rsop   s    )877<< 1 18<Dzz$'H%%99''00BC&&Fyy!++>? & r   )rE   rC   rU   )__name__
__module____qualname____firstlineno__rC   rA   rO   r"   rE   r<   rK   rR   rW   rh   rp   ry   r   r   __static_attributes____classdictcell____classcell__)r^   __classdict__s   @@r   r6   r6   V   sS     0ww||.@H!-- 2F$;> r   r6   c                   b   a  ] tR t^t o Rt]P                  P                  ]R4      tR t	Rt
V tR# )gp_firefox_old_extz/usr/lib64/firefox/distributionr7   c                    R # )z'Mozilla/Firefox (old profile directory)r9   r:   s   &r   r<   gp_firefox_old_ext.__str__   s    8r   r9   N)r   r   r   r   rC   rA   rO   r"   rE   r<   r   r   )r   s   @r   r   r      s*     :ww||.@H9 9r   r   )rA   r   samba.gp.gpclassr   r   samba.dcerpcr   samba.commonr   samba.gp.util.loggingr   r   r4   r6   r   r9   r   r   <module>r      sA   " 
  8  # %4l~Z ~@9 9r   