+
    4Ssi›F  ã                   óT  € ^ RI Ht ^ RIHtHtHtHt ^ RIH	t	 ^ RI
HtHtHt ^ RIHt ^ RIHt R t ! R R	]P&                  4      t ! R
 R]P&                  4      t ! R R]P&                  4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      tR# )é    N)ÚMAX_TGT_LIFETIMEÚMIN_TGT_LIFETIMEÚAuthenticationPolicyÚStrongNTLMPolicy)Ú
ModelError)ÚCommandÚCommandErrorÚOption)ÚRange©ÚNT_TICKS_PER_SECc                ó6   € V e   V ^<,          \         ,          # V # )zJConvert minutes to the tgt_lifetime attributes unit which is 10^-7 secondsr   )Úminutess   &ÚH/usr/lib/python3/dist-packages/samba/netcmd/domain/auth/policy/policy.pyÚmins_to_tgt_lifetimer      s   € àÒØ˜�|Ô.Õ.Ð.Ø€Nó    c                   ó6   a a€ ] tR t^%t oRtV 3R ltRtVtV ;t# )ÚUserOptionsz>User options used by policy create and policy modify commands.c                óv  <€ \         SV `  VR 4       V P                  RRR\        RV P                  \        \        \        R7      .R7       V P                  RRR	R
RV P                  R7       V P                  RR\        RRV P                  RR7       V P                  RR\        RRV P                  RR7       R# )zUser Optionsz--user-tgt-lifetime-minsz2Ticket-Granting-Ticket lifetime for user accounts.Útgt_lifetimeÚcallback©ÚminÚmax©ÚhelpÚdestÚtypeÚactionr   Ú
validatorsz--user-allow-ntlm-authzcAllow NTLM network authentication despite the fact that the user is restricted to selected devices.Úallow_ntlm_authF©r   r   Údefaultr   r   z#--user-allowed-to-authenticate-fromzISDDL Rules setting which device the user is allowed to authenticate from.Úallowed_to_authenticate_fromÚSDDL©r   r   r   r   r   Úmetavarz!--user-allowed-to-authenticate-tozOA target service, on a user account, requires the connecting user to match SDDLÚallowed_to_authenticate_toN©	ÚsuperÚ__init__Ú
add_optionÚintÚ
set_optionr   r   r   Ústr©ÚselfÚparserÚ	__class__s   &&€r   r+   ÚUserOptions.__init__(   sÈ   ø€ Ü‰Ñ˜ Ô0à�‰Ð2ØQØ+´#¸jØ!%§¡Ü$)Ô.>ÔDTÔ$UÐ#Vð	 	ô 	Xð
 	�‰Ð0ðBà.¸Ø)°D·O±Oð	 	ô 	Eð
 	�‰Ð=ØhÜ Ð'EØ)°D·O±OØ &ð	 	ô 	(ð
 	�‰Ð;ØnÜ Ð'CØ)°D·O±OØ &ð	 	ö 	(r   © ©	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r+   Ú__static_attributes__Ú__classdictcell__Ú__classcell__©r3   Ú__classdict__s   @@r   r   r   %   s   ù‡ € ÙH÷(õ (r   r   c                   ó6   a a€ ] tR t^At oRtV 3R ltRtVtV ;t# )ÚServiceOptionszAService options used by policy create and policy modify commands.c                óv  <€ \         SV `  VR 4       V P                  RRR\        RV P                  \        \        \        R7      .R7       V P                  RRR	R
RV P                  R7       V P                  RR\        RRV P                  RR7       V P                  RR\        RRV P                  RR7       R# )zService Optionsz--service-tgt-lifetime-minsz5Ticket-Granting-Ticket lifetime for service accounts.r   r   r   r   z--service-allow-ntlm-authznAllow NTLM network authentication despite the fact that the service account is restricted to selected devices.r!   Fr"   z&--service-allowed-to-authenticate-fromzTSDDL Rules setting which device the service account is allowed to authenticate from.r$   r%   r&   z$--service-allowed-to-authenticate-toz=The target service requires the connecting user to match SDDLr(   Nr)   r0   s   &&€r   r+   ÚServiceOptions.__init__D   sÎ   ø€ Ü‰Ñ˜Ð!2Ô3à�‰Ð5ØTØ+´#¸jØ!%§¡Ü$)Ô.>ÔDTÔ$UÐ#Vð	 	ô 	Xð
 	�‰Ð3ðBð /¸Ø)°D·O±Oð 	ô 	Eð 	�‰Ð@ðKä Ð'EØ)°D·O±OØ &ð 	ô 	(ð 	�‰Ð>Ø\Ü Ð'CØ)°D·O±OØ &ð	 	ö 	(r   r5   r6   r?   s   @@r   rB   rB   A   s   ù‡ € ÙK÷(õ (r   rB   c                   ó6   a a€ ] tR t^_t oRtV 3R ltRtVtV ;t# )ÚComputerOptionszBComputer options used by policy create and policy modify commands.c                óè   <€ \         SV `  VR 4       V P                  RRR\        RV P                  \        \        \        R7      .R7       V P                  RR\        R	RV P                  R
R7       R# )zComputer Optionsz--computer-tgt-lifetime-minsz6Ticket-Granting-Ticket lifetime for computer accounts.r   r   r   r   z%--computer-allowed-to-authenticate-toz]The computer account (server, workstation) service requires the connecting user to match SDDLr(   r%   r&   Nr)   r0   s   &&€r   r+   ÚComputerOptions.__init__b   ss   ø€ Ü‰Ñ˜Ð!3Ô4à�‰Ð6ØUØ+´#¸jØ!%§¡Ü$)Ô.>ÔDTÔ$UÐ#Vð	 	ô 	Xð
 	�‰Ð?Ø|Ü Ð'CØ)°D·O±OØ &ð	 	ö 	(r   r5   r6   r?   s   @@r   rF   rF   _   s   ù‡ € ÙL÷(õ (r   rF   c                   óš   a € ] tR t^qt o RtRtR]P                  R]P                  R]P                  /t
]! RRRR	R
R7      .tRR ltRtV tR# )Úcmd_domain_auth_policy_listz+List authentication policies on the domain.ú%prog -H <URL> [options]Ú	sambaoptsÚcredoptsÚhostoptsz--jsonzOutput results in JSON format.Úoutput_formatÚstore_constÚjson)r   r   r   ÚconstNc                óZ  € V P                  WV4      p \        P                  ! V4      pTR8X  d.   T P                  T Uu/ uF  qˆP                  TbK  	  up4       R # T F$  p\        TP                  T P                  R7       K&  	  R #   \         d   p\	        T4      hR p?ii ; iu upi )NrQ   ©Úfile)	Úldb_connectr   Úqueryr   r	   Ú
print_jsonÚnameÚprintÚoutf)	r1   rN   rL   rM   rO   ÚldbÚpoliciesÚeÚpolicys	   &&&&&    r   ÚrunÚcmd_domain_auth_policy_list.run�   s”   € ð ×Ñ˜x°HÓ=ˆð	"Ü+×1Ò1°#Ó6ˆHð
 ˜FÔ"Ø�O‰O¹xÓH¹x°VŸ[™[¨&Ò0¹xÑHÖIã"�Ü�f—k‘k¨¯	©	×2ó #øô ô 	"Ü˜q“/Ð!ûð	"üò
 Is   ”B
 Á B(Â
B%ÂB Â B%r5   ©NNNN)r7   r8   r9   r:   r;   ÚsynopsisÚoptionsÚSambaOptionsÚCredentialsOptionsÚHostOptionsÚtakes_optiongroupsr
   Útakes_optionsr`   r<   r=   ©r@   s   @r   rJ   rJ   q   s`   ø‡ € Ù5à)€Hð 	�W×)Ñ)Ø�G×.Ñ.Ø�G×'Ñ'ðÐñ 	ˆxÐ>Ø#¨MÀô	Ið€M÷
3ò 3r   rJ   c            	       óœ   a € ] tR t^“t o RtRtR]P                  R]P                  R]P                  /t
]! RRRR	]R
R7      .tRR ltRtV tR# )Úcmd_domain_auth_policy_viewz,View an authentication policy on the domain.rK   rL   rM   rN   ú--namez1Name of authentication policy to view (required).rY   ÚstoreT©r   r   r   r   ÚrequiredNc                óú   € V P                  WV4      p \        P                  ! WTR 7      pTf   \	        RT R24      hT P                  TP                  4       4       R#   \         d   p\	        T4      hRp?ii ; i)©ÚcnNúAuthentication policy ú not found.)rV   r   Úgetr   r	   rX   Úas_dict)r1   rN   rL   rM   rY   r\   r_   r^   s   &&&&&   r   r`   Úcmd_domain_auth_policy_view.run¤   sv   € à×Ñ˜x°HÓ=ˆð	"Ü)×-Ò-¨cÔ;ˆFð
 Š>ÜÐ!7¸°v¸[ÐIÓJÐJð 	�‰˜Ÿ™Ó(Ö)øô ô 	"Ü˜q“/Ð!ûð	"ús   ”A ÁA:Á*A5Á5A:r5   rb   ©r7   r8   r9   r:   r;   rc   rd   re   rf   rg   rh   r
   r/   ri   r`   r<   r=   rj   s   @r   rl   rl   “   sb   ø‡ € Ù6à)€Hð 	�W×)Ñ)Ø�G×.Ñ.Ø�G×'Ñ'ðÐñ 	ˆxØGØ 7°¸tô	Eð€M÷*ò *r   rl   c                   óx  a € ] tR t^µt o RtRtR]P                  R]P                  R]P                  R]
R]R]/t]! R	R
RR]RR7      ]! RRRR]R7      ]! RRRRR7      ]! RRRRR7      ]! RRRRR7      ]! RRR RR7      ]! R!R"]P"                  ! 4        R#2R$R%R]P$                  ! 4       R&R'7      .tR+R) ltR*tV tR(# ),Úcmd_domain_auth_policy_createz.Create an authentication policy on the domain.rK   rL   rM   rN   ÚuseroptsÚserviceoptsÚcomputeroptsrm   ú)Name of authentication policy (required).rY   rn   Tro   ú--descriptionú/Optional description for authentication policy.Údescription©r   r   r   r   ú	--protectú5Protect authentication silo from accidental deletion.ÚprotectÚ
store_true©r   r   r   ú--unprotectú7Unprotect authentication silo from accidental deletion.Ú	unprotectú--auditú!Only audit authentication policy.Úauditú	--enforceúEnforce authentication policy.Úenforceú--strong-ntlm-policyúStrong NTLM Policy (ú).Ústrong_ntlm_policyÚchoiceÚDisabled)r   r   r   r   Úchoicesr#   Nc                ó|  € V	'       d   V
'       d   \        R 4      hV'       d   V'       d   \        R4      hV P                  WV4      p \        P                  ! WçR7      pTe   \        RT R24      h\        TT\
        TP                  4       ,          TP                  \        TP                  4      TP                  TP                  TP                  \        TP                  4      TP                  TP                  \        TP                  4      TP                  R7      pTe   YÏn        MT'       * Tn         TP                  T4       T	'       d   TP                  T4       \        RT 2T P                   R7       R#   \         d   p\        T4      hRp?ii ; i  \         d   p\        T4      hRp?ii ; i)	ú2--protect and --unprotect cannot be used together.ú.--audit and --enforce cannot be used together.rr   Nrt   z already exists.)rs   r‚   r•   Úuser_allow_ntlm_authÚuser_tgt_lifetimeÚ!user_allowed_to_authenticate_fromÚuser_allowed_to_authenticate_toÚservice_allow_ntlm_authÚservice_tgt_lifetimeÚ$service_allowed_to_authenticate_fromÚ"service_allowed_to_authenticate_toÚcomputer_tgt_lifetimeÚ#computer_allowed_to_authenticate_tozCreated authentication policy: rT   )r	   rV   r   rv   r   r   Úupperr!   r   r   r$   r(   ÚenforcedÚsaver†   rZ   r[   ©r1   rN   rL   rM   r|   r}   r~   rY   r‚   r†   r‹   rŽ   r‘   r•   r\   r_   r^   s   &&&&&&&&&&&&&&   r   r`   Ú!cmd_domain_auth_policy_create.runÜ   s  € ÷
 —yÜÐSÓTÐTß—WÜÐOÓPÐPà×Ñ˜x°HÓ=ˆð	"Ü)×-Ò-¨cÔ;ˆFð
 ÒÜÐ!7¸°vÐ=MÐNÓOÐOô &ØØ#Ü/Ð0B×0HÑ0HÓ0JÕKØ!)×!9Ñ!9Ü2°8×3HÑ3HÓIØ.6×.SÑ.SØ,4×,OÑ,OØ$/×$?Ñ$?Ü!5°k×6NÑ6NÓ!OØ1<×1YÑ1YØ/:×/UÑ/UÜ"6°|×7PÑ7PÓ"QØ0<×0WÑ0Wô
ˆð$ ÒØ%�Oà"'œiˆFŒOð	"Ø�K‰K˜ÔçØ—‘˜sÔ#ô
 	Ð/°¨vÐ6¸T¿Y¹Y×GøôS ô 	"Ü˜q“/Ð!ûð	"ûôJ ô 	"Ü˜q“/Ð!ûð	"ús6   Á
F Ä<F  ÅF  ÆFÆFÆFÆ F;Æ+F6Æ6F;r5   ©NNNNNNNNNNNNN©r7   r8   r9   r:   r;   rc   rd   re   rf   rg   r   rB   rF   rh   r
   r/   r   Úchoices_strÚget_choicesri   r`   r<   r=   rj   s   @r   r{   r{   µ   s  ø‡ € Ù8à)€Hð 	�W×)Ñ)Ø�G×.Ñ.Ø�G×'Ñ'Ø�KØ�~Ø˜ðÐñ 	ˆxÐIØ 7°¸tô	EáˆØEØ!¨'¸ô	=ñ 	ˆ{ØKØ lô	4ñ 	ˆ}ØMØ¨ô	6ñ 	ˆyØ7Ø Lô	2ñ 	ˆ{Ø4Ø lô	4ñ 	Ð%Ø*Ð+;×+GÒ+GÓ+IÐ*JÈ"ÐMØ(¨xÀØ'×3Ò3Ó5Ø!ô		#ð%€M÷27Hò 7Hr   r{   c                   óv  a € ] tR tRt o RtRtR]P                  R]P                  R]P                  R]
R]R	]/t]! R
RRR]RR7      ]! RRRR]R7      ]! RRRRR7      ]! RRRRR7      ]! RRRRR7      ]! RR R!RR7      ]! R"R#]P"                  ! 4        R$2R%R&R]P$                  ! 4       R'7      .tR+R) ltR*tV tR(# ),Úcmd_domain_auth_policy_modifyi  z-Modify authentication policies on the domain.rK   rL   rM   rN   r|   r}   r~   rm   r   rY   rn   Tro   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˜   Nc                óâ  € V	'       d   V
'       d   \        R 4      hV'       d   V'       d   \        R4      hV P                  WV4      p \        P                  ! WçR7      pTf   \        RT R24      hT'       d	   RTn        MT'       d   RTn        Te   Y�n        Te!   \        TP                  4       ,          Tn	        TP                  e   \        TP                  4      Tn        TP                  e   TP                  Tn        TP                  e   TP                  Tn        TP                  e   \        TP                  4      Tn        TP                  e   TP                  Tn        TP                  e   TP                  Tn        TP                  e   \        TP                  4      Tn        TP                  e   TP                  Tn         TP-                  T4       T	'       d   TP/                  T4       MT
'       d   TP1                  T4       \3        RT 2T P4                  R	7       R#   \         d   p\        T4      hRp?ii ; i  \         d   p\        T4      hRp?ii ; i)
rš   r›   rr   Nrt   ru   TFzUpdated authentication policy: rT   )r	   rV   r   rv   r   r§   r‚   r   r¦   r•   r   r   r�   r$   rž   r(   rŸ   r¡   r¢   r£   r¤   r¥   r¨   r†   r‹   rZ   r[   r©   s   &&&&&&&&&&&&&&   r   r`   Ú!cmd_domain_auth_policy_modify.run<  s)  € ÷
 —yÜÐSÓTÐTß—WÜÐOÓPÐPà×Ñ˜x°HÓ=ˆð	"Ü)×-Ò-¨cÔ;ˆFð
 Š>ÜÐ!7¸°v¸[ÐIÓJÐJ÷ Ø"ˆF�OßØ#ˆFŒOð Ò"Ø!,Ôð
 Ò)ä Ð!3×!9Ñ!9Ó!;Õ<ð Ô%ð × Ñ Ò,Ü';¸H×<QÑ<QÓ'RˆFÔ$à×0Ñ0Ò<à×5Ñ5ð Ô4ð ×.Ñ.Ò:à×3Ñ3ð Ô2ð ×#Ñ#Ò/Ü*>¸{×?WÑ?WÓ*XˆFÔ'à×3Ñ3Ò?à×8Ñ8ð Ô7ð ×1Ñ1Ò=à×6Ñ6ð Ô5ð ×$Ñ$Ò0Ü+?À×@YÑ@YÓ+ZˆFÔ(à×2Ñ2Ò>à×7Ñ7ð Ô6ð	"Ø�K‰K˜ÔçØ—‘˜sÕ#ßØ× Ñ  Ô%ô
 	Ð/°¨vÐ6¸T¿Y¹Y×GøôO ô 	"Ü˜q“/Ð!ûð	"ûôF ô 	"Ü˜q“/Ð!ûð	"úsB   Á
H5 ÇI Ç.I È I ÈI È5IÉ IÉIÉI.ÉI)É)I.r5   r«   r¬   rj   s   @r   r°   r°     s  ø‡ € Ù7à)€Hð 	�W×)Ñ)Ø�G×.Ñ.Ø�G×'Ñ'Ø�KØ�~Ø˜ðÐñ 	ˆxÐIØ 7°¸tô	EáˆØEØ!¨'¸ô	=ñ 	ˆ{ØKØ lô	4ñ 	ˆ}ØMØ¨ô	6ñ 	ˆyØ7Ø Lô	2ñ 	ˆ{Ø4Ø lô	4ñ 	Ð%Ø*Ð+;×+GÒ+GÓ+IÐ*JÈ"ÐMØ(¨xÀØ'×3Ò3Ó5ô	7ð%€M÷0UHò UHr   r°   c            	       ó²   a € ] tR tRt o RtRtR]P                  R]P                  R]P                  /t
]! RRR	R
]RR7      ]! RRRRR7      .tRR ltRtV tR# )Úcmd_domain_auth_policy_deletei”  z-Delete authentication policies on the domain.rK   rL   rM   rN   rm   r   rY   rn   Tro   z--forcez-Force delete protected authentication policy.Úforcer‡   rˆ   Nc                ó®  € V P                  WV4      p \        P                  ! WdR 7      pTf   \	        RT R24      h T'       d   TP                  T4       TP                  T4       \        RT 2T P                  R7       R#   \         d   p\	        T4      hRp?ii ; i  \         d'   pT'       g   \	        T R24      h\	        T4      hRp?ii ; i)rr   Nrt   ru   z9
Try --force to delete protected authentication policies.zDeleted authentication policy: rT   )	rV   r   rv   r   r	   r‹   ÚdeleterZ   r[   )	r1   rN   rL   rM   rY   rµ   r\   r_   r^   s	   &&&&&&   r   r`   Ú!cmd_domain_auth_policy_delete.run¦  s×   € ð ×Ñ˜x°HÓ=ˆð	"Ü)×-Ò-¨cÔ;ˆFð
 Š>ÜÐ!7¸°v¸[ÐIÓJÐJð
	"ßØ× Ñ  Ô%à�M‰M˜#Ôô 	Ð/°¨vÐ6¸T¿Y¹Y×Gøô+ ô 	"Ü˜q“/Ð!ûð	"ûô ô 	"ßÜ"Ø�cÐSÐTóVð Vô ˜q“/Ð!ûð	"ús4   ”B ¿B# Á"B# ÂB ÂBÂB Â#CÂ.!CÃCr5   )NNNNNry   rj   s   @r   r´   r´   ”  sv   ø‡ € Ù7à)€Hð 	�W×)Ñ)Ø�G×.Ñ.Ø�G×'Ñ'ðÐñ 	ˆxÐIØ 7°¸tô	EáˆyÐNØ Lô	2ð€M÷Hò Hr   r´   )Úsamba.getoptÚgetoptrd   Úsamba.domain.modelsr   r   r   r   Úsamba.domain.models.exceptionsr   Úsamba.netcmdr   r	   r
   Úsamba.netcmd.validatorsr   Úsamba.nt_timer   r   ÚOptionGroupr   rB   rF   rJ   rl   r{   r°   r´   r5   r   r   Ú<module>rÁ      sª   ðõ. ÷Ió Iå 5ß 6Ñ 6Ý )Ý *òô(�'×%Ñ%ô (ô8(�W×(Ñ(ô (ô<(�g×)Ñ)ô (ô$3 'ô 3ôD* 'ô *ôD^H Gô ^HôB{H Gô {Hô|.H Gö .Hr   