tests: Add corner-case test: fromServer points to dead server
authorTim Beale <timbeale@catalyst.net.nz>
Fri, 28 Sep 2018 00:35:35 +0000 (12:35 +1200)
committerDouglas Bagnall <dbagnall@samba.org>
Fri, 12 Oct 2018 02:16:22 +0000 (04:16 +0200)
commitdec3eda1f74f5bf7ea91c1be3d5dfd832e9672b9
treebd51124bf77299296c06319fb2407360edb63097
parent1139a4a6a0fedfbbc7a7d822e845927c6af52905
tests: Add corner-case test: fromServer points to dead server

The fromServer attribute is slightly unique, in that it's a DN (similar
to a one-way link), but it is also a mandatory attribute.

Currently, if fromServer gets a bad value (i.e. a dead server that has
been expunged), the DSDB rejects any attempts to modify the associated
nTDSConnection object (regardless of whether or not you're actually
changing the fromServer attribute).

This patch adds a test-case that demonstrates how the DB can get into
such a state.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13621

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
selftest/knownfail.d/attr_from_server [new file with mode: 0644]
source4/dsdb/tests/python/attr_from_server.py [new file with mode: 0644]
source4/selftest/tests.py