summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/modules
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-06-05 23:22:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:08:53 -0500
commit66f77c4ebfa66221abcf611b4d222fc424987f12 (patch)
treea87c30214caa2d6ea2cba414121418f0e41cb2d4 /source4/lib/ldb/modules
parentd70d6727dd1d7c4ae9dd897d23864665476b3884 (diff)
downloadsamba-66f77c4ebfa66221abcf611b4d222fc424987f12.tar.gz
samba-66f77c4ebfa66221abcf611b4d222fc424987f12.tar.bz2
samba-66f77c4ebfa66221abcf611b4d222fc424987f12.zip
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)
Diffstat (limited to 'source4/lib/ldb/modules')
-rw-r--r--source4/lib/ldb/modules/objectclass.c8
1 files changed, 3 insertions, 5 deletions
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);