s4:objectclass LDB module - simply use "msg" when requesting the message
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Fri, 26 Nov 2010 12:08:27 +0000 (13:08 +0100)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Fri, 26 Nov 2010 12:10:01 +0000 (13:10 +0100)
source4/dsdb/samdb/ldb_modules/objectclass.c

index edc9fabd5c80f13628bc20cd1b57ca76ddc00503..48813e5ac0d04cb3b7305ce6f07ef02fd1f4798f 100644 (file)
@@ -490,8 +490,8 @@ static int objectclass_do_add(struct oc_context *ac)
 
                /* An add operation on partition DNs without "NC-add" operation
                 * isn't allowed. */
-               instanceType = ldb_msg_find_attr_as_uint(ac->req->op.add.message,
-                                                        "instanceType", 0);
+               instanceType = ldb_msg_find_attr_as_uint(msg, "instanceType",
+                                                        0);
                if (!(instanceType & INSTANCE_TYPE_IS_NC_HEAD)) {
                        ldb_asprintf_errstring(ldb, "objectclass: Cannot add %s, parent does not exist!", 
                                               ldb_dn_get_linearized(msg->dn));