diff options
author | Tim Beale <timbeale@catalyst.net.nz> | 2017-09-27 11:21:48 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2017-10-20 08:01:35 +0200 |
commit | da8af833cfd2f3368d386621a0dd4e68dccb7a90 (patch) | |
tree | 20d8bfe6668debd8c321057f31ec18d7d3364d8f /source4/torture/drs | |
parent | 9b3b09ce41b2ef4989656e4b6304e62be5f3095f (diff) | |
download | samba-da8af833cfd2f3368d386621a0dd4e68dccb7a90.tar.gz |
selftest: Print link meta-data when developer debugging is used
For Windows, DRS is the only way to see the RMD_VERSION of a link, or to
tell what inactive links the DC. Add some debug to display this
information. By default, this debug is turned off.
Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Oct 20 08:01:35 CEST 2017 on sn-devel-144
Diffstat (limited to 'source4/torture/drs')
-rw-r--r-- | source4/torture/drs/python/drs_base.py | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/source4/torture/drs/python/drs_base.py b/source4/torture/drs/python/drs_base.py index c2760e2cadf..10f2e63ae3b 100644 --- a/source4/torture/drs/python/drs_base.py +++ b/source4/torture/drs/python/drs_base.py @@ -253,10 +253,22 @@ class DrsBaseTestCase(SambaToolCmdTest): next_object = next_object.next_object print("Linked Attributes: %d" % ctr6.linked_attributes_count) - ctr6_links = self._get_ctr6_links(ctr6) - for link in ctr6_links: + for lidx in range(0, ctr6.linked_attributes_count): + l = ctr6.linked_attributes[lidx] + try: + target = ndr_unpack(drsuapi.DsReplicaObjectIdentifier3, + l.value.blob) + except: + target = ndr_unpack(drsuapi.DsReplicaObjectIdentifier3Binary, + l.value.blob) + print("Link Tgt %s... <-- Src %s" - %(link.targetDN[:25], link.identifier)) + %(target.dn[:25], l.identifier.guid)) + state = "Del" + if l.flags & drsuapi.DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE: + state = "Act" + print(" v%u %s changed %u" %(l.meta_data.version, state, + l.meta_data.originating_change_time)) print("HWM: %d" %(ctr6.new_highwatermark.highest_usn)) print("Tmp HWM: %d" %(ctr6.new_highwatermark.tmp_highest_usn)) |