diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-10-16 12:28:25 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-10-16 11:24:09 +0000 |
commit | d7ca757b315181c678d4f874294f72b1114f3dad (patch) | |
tree | 7e8ac16e5fe8eb636f1ff32aa1f70fc06a1e0c33 /source4/dsdb/tests/python | |
parent | 88e5375ad3d0386371b19d0d3b851d7974afdcdb (diff) | |
download | samba-d7ca757b315181c678d4f874294f72b1114f3dad.tar.gz samba-d7ca757b315181c678d4f874294f72b1114f3dad.tar.bz2 samba-d7ca757b315181c678d4f874294f72b1114f3dad.zip |
s4:objectclass LDB module - implement the "isCriticalSystemObject" subtree delete protection
MS-ADTS 3.1.1.5.5.7.2
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sat Oct 16 11:24:09 UTC 2010 on sn-devel-104
Diffstat (limited to 'source4/dsdb/tests/python')
-rwxr-xr-x | source4/dsdb/tests/python/deletetest.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/source4/dsdb/tests/python/deletetest.py b/source4/dsdb/tests/python/deletetest.py index 2b0372db65..59ebf99c70 100755 --- a/source4/dsdb/tests/python/deletetest.py +++ b/source4/dsdb/tests/python/deletetest.py @@ -181,6 +181,7 @@ class BasicDeleteTests(unittest.TestCase): attrs=["dsServiceName", "dNSHostName"]) self.assertEquals(len(res), 1) + # Delete failing since DC's nTDSDSA object is protected try: ldb.delete(res[0]["dsServiceName"][0]) self.fail() @@ -191,6 +192,7 @@ class BasicDeleteTests(unittest.TestCase): expression="(&(objectClass=computer)(dNSHostName=" + res[0]["dNSHostName"][0] + "))") self.assertEquals(len(res), 1) + # Deletes failing since DC's rIDSet object is protected try: ldb.delete(res[0]["rIDSetReferences"][0]) self.fail() @@ -202,6 +204,8 @@ class BasicDeleteTests(unittest.TestCase): except LdbError, (num, _): self.assertEquals(num, ERR_UNWILLING_TO_PERFORM) + # Deletes failing since three main crossRef objects are protected + try: ldb.delete("cn=Enterprise Schema,cn=Partitions," + self.configuration_dn) self.fail() @@ -239,8 +243,6 @@ class BasicDeleteTests(unittest.TestCase): except LdbError, (num, _): self.assertEquals(num, ERR_NOT_ALLOWED_ON_NON_LEAF) - # Performs some "systemFlags" testing - # Delete failing since "SYSTEM_FLAG_DISALLOW_DELETE" try: ldb.delete("CN=Users," + self.base_dn) @@ -248,6 +250,13 @@ class BasicDeleteTests(unittest.TestCase): except LdbError, (num, _): self.assertEquals(num, ERR_UNWILLING_TO_PERFORM) + # Tree-delete failing since "isCriticalSystemObject" + try: + ldb.delete("CN=Computers," + self.base_dn, ["tree_delete:1"]) + self.fail() + except LdbError, (num, _): + self.assertEquals(num, ERR_UNWILLING_TO_PERFORM) + def test_all(self): """Basic delete tests""" |