From 4b97e7c8f20b125015417bcf440128f843ac648f Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Mon, 8 Nov 2010 10:16:45 +0100 Subject: s4:objectguid/repl_meta_data LDB module - deny "objectGUID" updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Autobuild-User: Matthias Dieter Wallnöfer Autobuild-Date: Mon Nov 8 10:36:50 UTC 2010 on sn-devel-104 --- source4/dsdb/tests/python/ldap.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source4/dsdb/tests/python') diff --git a/source4/dsdb/tests/python/ldap.py b/source4/dsdb/tests/python/ldap.py index 26969cca3c..833e141b7d 100755 --- a/source4/dsdb/tests/python/ldap.py +++ b/source4/dsdb/tests/python/ldap.py @@ -1324,6 +1324,18 @@ objectGUID: bd3480c9-58af-4cd8-92df-bc4a18b6e44d self.assertTrue("whenCreated" in res[0]) self.assertTrue("whenChanged" in res[0]) + # The objectGUID cannot directly be changed + try: + self.ldb.modify_ldif(""" +dn: cn=ldaptestcontainer,""" + self.base_dn + """ +changetype: modify +replace: objectGUID +objectGUID: bd3480c9-58af-4cd8-92df-bc4a18b6e44d +""") + self.fail() + except LdbError, (num, _): + self.assertEquals(num, ERR_CONSTRAINT_VIOLATION) + self.delete_force(self.ldb, "cn=ldaptestcontainer," + self.base_dn) def test_parentGUID(self): -- cgit