struct ldb_context *ldb = ldb_module_get_ctx(module);
const struct dsdb_schema *schema;
unsigned int i;
- const struct GUID *guid;
+ const struct dsdb_class *objectclass;
uint32_t access_granted;
NTSTATUS status;
struct ldb_result *acl_res;
goto success;
}
- guid = get_oc_guid_from_message(schema, acl_res->msgs[0]);
- if (!guid) {
+ objectclass = dsdb_get_structural_oc_from_msg(schema, acl_res->msgs[0]);
+ if (!objectclass) {
talloc_free(tmp_ctx);
return ldb_error(ldb, LDB_ERR_OPERATIONS_ERROR,
- "acl_modify: Error retrieving object class GUID.");
+ "acl_modify: Error retrieving object class for GUID.");
}
sid = samdb_result_dom_sid(req, acl_res->msgs[0], "objectSid");
for (i=0; i < msg->num_elements; i++) {
req,
sd,
sid,
- guid,
+ &objectclass->schemaIDGUID,
attr);
if (ret != LDB_SUCCESS) {
goto fail;
req,
sd,
sid,
- guid,
+ &objectclass->schemaIDGUID,
userPassword);
if (ret != LDB_SUCCESS) {
goto fail;
req,
sd,
sid,
- guid,
+ &objectclass->schemaIDGUID,
attr);
if (ret != LDB_SUCCESS) {
goto fail;
struct object_tree *root = NULL;
struct object_tree *new_node = NULL;
- if (!insert_in_object_tree(tmp_ctx, guid, SEC_ADS_WRITE_PROP,
+ if (!insert_in_object_tree(tmp_ctx,
+ &objectclass->schemaIDGUID,
+ SEC_ADS_WRITE_PROP,
&root, &new_node)) {
talloc_free(tmp_ctx);
return ldb_error(ldb, LDB_ERR_OPERATIONS_ERROR,