Author: abartlet
Date: 2006-06-05 23:22:22 +0000 (Mon, 05 Jun 2006)
New Revision: 16053

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16053

Log:
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

Modified:
   branches/SAMBA_4_0/source/lib/ldb/modules/objectclass.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/modules/objectclass.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/modules/objectclass.c     2006-06-05 
21:51:10 UTC (rev 16052)
+++ branches/SAMBA_4_0/source/lib/ldb/modules/objectclass.c     2006-06-05 
23:22:22 UTC (rev 16053)
@@ -96,12 +96,10 @@
        
        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);

Reply via email to