File: //lib/python3/dist-packages/samba/netcmd/__pycache__/forest.cpython-310.pyc
o
�/a4 � @ s� d dl Z d dlmZ d dlmZ d dlmZ d dlm Z m
Z
mZmZ G dd� de �Z
G dd� de �ZG d d
� d
e
�ZG dd� de�ZG d
d� de�ZG dd� de�ZdS )� N)�system_session)�SamDB)�Command�CommandError�SuperCommand�Optionc @ sF e Zd ZdZdZejejejd�Z e
dddeddd �gZd
dd�Z
d
S )�cmd_forest_showz�Display forest settings.
These settings control the behaviour of all domain controllers in this
forest. This displays those settings from the replicated configuration
partition.
z%prog [options]�� sambaopts�versionopts�credopts�-H�--URL�%LDB URL for database or target server�URL�H��help�type�metavar�destNc
C s� |� � }|�|�}t|t� ||d�}|�� }d| j|f } |j| tj| j d�}
|
d }| j
�d| � | j D ]#}z| j
�d||| d f � W q6 tyY | j
�d| � Y q6w d S )N��url�session_info�credentials�lp�%s,%s)�base�scope�attrsr zSettings for %s
z%s: %s
z%s: <NO VALUE>
)
�get_loadparm�get_credentialsr r � domain_dn�objectdn�search�ldb�
SCOPE_BASE�
attributes�outf�write�KeyError)
�selfr r r
r r �creds�samdbr"