summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/objectguid.c
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/samdb/ldb_modules/objectguid.c
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/samdb/ldb_modules/objectguid.c')
-rw-r--r--source4/dsdb/samdb/ldb_modules/objectguid.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/objectguid.c b/source4/dsdb/samdb/ldb_modules/objectguid.c
index f21660c4ae..bc3260cf0d 100644
--- a/source4/dsdb/samdb/ldb_modules/objectguid.c
+++ b/source4/dsdb/samdb/ldb_modules/objectguid.c
@@ -185,6 +185,7 @@ static int objectguid_modify(struct ldb_module *module, struct ldb_request *req)
struct ldb_context *ldb;
struct ldb_request *down_req;
struct ldb_message *msg;
+ struct ldb_message_element *el;
int ret;
time_t t = time(NULL);
uint64_t seq_num;
@@ -199,6 +200,13 @@ static int objectguid_modify(struct ldb_module *module, struct ldb_request *req)
return ldb_next_request(module, req);
}
+ el = ldb_msg_find_element(req->op.mod.message, "objectGUID");
+ if (el != NULL) {
+ ldb_set_errstring(ldb,
+ "objectguid: objectGUID must not be specified!");
+ return LDB_ERR_CONSTRAINT_VIOLATION;
+ }
+
ac = talloc(req, struct og_context);
if (ac == NULL) {
return ldb_oom(ldb);