mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
s4:objectclass LDB module - add an error message when someone tries to add entries without objectclasses
This commit is contained in:
parent
9da8b06112
commit
04890bb750
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user