+
    i٬  c                   s    ^ RI t ^ RIt ^ RIHt ^ RIHtHtHt ^ RIH	t	 ^ RI
Ht ^ RIHt ^ RIHt ^ RIHt ^ R	IHt ^ R
IHtHtHtHtHt ^ RIHt ^ RIHt ^ RIHtHtH t H!t!  ! R R]4      t"R# )    N)config)dbus_to_python%dbus_introspection_prepare_properties!dbus_introspection_add_properties)Zone)ifcfg_set_zone_of_interface)DEFAULT_ZONE_TARGET)	Rich_Rule)log)DbusServiceObject)handle_exceptionsdbus_handle_exceptionsdbus_service_methoddbus_service_signaldbus_polkit_require_auth)errors)FirewallError)portStrportInPortRangecoalescePortRangebreakPortRangec                   s  a a ] tR t^.t oRtRt ]P                  P                  t	 ]
V 3R l4       t]R 4       t]R 4       t]R 4       t]! ]P"                  RRR	7      ]RgR
 l4       4       t]! ]P"                  RRR	7      ]RgR l4       4       t]! ]P                  P                  4      ]! ]P"                  RR7      ]RgR l4       4       4       t]! ]P"                  RR7      R 4       t]! ]P                  P0                  4      ]! ]P2                  RR7      ]RgV 3R ll4       4       4       t]! ]P                  P6                  RR7      ]RgR l4       4       t]! ]P                  P6                  RR7      ]RgR l4       4       tR t]! ]P                  P6                  RR7      ]RgR l4       4       t]! ]P                  P6                  RR7      ]RgR l4       4       t ]! ]P                  P6                  4      ]RgR l4       4       t!]! ]P                  P6                  RR7      ]R 4       4       t"]! ]P                  P6                  4      ]RgR l4       4       t#]! ]P                  P6                  RR7      ]R 4       4       t$]! ]P                  P6                  RR7      ]RgR  l4       4       t%]! ]P                  P6                  RR7      ]R! 4       4       t&]! ]P                  P6                  RR7      ]RgR" l4       4       t']! ]P                  P6                  RR7      ]RgR# l4       4       t(]! ]P                  P6                  RR7      ]RgR$ l4       4       t)]! ]P                  P6                  RR7      ]RgR% l4       4       t*]! ]P                  P6                  RR7      ]RgR& l4       4       t+]! ]P                  P6                  RR7      ]RgR' l4       4       t,]! ]P                  P6                  RR7      ]RgR( l4       4       t-]! ]P                  P6                  RR7      ]RgR) l4       4       t.]! ]P                  P6                  R*R7      ]RgR+ l4       4       t/]! ]P                  P6                  R*R7      ]RgR, l4       4       t0]! ]P                  P6                  RR7      ]RgR- l4       4       t1]! ]P                  P6                  RR7      ]RgR. l4       4       t2]! ]P                  P6                  RR/R	7      ]RgR0 l4       4       t3]! ]P                  P6                  R1R7      ]RgR2 l4       4       t4]! ]P                  P6                  R1R7      ]RgR3 l4       4       t5]! ]P                  P6                  RR7      ]RgR4 l4       4       t6]! ]P                  P6                  RR7      ]RgR5 l4       4       t7]! ]P                  P6                  RR/R	7      ]RgR6 l4       4       t8]! ]P                  P6                  R*R7      ]RgR7 l4       4       t9]! ]P                  P6                  R*R7      ]RgR8 l4       4       t:]! ]P                  P6                  RR7      ]RgR9 l4       4       t;]! ]P                  P6                  RR7      ]RgR: l4       4       t<]! ]P                  P6                  RR/R	7      ]RgR; l4       4       t=]! ]P                  P6                  R1R7      ]RgR< l4       4       t>]! ]P                  P6                  R1R7      ]RgR= l4       4       t?]! ]P                  P6                  RR7      ]RgR> l4       4       t@]! ]P                  P6                  RR7      ]RgR? l4       4       tA]! ]P                  P6                  RR/R	7      ]RgR@ l4       4       tB]! ]P                  P6                  R*R7      ]RgRA l4       4       tC]! ]P                  P6                  R*R7      ]RgRB l4       4       tD]! ]P                  P6                  RR7      ]RgRC l4       4       tE]! ]P                  P6                  RR7      ]RgRD l4       4       tF]! ]P                  P6                  RR/R	7      ]RgRE l4       4       tG]! ]P                  P6                  R/R7      ]RgRF l4       4       tH]! ]P                  P6                  R/R7      ]RgRG l4       4       tI]! ]P                  P6                  4      ]RgRH l4       4       tJ]! ]P                  P6                  4      ]RgRI l4       4       tK]! ]P                  P6                  R/R7      ]RgRJ l4       4       tL]! ]P                  P6                  R/R7      ]RgRK l4       4       tM]! ]P                  P6                  R/R7      ]RgRL l4       4       tN]! ]P                  P6                  4      ]RgRM l4       4       tO]! ]P                  P6                  4      ]RgRN l4       4       tP]! ]P                  P6                  R/R7      ]RgRO l4       4       tQ]! ]P                  P6                  RPR7      ]RgRQ l4       4       tR]! ]P                  P6                  RPR7      ]RgRR l4       4       tS]! ]P                  P6                  RSR7      ]RgRT l4       4       tT]! ]P                  P6                  RSR7      ]RgRU l4       4       tU]! ]P                  P6                  RSR/R	7      ]RgRV l4       4       tV]! ]P                  P6                  R*R7      ]RgRW l4       4       tW]! ]P                  P6                  R*R7      ]RgRX l4       4       tX]! ]P                  P6                  RR7      ]RgRY l4       4       tY]! ]P                  P6                  RR7      ]RgRZ l4       4       tZ]! ]P                  P6                  RR/R	7      ]RgR[ l4       4       t[]! ]P                  P6                  R*R7      ]RgR\ l4       4       t\]! ]P                  P6                  R*R7      ]RgR] l4       4       t]]! ]P                  P6                  RR7      ]RgR^ l4       4       t^]! ]P                  P6                  RR7      ]RgR_ l4       4       t_]! ]P                  P6                  RR/R	7      ]RgR` l4       4       t`]! ]P                  P6                  R*R7      ]RgRa l4       4       ta]! ]P                  P6                  R*R7      ]RgRb l4       4       tb]! ]P                  P6                  RR7      ]RgRc l4       4       tc]! ]P                  P6                  RR7      ]RgRd l4       4       td]! ]P                  P6                  RR/R	7      ]RgRe l4       4       teRftfVtgV ;th# )hFirewallDConfigZonezFirewallD main classTc                s  < \         \        V `
  ! V/ VB  Wn        W n        W0n        W@n        V^ ,          V n        V^,          V n        RV P                  ,          V n	        \        V \        P                  P                  4       R# )r    zconfig.zone.%dN)superr   __init__parentr   objitem_idbusnamepath_log_prefixr   dbusDBUS_INTERFACE_CONFIG_ZONE)selfr   ZconfZzoner   ZargsZkwargs	__class__s   &&&&&*,@/usr/lib/python3.14/site-packages/firewall/server/config_zone.pyr   ZFirewallDConfigZone.__init__6   sj    !414B6BAwG	+dll:-&++88	
    c                s    R # N r!      &r#   __del__ZFirewallDConfigZone.__del__D   s    r$   c                s&    V P                  4        R # r%   )Zremove_from_connectionr'   r(   r#   
unregisterZFirewallDConfigZone.unregisterH   s    ##%r$   c                s8   VR 8X  d+   \         P                  ! V P                  P                  4      # VR8X  d+   \         P                  ! V P                  P                  4      # VR8X  d+   \         P                  ! V P                  P
                  4      # VR8X  d+   \         P                  ! V P                  P                  4      # VR8X  d+   \         P                  ! V P                  P                  4      # \         P                  P                  RV,          4      h)namefilenamer   defaultbuiltinzDorg.freedesktop.DBus.Error.InvalidArgs: Property '%s' does not exist)r   ZStringr   r+   r,   r   ZBooleanr-   r.   
exceptionsDBusException)r!   property_name   &&r#   _get_propertyZ!FirewallDConfigZone._get_propertyP   s    F";;txx}}--j(;;txx0011f$;;txx}}--i'<< 0 011i'<< 0 011/////1>? r$   ZssZv)in_signatureout_signaturec                s2   \        V\        4      p\        V\        4      p\        P                  ! R V P                  W4       V\
        P                  P                  8w  d'   \        P                  P                  RV,          4      hV P                  V4      # )z%s.Get('%s', '%s')Jorg.freedesktop.DBus.Error.UnknownInterface: Interface '%s' does not exist)r   strr	   debug1r   r   r   r    r/   r0   r3   )r!   interface_namer1   sender   &&&&r#   GetZFirewallDConfigZone.Getb   s     (<&}c:

 $"2"2N	
 V[[CCC////02@A 
 !!-00r$   Zsza{sv}c                s\   \        V\        4      p\        P                  ! R V P                  V4       V\
        P                  P                  8w  d'   \        P                  P                  RV,          4      h/ pR F  pV P                  V4      W4&   K  	  \        P                  ! VRR7      # )z%s.GetAll('%s')r6   ZsvZ	signature)r+   r,   r   r-   r.   )r   r7   r	   r8   r   r   r   r    r/   r0   r3   Z
Dictionary)r!   r9   r:   Zretx   &&&  r#   GetAllZFirewallDConfigZone.GetAllt   s     (<

$d&6&6GV[[CCC////02@A 
 CA''*CF Dsd33r$   Zssv)r4   c                s   \        V\        4      p\        V\        4      p\        V4      p\        P                  ! R V P                  VVV4       V P
                  P                  V4       V\        P                  P                  8w  d'   \        P                  P                  RV,          4      h\        P                  P                  RV,          4      h)z%s.Set('%s', '%s', '%s')r6   zGorg.freedesktop.DBus.Error.PropertyReadOnly: Property '%s' is read-only)r   r7   r	   r8   r   r   accessCheckr   r   r    r/   r0   )r!   r9   r1   Z	new_valuer:   s   &&&&&r#   SetZFirewallDConfigZone.Set   s     (<&}c:"9-	

&	
 	'V[[CCC////02@A 
 oo++)+89
 	
r$   zsa{sv}asr=   c                s    \        V\        4      p\        V4      p\        V4      p\        P                  ! R V P                  VVV4       R# )z&%s.PropertiesChanged('%s', '%s', '%s')N)r   r7   r	   r8   r   )r!   r9   Zchanged_propertiesZinvalidated_propertiesr;   r#   PropertiesChangedZ%FirewallDConfigZone.PropertiesChanged   sI     (<+,>?!/0F!G

4"	
r$   )r5   c                s   < \         P                  ! R V P                  4       \        \        V `  V P                  V P                  P                  4       4      p\        W\        P                  P                  4      # )z%s.Introspect())r	   Zdebug2r   r   r   
Introspectr   r   Zget_busr   r   r   r    )r!   r:   Zdatar"   s   && r#   rD   ZFirewallDConfigZone.Introspect   s`     	

$d&6&67($:IIt||++-
 1>>
 	
r$   z&(sssbsasa(ss)asba(ssss)asasasasa(ss)b)c                s    \         P                  ! RV P                  4       V P                  P	                  V P
                  4      pV^,          \        8X  d   \        V4      pRV^&   \        V4      pV# )get settings for zonez%s.getSettings()r-   )	r	   r8   r   r   Zget_zone_configr   r   listtuple)r!   r:   settings	_settingss   &&  r#   getSettingsZFirewallDConfigZone.getSettings   s_     	

%t'7'78;;..txx8A;--XI$IaLY'Hr$   c                s    \         P                  ! RV P                  4       V P                  P	                  V P
                  4      pVR,          \        8X  d   RVR&   V# )rE   z%s.getSettings2()targetr-   )r	   r8   r   r   get_zone_config_dictr   r   r!   r:   rH      && r#   getSettings2Z FirewallDConfigZone.getSettings2   sN     	

&(8(89;;33DHH=H!44!*HXr$   c                sz   V P                   P                  V P                  4      pRV9   d   \        VR,          4      M	\        4       pRV9   d   \        VR,          4      M	\        4       p\	        V\
        4      '       d\   \        V\        P                  ! R4      ,          4      V,
          p\        V\        P                  ! R4      ,          4      V,
          pMVRV9   d   \        VR,          4      M	\        4       pRV9   d   \        VR,          4      M	\        4       pWs,
          pW,
          pV F>  p	V P                  P                  V	4      '       g   K&  \        \        P                  V	4      h	  V F>  p
V P                  P                  V
4      '       g   K&  \        \        P                  V
4      h	  R# )zAssignment of interfaces/sources to zones is different from other
zone settings in the sense that particular interface/zone can be
part of only one zone. So make sure added interfaces/sources have
not already been bound to another zone.
interfacessourcesN)r   rL   r   Zset
isinstancerG   r   Zindex_ofr   ZgetZoneOfInterfacer   r   ZZONE_CONFLICTZgetZoneOfSource)r!   rH   Zold_settingsZ
old_ifacesZold_sourcesZadded_ifacesZadded_sourcesZ
new_ifacesZnew_sourcesZifacesources   &&         r#    _checkDuplicateInterfacesSourcesZ4FirewallDConfigZone._checkDuplicateInterfacesSources   sa   
 {{77A/;|/KC\*+QTQV 	 -6,ECY'(35 	 h&&xl(CDE
RLy)A BCkQM 0<x/GH\*+SU  7@86K#hy12QTQVK%2L'5M!E{{--e44#((%  "
 $F{{**622#((&  $r$   c                s   \        V4      p\        P                  ! RV P                  4       V P                  P                  V4       V^,          R8X  d    \        V4      p\        V^&   \        V4      pV P                  V4       V P                  P                  V P                  V4      V n        V P                  V P                  P                  4       R# )update settings for zonez%s.update('...')r-   N)r   r	   r8   r   r   rA   rF   r   rG   rT   r   Zset_zone_configr   Updatedr+   )r!   rH   r:   rI      &&& r#   updateZFirewallDConfigZone.update   s     "(+

%t'7'78'A;)#XI.IaLY'H--h7;;..txxBTXX]]#r$   c                s   \        V4      p\        P                  ! RV P                  4       V P                  P                  V4       RV9   d   VR,          R8X  d
   \        VR&   V P                  V4       V P                  P                  V P                  V4      V n
        V P                  V P                  P                  4       R# )rU   z%s.update2('...')rK   r-   N)r   r	   r8   r   r   rA   r   rT   r   Zset_zone_config_dictr   rV   r+   )r!   rH   r:      &&&r#   update2ZFirewallDConfigZone.update2  s     "(+

&(8(89'xHX$6)$C!4HX--h7;;33DHHhGTXX]]#r$   c                s   \         P                  ! RV P                  4       V P                  P	                  V4       V P
                  P                  V P                  4      V n        V P                  V P                  P                  4       R# )z&load default settings for builtin zonez%s.loadDefaults()N)
r	   r8   r   r   rA   r   Zload_zone_defaultsr   rV   r+   r!   r:   r2   r#   loadDefaultsZ FirewallDConfigZone.loadDefaults  sY     	

&(8(89';;11$((;TXX]]#r$   c                V    \         P                  ! V P                  : R V: R24       R# )z
.Updated('')Nr	   r8   r   r!   r+   r2   r#   rV   ZFirewallDConfigZone.Updated$       	

)9)94@Ar$   c                s   \         P                  ! RV P                  4       V P                  P	                  V4       V P
                  P                  V P                  4       V P                  P                  V P                  4       R# )zremove zonez%s.removeZone()N)	r	   r8   r   r   rA   r   Zremove_zoner   Z
removeZoner[   r2   r#   removeZFirewallDConfigZone.remove+  sW     	

$d&6&67')txx(r$   c                r]   )z
.Removed('r^   Nr_   r`   r2   r#   RemovedZFirewallDConfigZone.Removed4  ra   r$   c                s   \        V\        4      p\        P                  ! RV P                  V4       V P
                  P                  V4       V P                  P                  V P                  V4      V n	        V P                  V4       R# )zrename zonez%s.rename('%s')N)r   r7   r	   r8   r   r   rA   r   Zrename_zoner   Renamed)r!   r+   r:   rY   r#   renameZFirewallDConfigZone.rename;  sa     dC(

$d&6&6=';;**488T:Tr$   c                r]   )z
.Renamed('r^   Nr_   r`   r2   r#   rd   ZFirewallDConfigZone.RenamedE  ra   r$   c                sr    \         P                  ! R V P                  4       V P                  4       ^ ,          # )z%s.getVersion()r	   r8   r   rJ   r[   r2   r#   
getVersionZFirewallDConfigZone.getVersionL  s-     	

$d&6&67!!$$r$   c                s    \        V\        4      p\        P                  ! R V P                  V4       V P
                  P                  V4       \        V P                  4       4      pW^ &   V P                  V4       R# )z%s.setVersion('%s')N
r   r7   r	   r8   r   r   rA   rF   rJ   rX   )r!   Zversionr:   rH   rW   r#   
setVersionZFirewallDConfigZone.setVersionR  s_     !#.

($*:*:GD'((*+Hr$   c                sr    \         P                  ! R V P                  4       V P                  4       ^,          # )z%s.getShort()rf   r[   r2   r#   getShortZFirewallDConfigZone.getShort^  ,     	

?D$4$45!!$$r$   c                s    \        V\        4      p\        P                  ! R V P                  V4       V P
                  P                  V4       \        V P                  4       4      pW^&   V P                  V4       R# )z%s.setShort('%s')Nrh   )r!   Zshortr:   rH   rW   r#   setShortZFirewallDConfigZone.setShortd  s_     uc*

&(8(8%@'((*+Hr$   c                sr    \         P                  ! R V P                  4       V P                  4       ^,          # )z%s.getDescription()rf   r[   r2   r#   getDescriptionZ"FirewallDConfigZone.getDescriptionp  s-     	

($*:*:;!!$$r$   c                s    \        V\        4      p\        P                  ! R V P                  V4       V P
                  P                  V4       \        V P                  4       4      pW^&   V P                  V4       R# )z%s.setDescription('%s')Nrh   )r!   Zdescriptionr:   rH   rW   r#   setDescriptionZ"FirewallDConfigZone.setDescriptionv  s_     %[#6

,d.>.>L'((*+!Hr$   c                s    \         P                  ! R V P                  4       V P                  4       pV^,          \        8w  d
   V^,          # R# )z%s.getTarget()r-   )r	   r8   r   rJ   r   rM   rN   r#   	getTargetZFirewallDConfigZone.getTarget  sB     	

#T%5%56##%&qk-@@x{OiOr$   c                s   \        V\        4      p\        P                  ! R V P                  V4       V P
                  P                  V4       \        V P                  4       4      pVR8w  d   TM\        V^&   V P                  V4       R# )z%s.setTarget('%s')r-   N)r   r7   r	   r8   r   r   rA   rF   rJ   r   rX   )r!   rK   r:   rH   rW   r#   	setTargetZFirewallDConfigZone.setTarget  sk      ,

')9)96B'((*+ &) 3f9LHr$   Zasc                sr    \         P                  ! R V P                  4       V P                  4       ^,          # )z%s.getServices()rf   r[   r2   r#   getServicesZFirewallDConfigZone.getServices  s-     	

%t'7'78!!$$r$   c                s   \        V\        4      p\        P                  ! R V P                  RP                  V4      4       V P                  P                  V4       \        V P                  4       4      pW^&   V P                  V4       R# )z%s.setServices('[%s]'),N
r   rF   r	   r8   r   joinr   rA   rJ   rX   )r!   Zservicesr:   rH   rW   r#   setServicesZFirewallDConfigZone.setServices  sh     "(D1

+T-=-=sxx?QR'((*+Hr$   c                sr   \        V\        4      p\        P                  ! R V P                  V4       V P
                  P                  V4       \        V P                  4       4      pW^,          9   d   \        \        P                  V4      hV^,          P                  V4       V P                  V4       R# )z%s.addService('%s')Nr   r7   r	   r8   r   r   rA   rF   rJ   r   r   ALREADY_ENABLEDappendrX   r!   servicer:   rH   rW   r#   
addServiceZFirewallDConfigZone.addService  s     !#.

($*:*:GD'((*+qk! 6 6@@7#Hr$   c                sr   \        V\        4      p\        P                  ! R V P                  V4       V P
                  P                  V4       \        V P                  4       4      pW^,          9  d   \        \        P                  V4      hV^,          P                  V4       V P                  V4       R# )z%s.removeService('%s')Nr   r7   r	   r8   r   r   rA   rF   rJ   r   r   NOT_ENABLEDrb   rX   ry   rW   r#   removeServiceZ!FirewallDConfigZone.removeService  s     !#.

+T-=-=wG'((*+1+% 2 2G<<7#Hr$   Zbc                s    \        V\        4      p\        P                  ! R V P                  V4       WP                  4       ^,          9   # )z%s.queryService('%s')r   r7   r	   r8   r   rJ   )r!   rz   r:   rY   r#   queryServiceZ FirewallDConfigZone.queryService  s>    
 !#.

*D,<,<gF**,Q///r$   za(ss)c                sr    \         P                  ! R V P                  4       V P                  4       ^,          # )z%s.getPorts()rf   r[   r2   r#   getPortsZFirewallDConfigZone.getPorts  rk   r$   c                s   . p\        V\        4       FF  p\        V\        4      '       d   VP                  \	        V4      4       K5  VP                  V4       KH  	  Tp\
        P                  ! R V P                  RP                  R V 4       4      4       V P                  P                  V4       \        V P                  4       4      pW^&   V P                  V4       R# )z%s.setPorts('[%s]')rr   c              3   T   "   T F  pR V^ ,          : RV^,          : R2x  K   	  R# 5i(', 'r^   Nr&   Z.0port   & r#   	<genexpr>Z/FirewallDConfigZone.setPorts.<locals>.<genexpr>  !     JEDd1ggtAww7E   &(Nr   rF   rR   rx   rG   r	   r8   r   rt   r   rA   rJ   rX   r!   Zportsr:   Z_portsr   rH      &&&   r#   setPortsZFirewallDConfigZone.setPorts  s     "5$/D$%%eDk*d#	 0
 

!HHJEJJ	

 	'((*+Hr$   c           	     s  a \        V\        4      p\        S\        4      o\        P                  ! R V P                  VS4       V P
                  P                  V4       \        V P                  4       4      p\        \        V3R lV^,          4      4      pV F<  p\        W^ ,          4      '       g   K  \        \        P                  V: RS: 24      h	  \        Y UUu. uF  w  rxVNK	  	  upp4      w  rV
 F'  pV^,          P                  \!        VR4      S34       K)  	  V	 F'  pV^,          P#                  \!        VR4      S34       K)  	  V P%                  V4       R# u uppi )z%s.addPort('%s', '%s')c                    < V ^,          S8H  # i   r&   r>   protocol   &r#   <lambda>Z-FirewallDConfigZone.addPort.<locals>.<lambda>      !A$(2Br$   :-Nr   r7   r	   r8   r   r   rA   rF   rJ   filterr   r   r   rw   r   rb   r   rx   rX   r!   r   r   r:   rH   Zexisting_port_idsZport_id_port	_protocolZadded_rangesZremoved_rangesZrange   &&f&        r#   addPortZFirewallDConfigZone.addPort  s0    dC(!(C0

+T-=-=tXN'((*+ (BHQK!PQ(GtQZ00#F$:$:tX<VWW ) (93DE3D/e53DE(
$ $EQKs 3X>? $!EQKs 3X>? "H F   %E)c           	     s  a \        V\        4      p\        S\        4      o\        P                  ! R V P                  VS4       V P
                  P                  V4       \        V P                  4       4      p\        \        V3R lV^,          4      4      pV F  p\        W^ ,          4      '       g   K   M#	  \        \        P                  V: RS: 24      h\        Y UUu. uF  w  rxVNK	  	  upp4      w  rV
 F'  pV^,          P                  \!        VR4      S34       K)  	  V	 F'  pV^,          P#                  \!        VR4      S34       K)  	  V P%                  V4       R# u uppi )z%s.removePort('%s', '%s')c                 r   r   r&   r   r   r#   r   Z0FirewallDConfigZone.removePort.<locals>.<lambda>  r   r$   r   r   Nr   r7   r	   r8   r   r   rA   rF   rJ   r   r   r   r   r}   r   rb   r   rx   rX   r   r   r#   
removePortZFirewallDConfigZone.removePort  s3    dC(!(C0

.0@0@$Q'((*+ (BHQK!PQ(GtQZ00 )   2 2tX4NOO'53DE3D/e53DE(
$ $EQKs 3X>? $!EQKs 3X>? "H F   'E+c                s   \        V\        4      p\        V\        4      p\        P                  ! R V P                  W4       V P                  4       ^,           F!  w  rE\        W4      '       g   K  W%8X  g   K    R# 	  R# )z%s.queryPort('%s', '%s')TFr   r7   r	   r8   r   rJ   r   r!   r   r   r:   r   r      &&&&  r#   	queryPortZFirewallDConfigZone.queryPort  si    
 dC(!(C0

-t/?/?P $ 0 0 21 5 5Et++0E !6 r$   c                sr    \         P                  ! R V P                  4       V P                  4       ^,          # )z%s.getProtocols()rf   r[   r2   r#   getProtocolsZ FirewallDConfigZone.getProtocols"  -     	

&(8(89!"%%r$   c                s   \        V\        4      p\        P                  ! R V P                  RP                  V4      4       V P                  P                  V4       \        V P                  4       4      pW^&   V P                  V4       R# )z%s.setProtocols('[%s]')rr   Nrs   )r!   Z	protocolsr:   rH   rW   r#   setProtocolsZ FirewallDConfigZone.setProtocols(  sh     #9d3	

,d.>.>@ST'((*+ Hr$   c                sr   \        V\        4      p\        P                  ! R V P                  V4       V P
                  P                  V4       \        V P                  4       4      pW^,          9   d   \        \        P                  V4      hV^,          P                  V4       V P                  V4       R# )z%s.addProtocol('%s')Nrv   r!   r   r:   rH   rW   r#   addProtocolZFirewallDConfigZone.addProtocol2  s     "(C0

)4+;+;XF'((*+|# 6 6AAH%Hr$   c                sr   \        V\        4      p\        P                  ! R V P                  V4       V P
                  P                  V4       \        V P                  4       4      pW^,          9  d   \        \        P                  V4      hV^,          P                  V4       V P                  V4       R# )z%s.removeProtocol('%s')Nr|   r   rW   r#   removeProtocolZ"FirewallDConfigZone.removeProtocol>  s     "(C0

,d.>.>I'((*+B<' 2 2H==H%Hr$   c                s    \        V\        4      p\        P                  ! R V P                  V4       WP                  4       ^,          9   # )z%s.queryProtocol('%s')r   )r!   r   r:   rY   r#   queryProtocolZ!FirewallDConfigZone.queryProtocolJ  s>    
 "(C0

+T-=-=xH++-b111r$   c                sr    \         P                  ! R V P                  4       V P                  4       ^,          # )z%s.getSourcePorts()rf   r[   r2   r#   getSourcePortsZ"FirewallDConfigZone.getSourcePortsU  s-     	

($*:*:;!"%%r$   c                s   . p\        V\        4       FF  p\        V\        4      '       d   VP                  \	        V4      4       K5  VP                  V4       KH  	  Tp\
        P                  ! R V P                  RP                  R V 4       4      4       V P                  P                  V4       \        V P                  4       4      pW^&   V P                  V4       R# )z%s.setSourcePorts('[%s]')rr   c              3   r   r   r&   r   r   r#   r   Z5FirewallDConfigZone.setSourcePorts.<locals>.<genexpr>i  r   r   Nr   r   r   r#   setSourcePortsZ"FirewallDConfigZone.setSourcePorts[  s     "5$/D$%%eDk*d#	 0
 

'HHJEJJ	

 	'((*+Hr$   c           	     s  a \        V\        4      p\        S\        4      o\        P                  ! R V P                  VS4       V P
                  P                  V4       \        V P                  4       4      p\        \        V3R lV^,          4      4      pV F<  p\        W^ ,          4      '       g   K  \        \        P                  V: RS: 24      h	  \        Y UUu. uF  w  rxVNK	  	  upp4      w  rV
 F'  pV^,          P                  \!        VR4      S34       K)  	  V	 F'  pV^,          P#                  \!        VR4      S34       K)  	  V P%                  V4       R# u uppi )z%s.addSourcePort('%s', '%s')c                 r   r   r&   r   r   r#   r   Z3FirewallDConfigZone.addSourcePort.<locals>.<lambda>x  r   r$   r   r   Nr   r   r   r#   addSourcePortZ!FirewallDConfigZone.addSourcePortp  s0    dC(!(C0

143C3CT8T'((*+ (BHRL!QR(GtQZ00#F$:$:tX<VWW ) (93DE3D/e53DE(
$ $ERL!4h ?@ $!ERL!4h ?@ "H Fr   c           	     s  a \        V\        4      p\        S\        4      o\        P                  ! R V P                  VS4       V P
                  P                  V4       \        V P                  4       4      p\        \        V3R lV^,          4      4      pV F  p\        W^ ,          4      '       g   K   M#	  \        \        P                  V: RS: 24      h\        Y UUu. uF  w  rxVNK	  	  upp4      w  rV
 F'  pV^,          P                  \!        VR4      S34       K)  	  V	 F'  pV^,          P#                  \!        VR4      S34       K)  	  V P%                  V4       R# u uppi )z%s.removeSourcePort('%s', '%s')c                 r   r   r&   r   r   r#   r   Z6FirewallDConfigZone.removeSourcePort.<locals>.<lambda>  r   r$   r   r   Nr   r   r   r#   removeSourcePortZ$FirewallDConfigZone.removeSourcePort  s3    dC(!(C0

4d6F6FhW'((*+ (BHRL!QR(GtQZ00 )   2 2tX4NOO'53DE3D/e53DE(
$ $ERL!4h ?@ $!ERL!4h ?@ "H Fr   c                s   \        V\        4      p\        V\        4      p\        P                  ! R V P                  W4       V P                  4       ^,           F!  w  rE\        W4      '       g   K  W%8X  g   K    R# 	  R# )z%s.querySourcePort('%s', '%s')TFr   r   r   r#   querySourcePortZ#FirewallDConfigZone.querySourcePort  si    
 dC(!(C0

3T5E5EtV $ 0 0 22 6 6Et++0E !7 r$   c                sr    \         P                  ! R V P                  4       V P                  4       ^,          # )z%s.getIcmpBlocks()rf   r[   r2   r#   getIcmpBlocksZ!FirewallDConfigZone.getIcmpBlocks  -     	

')9)9:!!$$r$   c                s   \        V\        4      p\        P                  ! R V P                  RP                  V4      4       V P                  P                  V4       \        V P                  4       4      pW^&   V P                  V4       R# )z%s.setIcmpBlocks('[%s]')rr   Nrs   )r!   Z	icmptypesr:   rH   rW   r#   setIcmpBlocksZ!FirewallDConfigZone.setIcmpBlocks  sh     #9d3	

-t/?/?)ATU'((*+Hr$   c                sr   \        V\        4      p\        P                  ! R V P                  V4       V P
                  P                  V4       \        V P                  4       4      pW^,          9   d   \        \        P                  V4      hV^,          P                  V4       V P                  V4       R# )z%s.addIcmpBlock('%s')Nrv   r!   icmptyper:   rH   rW   r#   addIcmpBlockZ FirewallDConfigZone.addIcmpBlock  s     "(C0

*D,<,<hG'((*+{" 6 6AA8$Hr$   c                sr   \        V\        4      p\        P                  ! R V P                  V4       V P
                  P                  V4       \        V P                  4       4      pW^,          9  d   \        \        P                  V4      hV^,          P                  V4       V P                  V4       R# )z%s.removeIcmpBlock('%s')Nr|   r   rW   r#   removeIcmpBlockZ#FirewallDConfigZone.removeIcmpBlock  s     "(C0

-t/?/?J'((*+A;& 2 2H==8$Hr$   c                s    \        V\        4      p\        P                  ! R V P                  V4       WP                  4       ^,          9   # )z%s.queryIcmpBlock('%s')r   )r!   r   r:   rY   r#   queryIcmpBlockZ"FirewallDConfigZone.queryIcmpBlock  s>    
 "(C0

,d.>.>I++-a000r$   c                r    \         P                  ! R V P                  4       V P                  4       ^,          # )z%s.getIcmpBlockInversion()rf   r[   r2   r#   getIcmpBlockInversionZ)FirewallDConfigZone.getIcmpBlockInversion  s-     	

/1A1AB!"%%r$   c                s    \        V\        4      p\        P                  ! R V P                  V4       V P
                  P                  V4       \        V P                  4       4      pW^&   V P                  V4       R# )z%s.setIcmpBlockInversion('%s')N
r   Zboolr	   r8   r   r   rA   rF   rJ   rX   )r!   Zflagr:   rH   rW   r#   setIcmpBlockInversionZ)FirewallDConfigZone.setIcmpBlockInversion  s_     dD)

3T5E5EtL'((*+Hr$   c                s.   \         P                  ! R V P                  4       V P                  P	                  V4       \        V P                  4       4      pV^,          '       d   \        \        P                  R4      hRV^&   V P                  V4       R# )z%s.addIcmpBlockInversion()icmp-block-inversionTNr	   r8   r   r   rA   rF   rJ   r   r   rw   rX   rM   rN   r#   addIcmpBlockInversionZ)FirewallDConfigZone.addIcmpBlockInversion  sp     	

/1A1AB'((*+B<< 6 68NOOHr$   c                s.   \         P                  ! R V P                  4       V P                  P	                  V4       \        V P                  4       4      pV^,          '       g   \        \        P                  R4      hRV^&   V P                  V4       R# )z%s.removeIcmpBlockInversion()r   FNr	   r8   r   r   rA   rF   rJ   r   r   r}   rX   rM   rN   r#   removeIcmpBlockInversionZ,FirewallDConfigZone.removeIcmpBlockInversion  sp     	

2D4D4DE'((*+|| 2 24JKKHr$   c                r   )z%s.queryIcmpBlockInversion()rf   r[   r2   r#   queryIcmpBlockInversionZ+FirewallDConfigZone.queryIcmpBlockInversion  s-     	

143C3CD!"%%r$   c                r    \         P                  ! R V P                  4       V P                  4       ^,          # )z%s.getMasquerade()rf   r[   r2   r#   getMasqueradeZ!FirewallDConfigZone.getMasquerade  r   r$   c                s    \        V\        4      p\        P                  ! R V P                  V4       V P
                  P                  V4       \        V P                  4       4      pW^&   V P                  V4       R# )z%s.setMasquerade('%s')Nr   )r!   
masquerader:   rH   rW   r#   setMasqueradeZ!FirewallDConfigZone.setMasquerade  s_     $J5


+T-=-=zJ'((*+ Hr$   c                s.   \         P                  ! R V P                  4       V P                  P	                  V4       \        V P                  4       4      pV^,          '       d   \        \        P                  R4      hRV^&   V P                  V4       R# )z%s.addMasquerade()r   TNr   rM   rN   r#   addMasqueradeZ!FirewallDConfigZone.addMasquerade  so     	

')9)9:'((*+A;; 6 6EEHr$   c                s.   \         P                  ! R V P                  4       V P                  P	                  V4       \        V P                  4       4      pV^,          '       g   \        \        P                  R4      hRV^&   V P                  V4       R# )z%s.removeMasquerade()r   FNr   rM   rN   r#   removeMasqueradeZ$FirewallDConfigZone.removeMasquerade(  so     	

*D,<,<='((*+{{ 2 2LAAHr$   c                r   )z%s.queryMasquerade()rf   r[   r2   r#   queryMasqueradeZ#FirewallDConfigZone.queryMasquerade3  s-     	

)4+;+;<!!$$r$   za(ssss)c                sr    \         P                  ! R V P                  4       V P                  4       ^	,          # )z%s.getForwardPorts()rf   r[   r2   r#   getForwardPortsZ#FirewallDConfigZone.getForwardPorts;  s-    
 	

)4+;+;<!!$$r$   c                s   . p\        V\        4       FF  p\        V\        4      '       d   VP                  \	        V4      4       K5  VP                  V4       KH  	  Tp\
        P                  ! R V P                  RP                  R V 4       4      4       V P                  P                  V4       \        V P                  4       4      pW^	&   V P                  V4       R# )z%s.setForwardPorts('[%s]')rr   c           
   3   s   "   T F4  pR V^ ,          : RV^,          : RV^,          : RV^,          : R2	x  K6  	  R# 5i)r   r   z', 'r^   Nr&   r   r   r#   r   Z6FirewallDConfigZone.setForwardPorts.<locals>.<genexpr>Q  s8      !D .2!WWd1ggtAwwQP!s   <>Nr   r   r   r#   setForwardPortsZ#FirewallDConfigZone.setForwardPortsC  s     "5$/D$%%eDk*d#	 0
 

(HH ! 	
 	'((*+Hr$   Zssssc           
     s$   \        V\        4      p\        V\        4      p\        V\        4      p\        V\        4      p\        P                  ! R V P                  VVVV4       V P
                  P                  V4       W\        V4      \        V4      3p\        V P                  4       4      pWg^	,          9   d*   \        \        P                  V: RV: RV: RV: 24      hV^	,          P                  V4       V P                  V4       R# )z)%s.addForwardPort('%s', '%s', '%s', '%s')r   Nrv   r!   r   r   toporttoaddrr:   fwp_idrH      &&&&&&  r#   addForwardPortZ"FirewallDConfigZone.addForwardPort[  s    
 dC(!(C0,,

7	
 	'#f+s6{;((*+a[ &&xQW(X  	6"Hr$   c           
     s$   \        V\        4      p\        V\        4      p\        V\        4      p\        V\        4      p\        P                  ! R V P                  VVVV4       V P
                  P                  V4       W\        V4      \        V4      3p\        V P                  4       4      pWg^	,          9  d*   \        \        P                  V: RV: RV: RV: 24      hV^	,          P                  V4       V P                  V4       R# )z,%s.removeForwardPort('%s', '%s', '%s', '%s')r   Nr|   r   r   r#   removeForwardPortZ%FirewallDConfigZone.removeForwardPortv  s    
 dC(!(C0,,

:	
 	'#f+s6{;((*+!$""T8VV$T  	6"Hr$   c                s,   \        V\        4      p\        V\        4      p\        V\        4      p\        V\        4      p\        P                  ! R V P                  VVVV4       W\        V4      \        V4      3pW`P                  4       ^	,          9   # )z+%s.queryForwardPort('%s', '%s', '%s', '%s')r   )r!   r   r   r   r   r:   r   s   &&&&&& r#   queryForwardPortZ$FirewallDConfigZone.queryForwardPort  s     dC(!(C0,,

9	
 #f+s6{;))+A...r$   c                sr    \         P                  ! R V P                  4       V P                  4       ^
,          # )z%s.getInterfaces()rf   r[   r2   r#   getInterfacesZ!FirewallDConfigZone.getInterfaces  s-     	

')9)9:!"%%r$   c                s   \        V\        4      p\        P                  ! R V P                  RP                  V4      4       V P                  P                  V4       \        V P                  4       4      pW^
&   V P                  V4       R# )z%s.setInterfaces('[%s]')rr   Nrs   )r!   rP   r:   rH   rW   r#   setInterfacesZ!FirewallDConfigZone.setInterfaces  sh     $J5


-t/?/?*AUV'((*+!Hr$   c                s   \        V\        4      p\        P                  ! R V P                  V4       V P
                  P                  V4       \        V P                  4       4      pW^
,          9   d   \        \        P                  V4      hV^
,          P                  V4       V P                  V4       \        V P                  P                   V4       R# )z%s.addInterface('%s')N)r   r7   r	   r8   r   r   rA   rF   rJ   r   r   rw   rx   rX   r   r   r+   r!   	interfacer:   rH   rW   r#   addInterfaceZ FirewallDConfigZone.addInterface  s     #9c2	

*D,<,<iH'((*+$ 6 6	BBI&H#DHHMM9=r$   c                s   \        V\        4      p\        P                  ! R V P                  V4       V P
                  P                  V4       \        V P                  4       4      pW^
,          9  d   \        \        P                  V4      hV^
,          P                  V4       V P                  V4       \        RV4       R# )z%s.removeInterface('%s')Z N)r   r7   r	   r8   r   r   rA   rF   rJ   r   r   r}   rb   rX   r   r   rW   r#   removeInterfaceZ#FirewallDConfigZone.removeInterface  s     #9c2	

-t/?/?K'((*+RL( 2 2I>>I&H#B	2r$   c                s    \        V\        4      p\        P                  ! R V P                  V4       WP                  4       ^
,          9   # )z%s.queryInterface('%s')r   )r!   r   r:   rY   r#   queryInterfaceZ"FirewallDConfigZone.queryInterface  s>    
 #9c2	

,d.>.>	J,,.r222r$   c                sr    \         P                  ! R V P                  4       V P                  4       ^,          # )z%s.getSources()rf   r[   r2   r#   
getSourcesZFirewallDConfigZone.getSources  s-     	

$d&6&67!"%%r$   c                s   \        V\        4      p\        P                  ! R V P                  RP                  V4      4       V P                  P                  V4       \        V P                  4       4      pW^&   V P                  V4       R# )z%s.setSources('[%s]')rr   Nrs   )r!   rQ   r:   rH   rW   r#   
setSourcesZFirewallDConfigZone.setSources  sh     !$/

*D,<,<chhw>OP'((*+Hr$   c                sr   \        V\        4      p\        P                  ! R V P                  V4       V P
                  P                  V4       \        V P                  4       4      pW^,          9   d   \        \        P                  V4      hV^,          P                  V4       V P                  V4       R# )z%s.addSource('%s')Nrv   r!   rS   r:   rH   rW   r#   	addSourceZFirewallDConfigZone.addSource  s      ,

')9)96B'((*+b\! 6 6??F#Hr$   c                sr   \        V\        4      p\        P                  ! R V P                  V4       V P
                  P                  V4       \        V P                  4       4      pW^,          9  d   \        \        P                  V4      hV^,          P                  V4       V P                  V4       R# )z%s.removeSource('%s')Nr|   r   rW   r#   removeSourceZ FirewallDConfigZone.removeSource  s      ,

*D,<,<fE'((*+"% 2 2F;;F#Hr$   c                s    \        V\        4      p\        P                  ! R V P                  V4       WP                  4       ^,          9   # )z%s.querySource('%s')r   )r!   rS   r:   rY   r#   querySourceZFirewallDConfigZone.querySource  s>    
  ,

)4+;+;VD))+B///r$   c                sr    \         P                  ! R V P                  4       V P                  4       ^,          # )z%s.getRichRules()rf   r[   r2   r#   getRichRulesZ FirewallDConfigZone.getRichRules  r   r$   c           	     sl   \        V\        4      p\        P                  ! R V P                  RP                  V4      4       V P                  P                  V4       \        V P                  4       4      pV Uu. uF  p\        \        VR7      4      NK  	  ppW^&   V P                  V4       R# u upi )z%s.setRichRules('[%s]')rr   rule_strN)r   rF   r	   r8   r   rt   r   rA   rJ   r7   r   rX   )r!   Zrulesr:   rH   Zrr?   r#   setRichRulesZ FirewallDConfigZone.setRichRules  s     ud+

,d.>.>P'((*+5:;UY*+U;H <s   :B1c                s   \        V\        4      p\        P                  ! R V P                  V4       V P
                  P                  V4       \        V P                  4       4      p\        \        VR7      4      pWC^,          9   d   \        \        P                  V4      hV^,          P                  V4       V P                  V4       R# )z%s.addRichRule('%s')r   N)r   r7   r	   r8   r   r   rA   rF   rJ   r   r   r   rw   rx   rX   r!   ruler:   rH   r   r?   r#   addRichRuleZFirewallDConfigZone.addRichRule$  s     dC(

)4+;+;TB'((*+y$/0|# 6 6==H%Hr$   c                s   \        V\        4      p\        P                  ! R V P                  V4       V P
                  P                  V4       \        V P                  4       4      p\        \        VR7      4      pWC^,          9  d   \        \        P                  V4      hV^,          P                  V4       V P                  V4       R# )z%s.removeRichRule('%s')r   N)r   r7   r	   r8   r   r   rA   rF   rJ   r   r   r   r}   rb   rX   r   r?   r#   removeRichRuleZ"FirewallDConfigZone.removeRichRule1  s     dC(

,d.>.>E'((*+y$/0B<' 2 2D99H%Hr$   c                s    \        V\        4      p\        P                  ! R V P                  V4       \        \        VR7      4      pW0P                  4       ^,          9   # )z%s.queryRichRule('%s')r   )r   r7   r	   r8   r   r   rJ   )r!   r   r:   r   rW   r#   queryRichRuleZ!FirewallDConfigZone.queryRichRule>  sM    
 dC(

+T-=-=tDy$/0++-b111r$   )r   r   r   r   r   r   r   r%   )iZ__name__Z
__module__Z__qualname__Z__firstlineno__Z__doc__Z
persistentr   r   ZPK_ACTION_CONFIGZdefault_polkit_auth_requiredr   r   r   r)   r*   r3   r   ZPROPERTIES_IFACEr<   r@   r   rB   r   rC   ZPK_ACTION_INFOZINTROSPECTABLE_IFACErD   r    rJ   rO   rT   rX   rZ   r\   rV   rb   rc   re   rd   rg   ri   rj   rl   rm   rn   ro   rp   rq   ru   r{   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   Z__static_attributes__Z__classdictcell__Z__classcell__)r"   Z__classdict__s   @@r#   r   r   .   s    J&#);;#?#? +
 
   & &  " ..TQTU1  V1  ..SPWX4  Y4 fkk::;..UC
  D <
0 ..*E
 F
 fkk88922#F	
  G :	
 ..> 	 	
	 ??wW  X D ..= $ 	
$ ??gV	$  W	$ ??@$  A$ ??3OB  PB
 ??@)  A) ??3OB  PB
 ??cR  S ??3OB  PB
 ??sS%  T% ??cR  S ??sS%  T% ??cR  S ??sS%  T% ??cR  S ??sSP  TP
 ??cR  S ??tT%  U% ??dS  T ??cR  S ??cR  S ..SPS 0 0 ??wW%  X% ??gV  W& ??dS  T& ??dS  T* ..TQT   ??tT&  U& ??dS  T ??cR  S ??cR  S ..SPS 2 2 ??wW&  X& ??gV  W& ??dS  T& ??dS  T* ..TQT   ??tT%  U% ??dS  T ??cR  S ??cR  S ..SPS 1 1 ??sS&  T& ??cR  S ??@  A ??@  A ??sS&  T& ??sS%  T% ??cR  S ??@  A ??@  A ??sS%  T% ..i % % ??iX  Y, ??fU  V2 ??fU  V2 ..VSV / /( ??tT&  U& ??dS  T ??cR
>  S
> ??cR
3  S
3 ..SPS 3 3 ??tT&  U& ??dS  T ??cR  S ??cR  S ..SPS 0 0 ??tT&  U& ??dS  T ??cR	  S	 ??cR	  S	 ..SPS 2 2 2r$   r   )#r   Zdbus.serviceZfirewallr   Zfirewall.dbus_utilsr   r   r   Zfirewall.core.io.zoner   Zfirewall.core.fw_ifcfgr   Zfirewall.core.baser   Zfirewall.core.richr   Zfirewall.core.loggerr	   Zfirewall.server.dbusr
   Zfirewall.server.decoratorsr   r   r   r   r   r   Zfirewall.errorsr   Zfirewall.functionsr   r   r   r   r   r&   r$   r#   <module>r      sY       
 ' > 2 ( $ 2   ) X2+ X2r$   