ó
    Ö›‘h�  ã                   óp   • S r SSKJrJr  SS/r " S S5      r " S S5      r " S S	5      r " S
 S5      rg)zM
L{twisted.python.fakepwd} provides a fake implementation of the L{pwd} API.
é    )ÚListÚOptionalÚUserDatabaseÚShadowDatabasec                   óV   • \ rS rSrSrS\S\S\S\S\S\S	\S
S4S jrS
\4S jrS r	Sr
g)Ú_UserRecordé   z¹
L{_UserRecord} holds the user data for a single user in L{UserDatabase}.
It corresponds to the C{passwd} structure from the L{pwd} module.
See that module for attribute documentation.
ÚnameÚpasswordÚuidÚgidÚgecosÚhomeÚshellÚreturnNc                 óX   • Xl         X l        X0l        X@l        XPl        X`l        Xpl        g ©N©Úpw_nameÚ	pw_passwdÚpw_uidÚpw_gidÚpw_gecosÚpw_dirÚpw_shell)Úselfr
   r   r   r   r   r   r   s           ÚZC:\Users\psant\Downloads\Noiseback\school\venv\Lib\site-packages\twisted/python/fakepwd.pyÚ__init__Ú_UserRecord.__init__   s'   € ð ŒØ!ŒØŒØŒØŒØŒØ�ó    c                 ó   • g)Né   © ©r   s    r   Ú__len__Ú_UserRecord.__len__'   ó   € Ør    c                 ó¦   • U R                   U R                  U R                  U R                  U R                  U R
                  U R                  4U   $ r   r   ©r   Úindexs     r   Ú__getitem__Ú_UserRecord.__getitem__*   sG   € à�L‰LØ�N‰NØ�K‰KØ�K‰KØ�M‰MØ�K‰KØ�M‰Mð
ð ñð 	r    )r   r   r   r   r   r   r   ©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__ÚstrÚintr   r%   r+   Ú__static_attributes__r#   r    r   r   r      sk   † ñðàðð ðð ð	ð
 ðð ðð ðð ðð 
ôð$˜ô õ	r    r   c                   óÎ   • \ rS rSr% Sr\\   \S'   Sr\	\S'   Sr
\	\S'   SS
 jr      SS\S\S\\	   S\\	   S\S\S\SS	4S jjrS\	S\4S jrS\S\4S jrS\\   4S jrSrg	)r   é6   zÙ
L{UserDatabase} holds a traditional POSIX user data in memory and makes it
available via the same API as L{pwd}.

@ivar _users: A C{list} of L{_UserRecord} instances holding all user data
    added to this database.
Ú_usersiu'  Ú_lastUIDiêN  Ú_lastGIDr   Nc                 ó   • / U l         g r   ©r8   r$   s    r   r   ÚUserDatabase.__init__C   ó	   € Øˆ�r    r   Úusernamer   r   r   r   r   c           	      óæ   • Uc!  U R                   nU =R                   S-  sl         Uc!  U R                  nU =R                  S-  sl        [        XX4XVU5      nU R                  R	                  U5        g)ab  
Add a new user record to this database.

@param username: The value for the C{pw_name} field of the user
    record to add.

@param password: The value for the C{pw_passwd} field of the user
    record to add.

@param uid: The value for the C{pw_uid} field of the user record to
    add.

@param gid: The value for the C{pw_gid} field of the user record to
    add.

@param gecos: The value for the C{pw_gecos} field of the user record
    to add.

@param home: The value for the C{pw_dir} field of the user record to
    add.

@param shell: The value for the C{pw_shell} field of the user record to
    add.
Né   )r9   r:   r   r8   Úappend)	r   r?   r   r   r   r   r   r   ÚnewUsers	            r   ÚaddUserÚUserDatabase.addUserF   s_   € ðD ‰;Ø—-‘-ˆCØ�MŠM˜QÑ�MØ‰;Ø—-‘-ˆCØ�MŠM˜QÑ�MÜ˜h°#¸EÈÓOˆØ�‰×Ñ˜7Õ#r    c                 ód   • U R                    H  nUR                  U:X  d  M  Us  $    [        5       e)z8
Return the user record corresponding to the given uid.
)r8   r   ÚKeyError)r   r   Úentrys      r   ÚgetpwuidÚUserDatabase.getpwuidq   s-   € ð —[”[ˆEØ�|‰|˜sÕ"Ø’ñ !ô ‹jÐr    r
   c                 ó¼   • [        U[        5      (       d  [        S[        U5       35      eU R                   H  nUR
                  U:X  d  M  Us  $    [        5       e)z=
Return the user record corresponding to the given username.
z%getpwuam() argument must be str, not )Ú
isinstancer3   Ú	TypeErrorÚtyper8   r   rG   )r   r
   rH   s      r   ÚgetpwnamÚUserDatabase.getpwnamz   sQ   € ô ˜$¤×$Ñ$ÜÐCÄDÈÃJÀ<ÐPÓQÐQØ—[”[ˆEØ�}‰} Õ$Ø’ñ !ô ‹jÐr    c                 ó   • U R                   $ )z$
Return a list of all user records.
r<   r$   s    r   ÚgetpwallÚUserDatabase.getpwall…   ó   € ð �{‰{Ðr    r<   ©r   N)r   NNÚ rV   z/bin/sh)r.   r/   r0   r1   r2   r   r   Ú__annotations__r9   r4   r:   r   r3   r   rD   rI   rO   rR   r5   r#   r    r   r   r   6   sÔ   ‡ ñð �ÑÓØ€HˆcÓØ€HˆcÓôð #Ø!Ø!ØØØñ)$àð)$ð ð)$ð �c‰]ð	)$ð
 �c‰]ð)$ð ð)$ð ð)$ð ð)$ð 
õ)$ðV˜Cð  Kô ð	˜Sð 	 [ô 	ð˜$˜{Ñ+÷ r    c                   ó^   • \ rS rSrSrS\S\S\S\S\S\S	\S
\S\SS4S jrS\4S jrS r	Sr
g)Ú_ShadowRecordéŒ   zª
L{_ShadowRecord} holds the shadow user data for a single user in
L{ShadowDatabase}.  It corresponds to C{spwd.struct_spwd}.  See that class
for attribute documentation.
r?   r   Ú
lastChangeÚminÚmaxÚwarnÚinactÚexpireÚflagr   Nc
                 óp   • Xl         X l        X0l        X@l        XPl        X`l        Xpl        X€l        X�l        g r   ©	Úsp_namÚsp_pwdÚ	sp_lstchgÚsp_minÚsp_maxÚsp_warnÚsp_inactÚ	sp_expireÚsp_flag©
r   r?   r   r[   r\   r]   r^   r_   r`   ra   s
             r   r   Ú_ShadowRecord.__init__“   s1   € ð ŒØŒØ#ŒØŒØŒØŒØŒØŒØ�r    c                 ó   • g)Né	   r#   r$   s    r   r%   Ú_ShadowRecord.__len__©   r'   r    c           	      óÒ   • U R                   U R                  U R                  U R                  U R                  U R
                  U R                  U R                  U R                  4	U   $ r   rc   r)   s     r   r+   Ú_ShadowRecord.__getitem__¬   sU   € à�K‰KØ�K‰KØ�N‰NØ�K‰KØ�K‰KØ�L‰LØ�M‰MØ�N‰NØ�L‰Lð

ð ñ
ð 
	r    )	rk   rl   rj   rf   rh   rg   rd   re   ri   r-   r#   r    r   rY   rY   Œ   s   † ñðàðð ðð ð	ð
 ðð ðð ðð ðð ðð ðð 
ôð,˜ô õr    rY   c                   ó~   • \ rS rSr% Sr\\   \S'   SS jrS\	S\	S	\
S
\
S\
S\
S\
S\
S\
SS4S jrS\	S\4S jrS rSrg)r   éº   zå
L{ShadowDatabase} holds a shadow user database in memory and makes it
available via the same API as C{spwd}.

@ivar _users: A C{list} of L{_ShadowRecord} instances holding all user data
    added to this database.

@since: 12.0
r8   r   Nc                 ó   • / U l         g r   r<   r$   s    r   r   ÚShadowDatabase.__init__Ç   r>   r    r?   r   r[   r\   r]   r^   r_   r`   ra   c
                 óT   • U R                   R                  [        XX4XVXxU	5	      5        g)a  
Add a new user record to this database.

@param username: The value for the C{sp_nam} field of the user record to
    add.

@param password: The value for the C{sp_pwd} field of the user record to
    add.

@param lastChange: The value for the C{sp_lstchg} field of the user
    record to add.

@param min: The value for the C{sp_min} field of the user record to add.

@param max: The value for the C{sp_max} field of the user record to add.

@param warn: The value for the C{sp_warn} field of the user record to
    add.

@param inact: The value for the C{sp_inact} field of the user record to
    add.

@param expire: The value for the C{sp_expire} field of the user record
    to add.

@param flag: The value for the C{sp_flag} field of the user record to
    add.
N)r8   rB   rY   rm   s
             r   rD   ÚShadowDatabase.addUserÊ   s*   € ðP 	�‰×ÑÜØ J°SÀÈtóõ	
r    c                 ó¾   • [        U[        5      (       d  [        S[        U5       35      eU R                   H  nUR
                  U:X  d  M  Us  $    [        U5      e)zD
Return the shadow user record corresponding to the given username.
z%getspnam() argument must be str, not )rL   r3   rM   rN   r8   rd   rG   )r   r?   rH   s      r   ÚgetspnamÚShadowDatabase.getspnamø   sU   € ô ˜(¤C×(Ñ(ÜÐCÄDÈÃNÐCSÐTÓUÐUØ—[”[ˆEØ�|‰|˜xÕ'Ø’ñ !ô �xÓ Ð r    c                 ó   • U R                   $ )z+
Return a list of all shadow user records.
r<   r$   s    r   ÚgetspallÚShadowDatabase.getspall  rT   r    r<   rU   )r.   r/   r0   r1   r2   r   rY   rW   r   r3   r4   rD   r{   r~   r5   r#   r    r   r   r   º   s™   ‡ ñð �ÑÓôð,
àð,
ð ð,
ð ð	,
ð
 ð,
ð ð,
ð ð,
ð ð,
ð ð,
ð ð,
ð 
ô,
ð\	! ð 	!¨ô 	!õr    N)	r2   Útypingr   r   Ú__all__r   r   rY   r   r#   r    r   Ú<module>r‚      sI   ðñ
÷ "àÐ+Ð
,€÷%ñ %÷PSñ S÷l+ñ +÷\Mò Mr    