summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-17 15:32:48 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-19 17:53:15 +0200
commit04890bb750ba900e8ee476690e8f882676217c72 (patch)
tree7d3af5b64c5df07dff15138d3b9a81eb3e108f1c /source4/dsdb/samdb
parent9da8b06112257f87860e31273c9d3128bc811371 (diff)
downloadsamba-04890bb750ba900e8ee476690e8f882676217c72.tar.gz
samba-04890bb750ba900e8ee476690e8f882676217c72.tar.bz2
samba-04890bb750ba900e8ee476690e8f882676217c72.zip
s4:objectclass LDB module - add an error message when someone tries to add entries without objectclasses
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/objectclass.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/objectclass.c b/source4/dsdb/samdb/ldb_modules/objectclass.c
index 4cbb1897fe..0c0590251c 100644
--- a/source4/dsdb/samdb/ldb_modules/objectclass.c
+++ b/source4/dsdb/samdb/ldb_modules/objectclass.c
@@ -398,9 +398,10 @@ static int objectclass_add(struct ldb_module *module, struct ldb_request *req)
}
}
- /* the objectClass must be specified on add */
- if (ldb_msg_find_element(req->op.add.message,
- "objectClass") == NULL) {
+ /* the various objectclasses must be specified on add operations */
+ if (ldb_msg_find_element(req->op.add.message, "objectClass") == NULL) {
+ ldb_asprintf_errstring(ldb, "objectclass: Cannot add %s, no objectclass specified!",
+ ldb_dn_get_linearized(req->op.add.message->dn));
return LDB_ERR_OBJECT_CLASS_VIOLATION;
}