From 66f77c4ebfa66221abcf611b4d222fc424987f12 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 5 Jun 2006 23:22:22 +0000 Subject: 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 8455aafb1547ae843b066db716a892fda14438b4) --- source4/lib/ldb/modules/objectclass.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'source4/lib') diff --git a/source4/lib/ldb/modules/objectclass.c b/source4/lib/ldb/modules/objectclass.c index 6c50ba19c8..efe93be3d4 100644 --- a/source4/lib/ldb/modules/objectclass.c +++ b/source4/lib/ldb/modules/objectclass.c @@ -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); -- cgit