diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-11-07 20:09:51 +0100 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-11-07 21:30:16 +0100 |
commit | 2c76be76d5edad69c2daf5999266dddcbc2d1270 (patch) | |
tree | 5601682b4b4fa8914b777b8ccd690ff34113e7a7 /source4 | |
parent | c89bc8394d1a8b64cb211346c1de7e382f738a9e (diff) | |
download | samba-2c76be76d5edad69c2daf5999266dddcbc2d1270.tar.gz samba-2c76be76d5edad69c2daf5999266dddcbc2d1270.tar.bz2 samba-2c76be76d5edad69c2daf5999266dddcbc2d1270.zip |
s4:objectguid LDB module - objectGUIDs cannot be specified on add operations
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/objectguid.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/objectguid.c b/source4/dsdb/samdb/ldb_modules/objectguid.c index 28d253a0d1..497ef1863b 100644 --- a/source4/dsdb/samdb/ldb_modules/objectguid.c +++ b/source4/dsdb/samdb/ldb_modules/objectguid.c @@ -128,6 +128,7 @@ static int objectguid_add(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; struct GUID guid; uint64_t seq_num; int ret; @@ -143,8 +144,11 @@ static int objectguid_add(struct ldb_module *module, struct ldb_request *req) return ldb_next_request(module, req); } - if (ldb_msg_find_element(req->op.add.message, "objectGUID") != NULL) { - return ldb_next_request(module, req); + el = ldb_msg_find_element(req->op.add.message, "objectGUID"); + if (el != NULL) { + ldb_set_errstring(ldb, + "objectguid: objectGUID must not be specified!"); + return LDB_ERR_UNWILLING_TO_PERFORM; } ac = talloc(req, struct og_context); |