summaryrefslogtreecommitdiff
path: root/source4/dsdb/tests
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-08 10:16:45 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-08 10:36:49 +0000
commit4b97e7c8f20b125015417bcf440128f843ac648f (patch)
treea376e4e269a49820aa333dbf4e2b63165642ed8c /source4/dsdb/tests
parent8caf0ed90980d4118878f0cda10eba8004a8dd4d (diff)
downloadsamba-4b97e7c8f20b125015417bcf440128f843ac648f.tar.gz
samba-4b97e7c8f20b125015417bcf440128f843ac648f.tar.bz2
samba-4b97e7c8f20b125015417bcf440128f843ac648f.zip
s4:objectguid/repl_meta_data LDB module - deny "objectGUID" updates
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Mon Nov 8 10:36:50 UTC 2010 on sn-devel-104
Diffstat (limited to 'source4/dsdb/tests')
-rwxr-xr-xsource4/dsdb/tests/python/ldap.py12
1 files changed, 12 insertions, 0 deletions
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):