+
    4Ssi@                         ^ RI t ^ RIHt ^ RIHt ^ RIHt ^ RIt]! R4      t	RR lt
R tRR ltRR ltR	 tR
 tR tR tR tR# )    N)nbt)Net)CommandErrorc                   T p\         P                  ! RV 4      pV'       d   VP                  ^4      pVP                  ^4      pVeF   VP                  4       pVP	                  4       VP	                  4       8w  d   \        RV RV R24      hVP	                  4       RVP                  4       3# Rp\         P                  ! RV 4      pV'       d   VP                  ^4      pVP                  ^4      pVe_   VP                  4       pVP                  R^4      ^ ,          pVP	                  4       VP	                  4       8w  d   \        RV R	V R24      hVP	                  4       VP                  4       R3# )
zget the realm or the domain and the base user
from user like:
* username
* DOMAIN\username
* username@REALM

 A SamDB object can also be passed in to check
our domain or realm against the obtained ones.
z(\w+)\\(\w+$)zGiven domain 'z' does not match our domain 'z'! z(\w+)@(\w+).zGiven realm 'z' does not match our realm ')	rematchgroupdomain_netbios_namelowerr   upperdomain_dns_namesplit)	usersambaseusermdomain
our_domainrealm	our_realmour_realm_initials	   &&       5/usr/lib/python3/dist-packages/samba/netcmd/common.py_get_user_realm_domainr      sW    H
!4(A771:?002J||~!1!1!33"^F8 <22<R$A B B  "flln55E
&A771:
?++-I )Q 7 :{{} 1 7 7 99"]5' :--6Kr$; < < NNekkmR00    c                    V P                  R4      P                  4       R,           V P                  R4      P                  4       ,           # )zdreturn the full DNS name of our own host. Used as a default
for hostname when running status queriesznetbios namer   r   )getr   )lps   &r   netcmd_dnsnamer    G   s7     66.!'')C/"&&/2G2G2IIIr   c                    \        WR7      pVf   V P                  R4      pVP                  V\        P                  \        P
                  ,          \        P                  ,          R7      pVP                  # )zReturn domain-name of a writable/ldap-capable DC for the default
domain (parameter "realm" in smb.conf) unless another realm has been
specified as argumentcredsr   r   )r   flags)r   r   finddcr   NBT_SERVER_LDAPNBT_SERVER_DSNBT_SERVER_WRITABLEpdc_dns_name)r   r#   r   net	cldap_rets   &&&  r   netcmd_finddcr,   M   sa     E
!C}w

%!$!4!4s7H7H!H3KbKb!b  dI!!!r   c                    \        WR7      pVP                  V\        P                  \        P                  ,          R7      pV# )zZReturn domain information (CLDAP record) of the ldap-capable
DC with the specified addressr"   )addressr$   )r   r%   r   r&   r'   )r   r#   r.   r*   r+   s   &&&  r   !netcmd_get_domain_infos_via_cldapr/   Y   s>     E
!C

7!$!4!4s7H7H!H  JIr   c                     ^ RI p \        V 4      pT F#  pTP                  T4      ^ ,          R8X  g   K"   R# 	  R#     R# ; i)r   NFCT)unicodedatastrcategory)valr2   str_valcs   &   r   is_printable_attr_valr8   a   sI    c( "1%,  s	   < Ac                    \         P                  ! 4       pVP                  Vn        VP                  4        Fg  pVR 8X  d   K  W,          pWBV&   RpV F  p\	        V4      '       d   K  Rp M	  V'       d   KB  W#,          P                  \         P                  4       Ki  	  V P                  V\         P                  4      pV# )dnFT)	ldbMessager:   keysr8   	set_flagsFLAG_FORCE_NO_BASE64_LDIF
write_ldifCHANGETYPE_NONE)samdbmsgr   kvalsneed_base64vresult_ldifs   &&      r   get_ldif_for_editorrI   s   s     	A66ADXXZ9v!A$Q''K	 
 {DNN3889  ""1c&9&9:Kr   c                d    \        V 4      \        8X  d   ^ # \        \        V 4      4      R,          # )z8Converts a timestamp in -100 nanosecond units to minutesg    A)intNEVER_TIMESTAMPabstimestamp_strs   &r   timestamp_to_minsrP      s)    
 =_,3}%&(33r   c                &    \        V 4      R,          # )z5Converts a timestamp in -100 nanosecond units to daysi  )rP   rN   s   &r   timestamp_to_daysrR      s    ]+w77r   c                0    W9   d   W,          ^ ,          # V# )z/get an attribute from a ldap msg with a default )rC   attrnamedefaults   &&&r   attr_defaultrW      s    }QNr   l         )N)r	   samba.dcerpcr   	samba.netr   samba.netcmdr   r;   rK   rL   r   r    r,   r/   r8   rI   rP   rR   rW   rT   r   r   <module>r[      sR   ( 
   % 
 )*%1PJ	"$448
r   