python (3.11.7)
    eW                        d dl Z d dlZd dlmZ d dlZ ej                    5   ej        de            ej        d          Z	ddd           n# 1 swxY w Y    ej
         ee d          o e j                    d k    d           G d dej
                              Z ej
         ee d          o e j                    d k    d	           G d
 dej
                              Zedk    r ej                     dS dS )
    N)
import_helperignorespwdgeteuidzroot privileges requiredc                       e Zd Zd Zd ZdS )TestSpwdRootc                     t                                           }|                     |t                     |D ]"}|                     |t           j                   #d S )N)r   getspallassertIsInstanceliststruct_spwd)selfentriesentrys      B/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/test/test_spwd.py
test_getspallzTestSpwdRoot.test_getspall   sZ    --//gt,,, 	; 	;E!!%)9::::	; 	;    c                 `   t                                           }|s|                     d           |d         j        }t                               |          }|                     |t           j                   |                     |j        |           |                     |j        |d                    |                     |j        |j                   |                     |j	        t                     |                     |j	        |d                    |                     |j	        |j                   |                     |j        t                     |                     |j        |d                    |                     |j        t                     |                     |j        |d                    |                     |j        t                     |                     |j        |d                    |                     |j        t                     |                     |j        |d                    |                     |j        t                     |                     |j        |d                    |                     |j        t                     |                     |j        |d	                    |                     |j        t                     |                     |j        |d
                    |                     t*                    5 }t                               d           d d d            n# 1 swxY w Y   |                     t          |j                  d           |                     t.          t           j                   |                     t.          t           j        d           |                     t.          t           j        |d           	 t1          j        |          }|                     t.          t           j        |           d S # t4          $ r Y d S w xY w)
Nzempty shadow password databaser                           zinvalid user namez'getspnam(): name not found')r   r
   skipTestsp_nampgetspnamr   r
   assertEqualsp_namsp_pwdpstrsp_pwd	sp_lstchgintsp_minsp_maxsp_warnsp_inact	sp_expiresp_flagassertRaisesKeyError	exception	TypeErrorosfsencodeUnicodeEncodeError)r   r   random_namer   cx
bytes_names         r   
test_getspnamzTestSpwdRoot.test_getspnam   s   --// 	<MM:;;;aj(
k**eT%5666444a111555emS111a111555eos333%(333elC000uQx000elC000uQx000emS111a111enc222q222eos333%(333emS111a111
x
(
( 	/BMM-...	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/R\**,JKKK)T]333)T]A666)T]KCCC	D[11J 
i
CCCCC "