404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.136.22.12: ~ $
3

��X(�@sZddlZddlZddlZddlZddlZddlZddlmZmZm	Z	m
Z
mZmZm
Z
mZmZmZmZmZmZmZmZddlZejdd��Zejdd��Zdd�Zd	d
�Zdd�Zd
d�Zdd�Zdd�Zdd�Z dd�Z!dd�Z"dd�Z#dd�Z$dd�Z%dd �Z&d!d"�Z'd#d$�Z(d%d&�Z)d'd(�Z*d)d*�Z+d+d,�Z,ej-d2k�rBe.Z/ne0Z/d.d/�Z1d0d1�Z2dS)3�N)�booted�is_fifo�_is_fifo�	is_socket�
_is_socket�is_socket_inet�_is_socket_inet�is_socket_unix�_is_socket_unix�is_socket_sockaddr�_is_socket_sockaddr�is_mq�_is_mq�
listen_fds�notifyccsHy
dVWn8tk
rB}z|jtjkr0tj��WYdd}~XnXdS)N)�OSError�errnoZENOSYS�pytest�skip)�e�r�#/usr/lib64/python3.6/test_daemon.py�skip_enosyss
rccs4tj|�}z
|VWd|dj�|dj�XdS)Nr�)�socketZ
socketpair�close)Zfamily�pairrrr�closing_socketpairs


rcCstjjd�rndS)Nz/run/systemd/system)�os�path�existsrrrr�test_booted&sr!cCs.|jd�j}tj|�tj|tjtjB�}dS)Nz	test.fifo)�join�strpath�posix�mkfifor�open�O_RDONLY�
O_NONBLOCK)�tmpdirr�fdrrr�
test__is_fifo.s
r+cCs2|jd�}|jd�|j}tj|tjtjB�}dS)Nz	test.fifo�boo)r"�writer#rr&r'r()r)�filerr*rrr�test__is_fifo_file6s


r/cCs<|jd�j}tjt��WdQRXtjt��WdQRXdS)Nz	test.fifo)r"r#r�raisesr)r)rrrr�test__is_fifo_bad_fd?s

r1cCs:|jd�j}tj|�tj|tjtjB�}tj|d�}dS)Nz	test.fifo�r)	r"r#r$r%rr&r'r(�fdopen)r)rr*r.rrr�test_is_fifoHs

r4cCs>|jd�}|jd�|j}tj|tjtjB�}tj|d�}dS)Nz	test.fifor,r2)r"r-r#rr&r'r(r3)r)r.rr*rrr�test_is_fifo_fileSs

r5cCs<|jd�j}tjt��WdQRXtjt��WdQRXdS)Nz	test.fifo)r"r#rr0r)r)rrrr�test_is_fifo_bad_fd_s

r6cCs.yt|�Stk
r(}zdSd}~XnXdS)NF)r
r)�arg�errorrrr�
is_mq_wrapperhsr9cCs.yt|�Stk
r(}zdSd}~XnXdS)NF)rr)r7r8rrr�_is_mq_wrapperpsr:cCsfttj��R}xJ|D]B}t��WdQRX|j�}t��WdQRXt��WdQRXqWWdQRXdS)N)rr�AF_UNIXr�fileno)r�sockr*rrr�test_no_mismatchxs


r>cCsbttj��N}xF|D]>}x&||j�fD]}t��WdQRXq$Wt��WdQRXqWWdQRXdS)N)rrr;r<r)rr=r7rrr�test_is_socket�s
r?cCCs`tjtjtj����B}|jd�|j�\}}dj|�}�xd	D�]}x�||j�fD]�}t��WdQRXt��WdQRXt��WdQRXt��WdQRXt��WdQRXt	j
t��t|ddd�WdQRXt��WdQRXt��WdQRXqRWt	j
t��t
|ddd�WdQRXt��WdQRXt��WdQRX|jd�q>WWdQRXdS)
N�	127.0.0.1rz:{}ri@�)Zflowinfo�)r@r)rr)�
contextlib�closingrZAF_INET�bindZgetsockname�formatr<rrr0�
ValueErrorrrZlisten)r=ZaddrZportZ	listeningr7rrr�test_is_socket_sockaddr�s:









rGc	Cs0ttj��}x|D]}|j�}qWWdQRXdS)N)rrr;r<)rr=r*rrr�test__is_socket�s
rHc
Cs>ttj��*}x"|D]}x||j�fD]}q$WqWWdQRXdS)N)rrr;r<)rr=r7rrr�test_is_socket_unix�s
rIc	Cs0ttj��}x|D]}|j�}qWWdQRXdS)N)rrr;r<)rr=r*rrr�test__is_socket_unix�s
rJcCstjd�tjd�dS)N�
LISTEN_FDS�
LISTEN_PID)r�unsetenvrrrr�test_listen_fds_no_fds�s

rNcCs dtjd<ttj��tjd<dS)N�3rKrL)r�environ�str�getpidrrrr�test_listen_fds�s
rScCs dtjd<ttj��tjd<dS)N�1rKrL)rrPrQrRrrrr�test_listen_fds_default_unset�s
rUc	Cst��WdQRXdS)N)rrrrr�test_notify_no_sockets
rV�c/Cs�dtjd<tjt��td�WdQRXtjt��$t��tdgd�WdQRXWdQRXtjt��tdddgd�WdQRXtjt��tdtj�d�WdQRXtjt��tdtj�d
d	�WdQRXdS)Nz	/dev/null�
NOTIFY_SOCKETzREADY=1z	FDSTORE=1)�fdsr�)�pid)r[rY)r)rrPrr0�connection_errorrrrRrrrr�test_notify_bad_sockets
 r]cCs�|jd�j}tjtjtj�}y|j|�Wn2tjk
r\}ztjd|�WYdd}~XnXt	tdd�}|j
tj|d�|tj
d<t��WdQRXdS)Nrzfailed to bind socket (%s)�SO_PASSCRED�rrX)r"r#rr;Z
SOCK_DGRAMrDr8rZxfail�getattrZ
setsockoptZ
SOL_SOCKETrrPr)r)rr=rr^rrr�test_notify_with_sockets 

ra)rW)3�sysrr$rrBrZsystemd.daemonrrrrrrrr	r
rrr
rrrr�contextmanagerrrr!r+r/r1r4r5r6r9r:r>r?rGrHrIrJrNrSrUrV�version_info�ConnectionRefusedErrorr\rr]rarrrr�<module>sBD
	
			&			

Filemanager

Name Type Size Permission Actions
test_daemon.cpython-36.opt-1.pyc File 6.28 KB 0644
test_daemon.cpython-36.pyc File 8.57 KB 0644
test_journal.cpython-36.opt-1.pyc File 9.19 KB 0644
test_journal.cpython-36.pyc File 10.7 KB 0644
test_login.cpython-36.opt-1.pyc File 1.43 KB 0644
test_login.cpython-36.pyc File 1.56 KB 0644