Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/test/__pycache__/test_spwd.cpython-38.opt-2.pyc
U

>��g�
�@s�ddlZddlZddlmZe�d�Ze�eed�o>e��dkd�Gdd�dej	��Z
e�eed�one��dkd�Gd	d
�d
ej	��Zedkr�e�
�dS)�N)�support�spwd�geteuidzroot privileges requiredc@seZdZdd�Zdd�ZdS)�TestSpwdRootcCs0t��}|�|t�|D]}|�|tj�qdS)N)r�getspall�assertIsInstance�list�struct_spwd)�self�entries�entry�r
�-/opt/cppython/lib/python3.8/test/test_spwd.py�
test_getspallszTestSpwdRoot.test_getspallc	Cst��}|s|�d�|dj}t�|�}|�|tj�|�|j|�|�|j|d�|�|j|j�|�|j	t
�|�|j	|d�|�|j	|j�|�|jt
�|�|j|d�|�|jt
�|�|j|d�|�|jt
�|�|j|d�|�|jt
�|�|j|d�|�|jt
�|�|j|d�|�|jt
�|�|j|d	�|�|jt
�|�|j|d
�|�t��}t�d�W5QRX|�t
|j�d�|�ttj�|�ttjd�|�ttj|d�zt�|�}Wntk
�r�YnX|�ttj|�dS)
Nzempty shadow password databaser��������zinvalid user namez'getspnam(): name not found')rr�skipTestZsp_namp�getspnamrr	ZassertEqualZsp_namZsp_pwdp�strZsp_pwdZ	sp_lstchg�intZsp_minZsp_maxZsp_warnZsp_inactZ	sp_expireZsp_flag�assertRaises�KeyError�	exception�	TypeError�os�fsencode�UnicodeEncodeError)r
rZrandom_namerZcxZ
bytes_namer
r
r�
test_getspnamsJ


zTestSpwdRoot.test_getspnamN)�__name__�
__module__�__qualname__rr#r
r
r
rrsrznon-root user requiredc@seZdZdd�ZdS)�TestSpwdNonRootc
Csbd}z$|�t��}t�|�W5QRXWn4tk
r\}z|�d||f�W5d}~XYnXdS)N�binzspwd entry %r doesn't exist: %s)r�PermissionErrorrrrr)r
�name�cm�excr
r
r�test_getspnam_exception?sz'TestSpwdNonRoot.test_getspnam_exceptionN)r$r%r&r-r
r
r
rr';sr'�__main__)r Zunittest�testr�
import_modulerZ
skipUnless�hasattrrZTestCaserr'r$�mainr
r
r
r�<module>s
�1�

F1le Man4ger