| Server IP : 118.27.122.248 / Your IP : 216.73.216.15 Web Server : Apache System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64 User : c9415830 ( 11735) PHP Version : 8.4.17 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/alt/python36/lib64/python3.6/test/__pycache__/ |
Upload File : |
3 �w2_� � @ s� d dl Z d dlZd dlmZ ejd�Zejee d�o>e j� d kd�G dd� dej ��Z ejee d�one j� d kd�G d d � d ej ��Zedkr�ej � dS )� N)�support�spwd�geteuidzroot privileges requiredc @ s e Zd Zdd� Zdd� ZdS )�TestSpwdRootc C s4 t j� }| j|t� x|D ]}| j|t j� qW d S )N)r �getspall�assertIsInstance�list�struct_spwd)�self�entries�entry� r �3/opt/alt/python36/lib64/python3.6/test/test_spwd.py� test_getspall s zTestSpwdRoot.test_getspallc C s t j� }|s| jd� |d j}t j|�}| j|t j� | j|j|� | j|j|d � | j|j|j� | j|j t � | j|j |d � | j|j |j� | j|jt � | j|j|d � | j|jt � | j|j|d � | j|jt � | j|j|d � | j|jt � | j|j|d � | j|jt � | j|j|d � | j|jt � | j|j|d � | j|jt � | j|j|d � | jt��}t jd� W d Q R X | jt |j�d� | jtt j� | jtt jd� | jtt j|d� ytj|�}W n tk �r� Y nX | jtt j|� d S ) Nzempty shadow password databaser � � � � � � � � zinvalid user namez'getspnam(): name not found')r r �skipTestZsp_namp�getspnamr r ZassertEqualZsp_namZsp_pwdp�strZsp_pwdZ sp_lstchg�intZsp_minZsp_maxZsp_warnZsp_inactZ sp_expireZsp_flag�assertRaises�KeyErrorZ exception� TypeError�os�fsencode�UnicodeEncodeError)r r Zrandom_namer ZcxZ bytes_namer r r � test_getspnam sJ zTestSpwdRoot.test_getspnamN)�__name__� __module__�__qualname__r r"