+
    üÐj�  ã                   ór   € R t ^ RIHtHt RR.t ! R R4      t ! R R4      t ! R R4      t ! R	 R4      tR
# )zM
L{twisted.python.fakepwd} provides a fake implementation of the L{pwd} API.
)ÚListÚOptionalÚUserDatabaseÚShadowDatabasec                   óN   a € ] tR t^t o RtV 3R lR ltV 3R lR ltR tRtV t	R# )	Ú_UserRecordz¹
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.
c                óH   <€ V ^8„  d   QhRS[ RS[ RS[RS[RS[ RS[ RS[ RR	/# )
é   ÚnameÚpasswordÚuidÚgidÚgecosÚhomeÚshellÚreturnN©ÚstrÚint)ÚformatÚ__classdict__s   "€Ú8/usr/lib/python3/dist-packages/twisted/python/fakepwd.pyÚ__annotate__Ú_UserRecord.__annotate__   s[   ø€ ÷ ñ áðñ ðñ ð	ñ
 ðñ ðñ ðñ ðð 
ñó    c                óZ   € Wn         W n        W0n        W@n        WPn        W`n        Wpn        R # ©N©Úpw_nameÚ	pw_passwdÚpw_uidÚpw_gidÚpw_gecosÚpw_dirÚpw_shell)Úselfr
   r   r   r   r   r   r   s   &&&&&&&&r   Ú__init__Ú_UserRecord.__init__   s'   € ð ŒØ!ŒØŒØŒØŒØŒØŽr   c                ó    <€ V ^8„  d   QhRS[ /# ©r	   r   ©r   )r   r   s   "€r   r   r   '   ó   ø€ ÷ ñ ™ñ r   c                ó   € ^# )é   © ©r%   s   &r   Ú__len__Ú_UserRecord.__len__'   ó   € Ùr   c                ó®   € V P                   V P                  V P                  V P                  V P                  V P
                  V P                  3V,          # 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    N©
Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r&   r0   r6   Ú__static_attributes__Ú__classdictcell__©r   s   @r   r   r      s(   ø‡ € ñ÷ð ÷$ð ÷	ð 	r   r   c                   ó–   a € ] tR t^6t o RtRtRtV 3R lR ltRV 3R lR lltV 3R	 lR
 lt	V 3R lR lt
V 3R lR ltV 3R ltRtV tR# )r   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.
iu'  iêN  c                ó   <€ V ^8„  d   QhRR/# ©r	   r   Nr.   )r   r   s   "€r   r   ÚUserDatabase.__annotate__C   ó   ø€ ÷ ñ ˜$ñ r   c                ó   € . V n         R # r   ©Ú_usersr/   s   &r   r&   ÚUserDatabase.__init__C   ó	   € ØˆŽr   Nc                óh   <€ V ^8„  d   QhRS[ RS[ RS[S[,          RS[S[,          RS[ RS[ RS[ RR	/# )
r	   Úusernamer   r   r   r   r   r   r   N)r   r   r   )r   r   s   "€r   r   rD   F   sc   ø€ ÷ )$ñ )$áð)$ñ ð)$ñ ‘c�]ð	)$ñ
 ‘c�]ð)$ñ ð)$ñ ð)$ñ ð)$ð 
ñ)$r   c           	     óü   € Vf&   V P                   pV ;P                   ^,          un         Vf&   V P                  pV ;P                  ^,          un        \        WW4WVV4      pV P                  P	                  V4       R# )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)Ú_lastUIDÚ_lastGIDr   rH   Úappend)	r%   rL   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                ó&   <€ V ^8„  d   QhRS[ RS[/# )r	   r   r   )r   r   )r   r   s   "€r   r   rD   q   s   ø€ ÷ ñ ™Cð ¡Kñ r   c                óf   € V P                    F  pVP                  V8X  g   K  Vu # 	  \        4       h)z8
Return the user record corresponding to the given uid.
)rH   r    ÚKeyError)r%   r   Úentrys   && r   ÚgetpwuidÚUserDatabase.getpwuidq   s-   € ð —[”[ˆEØ�|‰|˜sÖ"Ø’ñ !ô ‹jÐr   c                ó&   <€ V ^8„  d   QhRS[ RS[/# )r	   r
   r   )r   r   )r   r   s   "€r   r   rD   z   s   ø€ ÷ 	ñ 	™Sð 	¡[ñ 	r   c                óÀ   € \        V\        4      '       g   \        R\        V4       24      hV P                   F  pVP
                  V8X  g   K  Vu # 	  \        4       h)z=
Return the user record corresponding to the given username.
z%getpwuam() argument must be str, not )Ú
isinstancer   Ú	TypeErrorÚtyperH   r   rV   )r%   r
   rW   s   && r   ÚgetpwnamÚUserDatabase.getpwnamz   sQ   € ô ˜$¤×$Ò$ÜÐCÄDÈÃJÀ<ÐPÓQÐQØ—[”[ˆEØ�}‰} Ö$Ø’ñ !ô ‹jÐr   c                ó0   <€ V ^8„  d   QhRS[ S[,          /# r)   )r   r   )r   r   s   "€r   r   rD   …   s   ø€ ÷ ñ ™$™{Õ+ñ r   c                ó   € V P                   # )z$
Return a list of all user records.
rG   r/   s   &r   ÚgetpwallÚUserDatabase.getpwall…   ó   € ð �{‰{Ðr   c                óN   <€ V ^8„  d   Qh/ S[ S[,          ;R&   S[;R&   S[;R&   # )r	   rH   rN   rO   )r   r   r   )r   r   s   "€r   r   rD   6   s1   ø‡ ‚ ñ ‘ÕÑñ ñ Ññ ñ Ñò r   rG   )r   NNÚ rg   z/bin/sh)r9   r:   r;   r<   r=   rN   rO   r&   rR   rX   r_   rc   Ú__annotate_func__r>   r?   r@   s   @r   r   r   6   sQ   ø‡ € ñð €HØ€H÷ð ÷)$ò )$÷Vð ÷	ð 	÷ð ÷_ ƒ r   c                   óN   a € ] tR t^Œt o RtV 3R lR ltV 3R lR ltR tRtV t	R# )	Ú_ShadowRecordzª
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.
c                óT   <€ V ^8„  d   QhRS[ RS[ RS[RS[RS[RS[RS[RS[R	S[R
R/
# ©r	   rL   r   Ú
lastChangeÚminÚmaxÚwarnÚinactÚexpireÚflagr   Nr   )r   r   s   "€r   r   Ú_ShadowRecord.__annotate__“   so   ø€ ÷ ñ áðñ ðñ ð	ñ
 ðñ ðñ ðñ ðñ ðñ ðð 
ñr   c
                ór   € Wn         W n        W0n        W@n        WPn        W`n        Wpn        W€n        W�n        R # r   ©	Úsp_namÚsp_pwdÚ	sp_lstchgÚsp_minÚsp_maxÚsp_warnÚsp_inactÚ	sp_expireÚsp_flag©
r%   rL   r   rm   rn   ro   rp   rq   rr   rs   s
   &&&&&&&&&&r   r&   Ú_ShadowRecord.__init__“   s1   € ð ŒØŒØ#ŒØŒØŒØŒØŒØŒØŽr   c                ó    <€ V ^8„  d   QhRS[ /# r)   r*   )r   r   s   "€r   r   rt   ©   r+   r   c                ó   € ^	# )é	   r.   r/   s   &r   r0   Ú_ShadowRecord.__len__©   r2   r   c           	     óÚ   € V P                   V P                  V P                  V P                  V P                  V P
                  V P                  V P                  V P                  3	V,          # r   rv   r4   s   &&r   r6   Ú_ShadowRecord.__getitem__¬   sU   € à�K‰KØ�K‰KØ�N‰NØ�K‰KØ�K‰KØ�L‰LØ�M‰MØ�N‰NØ�L‰Lð

ð õ
ð 
	r   )	r~   r   r}   ry   r{   rz   rw   rx   r|   Nr8   r@   s   @r   rj   rj   Œ   s(   ø‡ € ñ÷ð ÷,ð ÷ð r   rj   c                   ól   a € ] tR t^ºt o RtV 3R lR ltV 3R lR ltV 3R lR ltR tV 3R	 lt	R
t
V tR# )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
c                ó   <€ V ^8„  d   QhRR/# rC   r.   )r   r   s   "€r   r   ÚShadowDatabase.__annotate__Ç   rE   r   c                ó   € . V n         R # r   rG   r/   s   &r   r&   ÚShadowDatabase.__init__Ç   rJ   r   c                óT   <€ V ^8„  d   QhRS[ RS[ RS[RS[RS[RS[RS[RS[R	S[R
R/
# rl   r   )r   r   s   "€r   r   rŠ   Ê   so   ø€ ÷ ,
ñ ,
áð,
ñ ð,
ñ ð	,
ñ
 ð,
ñ ð,
ñ ð,
ñ ð,
ñ ð,
ñ ð,
ð 
ñ,
r   c
                óV   € V P                   P                  \        WW4WVWxV	4	      4       R# )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)rH   rP   rj   r€   s
   &&&&&&&&&&r   rR   ÚShadowDatabase.addUserÊ   s*   € ðP 	�‰×ÑÜØ J°SÀÈtóö	
r   c                ó&   <€ V ^8„  d   QhRS[ RS[/# )r	   rL   r   )r   rj   )r   r   s   "€r   r   rŠ   ø   s   ø€ ÷ 	!ñ 	!¡ð 	!©ñ 	!r   c                óÂ   € \        V\        4      '       g   \        R\        V4       24      hV P                   F  pVP
                  V8X  g   K  Vu # 	  \        V4      h)zD
Return the shadow user record corresponding to the given username.
z%getspnam() argument must be str, not )r\   r   r]   r^   rH   rw   rV   )r%   rL   rW   s   && r   ÚgetspnamÚShadowDatabase.getspnamø   sU   € ô ˜(¤C×(Ò(ÜÐCÄDÈÃNÐCSÐTÓUÐUØ—[”[ˆEØ�|‰|˜xÖ'Ø’ñ !ô �xÓ Ð r   c                ó   € V P                   # )z+
Return a list of all shadow user records.
rG   r/   s   &r   ÚgetspallÚShadowDatabase.getspall  re   r   c                ó6   <€ V ^8„  d   Qh/ S[ S[,          ;R&   # )r	   rH   )r   rj   )r   r   s   "€r   r   rŠ   º   s   ø‡ ‚ ñ ‘ÕÑò r   rG   N)r9   r:   r;   r<   r=   r&   rR   r’   r•   rh   r>   r?   r@   s   @r   r   r   º   s6   ø‡ € ñ÷ð ÷,
ð ,
÷\	!ð 	!ò÷S ƒ r   N)	r=   Útypingr   r   Ú__all__r   r   rj   r   r.   r   r   Ú<module>rš      sI   ðñ
÷ "àÐ+Ð
,€÷%ñ %÷PSñ S÷l+ñ +÷\Mó Mr   