dsdb-acl: give error string if we can not obtain the schema
authorAndrew Bartlett <abartlet@samba.org>
Thu, 3 Jan 2013 10:31:22 +0000 (21:31 +1100)
committerStefan Metzmacher <metze@samba.org>
Thu, 10 Jan 2013 13:52:49 +0000 (14:52 +0100)
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source4/dsdb/samdb/ldb_modules/acl.c

index 9bf2612..2de16b7 100644 (file)
@@ -1021,8 +1021,9 @@ static int acl_modify(struct ldb_module *module, struct ldb_request *req)
 
        schema = dsdb_get_schema(ldb, tmp_ctx);
        if (!schema) {
-               ret = LDB_ERR_OPERATIONS_ERROR;
-               goto fail;
+               talloc_free(tmp_ctx);
+               return ldb_error(ldb, LDB_ERR_OPERATIONS_ERROR,
+                                "acl_modify: Error obtaining schema.");
        }
 
        ret = dsdb_get_sd_from_ldb_message(ldb, tmp_ctx, acl_res->msgs[0], &sd);