1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

r16053: Allow entries without an objectClass. We need this to permit the

cn=rootDSE entry.

(it was also crashing, as 'ac' wasn't initialised at this point)

Andrew Bartlett
(This used to be commit 8455aafb15)
This commit is contained in:
Andrew Bartlett 2006-06-05 23:22:22 +00:00 committed by Gerald (Jerry) Carter
parent d70d6727dd
commit 66f77c4ebf

View File

@ -96,12 +96,10 @@ static int objectclass_add(struct ldb_module *module, struct ldb_request *req)
objectClassAttr = ldb_msg_find_element(req->op.add.message, "objectClass");
/* If no part of this touches the objectClass, then we don't
* need to make any changes. */
/* If the only operation is the deletion of the objectClass then go on */
/* If no part of this add has an objectClass, then we don't
* need to make any changes. cn=rootdse doesn't have an objectClass */
if (!objectClassAttr) {
ldb_set_errstring(module->ldb, talloc_asprintf(ac, "Object class violation: no objectClass present"));
return LDB_ERR_OBJECT_CLASS_VIOLATION;
return ldb_next_request(module, req);
}
h = oc_init_handle(req, module);