+
    4Ssi{                     @    ^ RI Ht ^ RIHt ^RIHt  ! R R]4      tR# )    )Dn)DS_GUID_COMPUTERS_CONTAINER)Userc                   f   a a ] tR t^t oRtV 3R lt]R 4       t]R 4       t]	R 4       t
RtVtV ;t# )ComputerzA Computer is a type of User.c                  < VP                  RVP                  RR4      4      pVP                  R4      pV'       d!   VP                  R4      '       g
   VR,          pV'       d-   V'       g%   VP                  R4      '       d   TpM+VR,           pM!V'       d   V'       g   VP                  R4      pW!R&   W1R&   \        SV `  ! R/ VB  R# )a  Computer constructor automatically adds "$" to account_name.

The various ways a Computer can be constructed:

>>> Computer(name="pc")
>>> Computer(account_name="pc$")
>>> Computer(cn="pc")
>>> Computer(account_name="pc$", name="pc")

In each case the constructor does its best to ensure the
account name ends with a "$" and the name doesn't.

Also applies to GroupManagedServiceAccount subclass.namecnNaccount_name$ )getpopendswithrstripsuper__init__)selfkwargsr	   r   	__class__s   &,  >/usr/lib/python3/dist-packages/samba/domain/models/computer.pyr   Computer.__init__!   s     zz&&**T4"89zz.1  5 5c : :CL }}S!!##cz $&&s+Dv!-~"6"    c                J    V P                  V P                  4       \        4      # )z_Return base Dn for Computers.

:param samdb: SamDB connection
:return: Dn to use for searching
)get_wellknown_dnget_default_basednr   )samdbs   &r   get_base_dnComputer.get_base_dnG   s'     %%e&>&>&@&AC 	Cr   c                     R # )computerr   r   r   r   get_object_classComputer.get_object_classQ   s    r   c                     R\        W4      /pV P                  ! V3/ VB #   \         d,    TP                  R4      '       d   RT/p L;RTR,           /p LHi ; i)zHelper function to find a computer, first by Dn then sAMAccountName.

If the Dn can't be parsed use sAMAccountName, automatically add the $.
dnr   r   )r   
ValueErrorr   r   )clsr   r	   querys   &&& r   findComputer.findU   sc    	52e?+E wwu&&&  	5}}S!!'.'4		5s   " !AA
AAr   )__name__
__module____qualname____firstlineno____doc__r   staticmethodr   r"   classmethodr)   __static_attributes____classdictcell____classcell__)r   __classdict__s   @@r   r   r      sQ     '$#L C C   ' ' 'r   r   N)ldbr   
samba.dsdbr   userr   r   r   r   r   <module>r9      s   .  2 E't E'r   