%PDF- %PDF-
| Direktori : /lib/python3/dist-packages/samba/kcc/__pycache__/ |
| Current File : //lib/python3/dist-packages/samba/kcc/__pycache__/__init__.cpython-312.pyc |
�
�I�d�� � �R � d dl Z d dlZd dlmZ d dlZd dlmZmZ d dlmZm Z m
Z
d dlmZ d dl
mZ d dlmZmZ d dlmZmZmZmZ d d lmZmZmZmZ d d
lmZmZmZ d dlmZ d dl m!Z! d d
l"m#Z# d dl$m%Z% d dlm&Z&m'Z' d dlm(Z( d dl)m*Z*m+Z+m,Z, d dl$m-Z- d dl.m/Z/ d� Z0d� Z1 G d� de2� Z3y)� N)�
cmp_to_key)�unix2nttime�nttime2unix)�ldb�dsdb� drs_utils)�system_session)�SamDB)�drsuapi�misc)�Site� Partition� Transport�SiteLink)� NCReplica�NCType�
nctype_lut� GraphNode)�
RepsFromTo�KCCError�KCCFailedObject)�convert_schedule_to_repltimes)�ndr_pack)�verify_and_dot)�ldif_import_export)�setup_graph�get_spanning_tree_edges)�Vertex)�DEBUG�DEBUG_FN�logger)�debug)�cmpc �� � | j � r|j � sy| j � s|j � ryt t | j � t |j � � S )a Helper to sort DSAs by guid global catalog status
GC DSAs come before non-GC DSAs, other than that, the guids are
sorted in NDR form.
:param dsa1: A DSA object
:param dsa2: Another DSA
:return: -1, 0, or 1, indicating sort order.
���� )�is_gcr# r �dsa_guid)�dsa1�dsa2s �4/usr/lib/python3/dist-packages/samba/kcc/__init__.py�sort_dsa_by_gc_and_guidr, 2 sK � � �z�z�|�D�J�J�L���:�:�<�D�J�J�L���x��
�
�&�����(?�@�@� c � � y)z�Can the KCC use SMTP replication?
Currently always returns false because Samba doesn't implement
SMTP transfer for NC changes between DCs.
:return: Boolean (always False)
F� r/ r- r+ �is_smtp_replication_availabler0 C s � � r- c � � e Zd ZdZ d+d�Zd� Zd� Zd� Zd� Zd� Z d � Z
d
� Zd,d�Zd� Z
d
� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd,d�Zd,d�Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z d � Z!d-d!�Z"d"� Z#d#� Z$d$� Z%d%� Z&d.d&�Z'd/d'�Z( d0d(�Z)d,d)�Z*d*� Z+y)1�KCCa; The Knowledge Consistency Checker class.
A container for objects and methods allowing a run of the KCC. Produces a
set of connections in the samdb for which the Distributed Replication
Service can then utilize to replicate naming contexts
:param unix_now: The putative current time in seconds since 1970.
:param readonly: Don't write to the database.
:param verify: Check topological invariants for the generated graphs
:param debug: Write verbosely to stderr.
:param dot_file_dir: write diagnostic Graphviz files in this directory
Nc � � i | _ i | _ d| _ i | _ i | _ i | _ | j
j | _ | j j | _ i | _ t � | _ t � | _ d| _
d| _ d| _ d| _ d| _ || _ t'