diff options
author | Douglas Bagnall <douglas.bagnall@catalyst.net.nz> | 2015-03-27 18:12:20 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2015-05-29 11:08:21 +0200 |
commit | 5546f846e26f9110a04210c96a79918fb1b0865f (patch) | |
tree | 8d1190f0209202a843e64184f1abdb86fd1bbf32 /source4/scripting | |
parent | b4e4f8ae3b7e3963a5fe904951ba6024a90c6221 (diff) | |
download | samba-5546f846e26f9110a04210c96a79918fb1b0865f.tar.gz |
KCC: Adds some comments and rearrange translate_ntdsconn()
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/scripting')
-rwxr-xr-x | source4/scripting/bin/samba_kcc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/source4/scripting/bin/samba_kcc b/source4/scripting/bin/samba_kcc index 01d4cb72535..c10c328087d 100755 --- a/source4/scripting/bin/samba_kcc +++ b/source4/scripting/bin/samba_kcc @@ -804,6 +804,8 @@ class KCC(object): :param conn: NTDS Connection ::returns (True || False), source DSA: """ + #XXX different conditions for "implies" than MS-ADTS 6.2.2 + # NTDS Connection must satisfy all the following criteria # to imply a repsFrom tuple is needed: # @@ -940,12 +942,18 @@ class KCC(object): # is a child of the local DC's nTDSDSA object and # (cn!fromServer = s) and (cn!options) does not contain # NTDSCONN_OPT_RODC_TOPOLOGY or NULL if no such (cn) exists. - if cn_conn and not cn_conn.is_rodc_topology(): - cn_conn = None # KCC removes this repsFrom tuple if any of the following # is true: # cn = NULL. + # [...] + + #XXX varying possible interpretations of rodc_topology + if cn_conn is None or cn_conn.is_rodc_topology(): + t_repsFrom.to_be_deleted = True + continue + + # [...] KCC removes this repsFrom tuple if: # # No NC replica of the NC "is present" on DSA that # would be source of replica @@ -955,8 +963,7 @@ class KCC(object): # the source DSA s_rep = s_dsa.get_current_replica(n_rep.nc_dnstr) - if cn_conn is None or \ - s_rep is None or not s_rep.is_present() or \ + if s_rep is None or not s_rep.is_present() or \ (not n_rep.is_ro() and s_rep.is_partial()): t_repsFrom.to_be_deleted = True |