File: //lib/python3/dist-packages/samba/tests/__pycache__/auth_log_netlogon.cpython-310.pyc
o
�/a� � @ s� d Z ddlZddlZddlmZ ddlZddlmZ ddl m
Z
ddlmZ ddl
mZ ddlmZ dd lmZmZ dd
lmZ ddlmZmZ G dd
� d
ejjj�ZdS )a0
Tests that exercise the auth logging for a successful netlogon attempt
NOTE: As the netlogon authentication is performed once per session,
there is only one test in this routine. If another test is added
only the test executed first will generate the netlogon auth message
� N)�SamDB)�Credentials)�netlogon)�AS_SYSTEM_MAGIC_PATH_TOKEN)�system_session)�delete_force)�UF_WORKSTATION_TRUST_ACCOUNT�UF_PASSWD_NOTREQD)�SEC_CHAN_WKSTA)�EVT_ID_SUCCESSFUL_LOGON�EVT_LOGON_NETWORKc s@ e Zd Z� fdd�Z� fdd�Zdd� Zdd� Zd d
� Z� ZS )�AuthLogTestsNetLogonc s� t t| ��� tj�� | _t� | _t | j| jd�| _
tjd | _
d| _d| _t| _| j
�� | _d| j| jf | _d| j d �d�}| j
�| jdd | j tttB �|d
�� d S )N)�session_info�lp�DOMAIN�NetLogonGood�
abcdefghijzcn=%s,cn=users,%s�"z utf-16-le�computerz%s$)�dn�objectclass�sAMAccountName�userAccountControl�
unicodePwd)�superr
�setUp�samba�tests�env_loadparmr r �sessionr �ldb�os�environ�domain�netbios_name�machinepassr �
remoteAddress� domain_dn�base_dnr �encode�add�strr r )�self�utf16pw�� __class__� �?/usr/lib/python3/dist-packages/samba/tests/auth_log_netlogon.pyr . s* �
�zAuthLogTestsNetLogon.setUpc s t t| ��� t| j| j� d S )N)r r
�tearDownr r r �r, r. r0 r1 r2 F s zAuthLogTestsNetLogon.tearDownc C s� dd� }|rd| }nd}t � }|�| �� � |�t� |�| j� |�| jd � t � d| | �� |�}| �
||�}||� d S )Nc S s<