%PDF- %PDF-
Direktori : /usr/lib/python3/dist-packages/samba/netcmd/domain/__pycache__/ |
Current File : //usr/lib/python3/dist-packages/samba/netcmd/domain/__pycache__/backup.cpython-312.pyc |
� �I�dl� � �( � d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlm Z d dlmZm Z d dlZd dlmZ d dlmZ d dlmZ d dlmZmZmZ d dlmZ d dlmZmZmZ d d lm Z d d l!m"Z"m#Z# d dl$m%Z%m&Z&m'Z' d dlm(Z( d d l)m*Z* d dl+m,Z,m-Z- d dl.m/Z/ d dl0m1Z1 d dl+m2Z2 d dl3m4Z4 d dl5Z5d dl+m6Z6m7Z7m8Z8 d dl9m:Z:m;Z;m<Z< d dl=m>Z> d dl?m@Z@ d dlAZAd dlBmCZC d dlmDZD d dlEmFZF d dlGmHZH d dlImJZJ d dlmKZL d� ZMd� ZNd� ZOd � ZPd!� ZQ d0d"�ZRd#� ZSd$� ZTd%� ZU G d&� d'ej� j� � ZX G d(� d)e*� ZY G d*� d+ej� j� � ZZ G d,� d-ej� j� � Z[ G d.� d/ej� j� � Z]y)1� N)�SamDB�get_default_backend_store)�LdbError)�libsmb_samba_internal)�param)� backup_online�backup_restore�backup_offline)�system_session)� DCJoinContext� join_clone�DCCloneAndRenameContext)�dom_sid)�Option�CommandError)�misc�security�drsblobs)�Ldb)�cmd_fsmo_seize)�make_smbconf�DEFAULTSITE)�update_krbtgt_account_password)� remove_dc)�secretsdb_self_join)�dbcheck)�guess_names�determine_host_ip�determine_host_ip6)�fill_dns_data_partitions�get_dnsadmins_sid�get_domainguid)�tdb_copy)�mdb_copy)�CalledProcessError)�sites)�_dsdb_load_udv_v2)�ndr_pack)�SMB_SIGNING_REQUIRED)�safe_tarfilec � � | j � }t | j � � }t |� dz t |� z } | j t j d|z g ddg�� }t |� d k7 rt d |z � �t d|�d|d j �d�� �# t $ r3}|j d� |j d� t d|� �d }~ww xY w# t j $ r-}|j \ }} |t j k7 r� Y d }~nd }~ww xY wt |� dz t |� z S )Nz}A SID could not be allocated for restoring the domain. Either no RID Set was found on this DC, or the RID Set was not usable.z�To initialise this DC's RID pools, obtain a RID Set from this domain's RID master, or run samba-tool dbcheck to fix the existing RID Set.zCannot create backup�-�<SID=%s>�show_deleted:1zshow_recycled:1)�scope�base�attrs�controls� z]Cannot create backup - this DC's RID pool is corrupt, the next SID (%s) appears to be in use.zCCannot create backup - this DC's RID pool is corrupt, the next SID z points to existing object r z1. Please run samba-tool dbcheck on the source DC.)� next_free_ridr �infor r �get_domain_sid�str�search�ldb� SCOPE_BASE�len�dn�args�ERR_NO_SUCH_OBJECT) �samdb�logger�rid�err�sid�sid_for_restore�res�e�enum�emsgs �</usr/lib/python3/dist-packages/samba/netcmd/domain/backup.py�get_sid_for_restorerJ @ sX � � 8��!�!�#�� �%�&�&�(� )�C��#�h��n�s�3�x�/�O���l�l���� *�_� <�!#�%5�%6�%8� � 9�� �s�8�q�=�� I� /� /� 0� 0� � ,�S��V�Y�Y� 8� 9� 9��5 � 8���� 5� 6� ��� 3� 4� �1�3�7�7��8��>