s4:dsdb Add 'const' to some struct dsdb_schema variables
authorAndrew Bartlett <abartlet@samba.org>
Mon, 22 Mar 2010 04:19:55 +0000 (15:19 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 22 Mar 2010 09:24:40 +0000 (20:24 +1100)
We don't currently require this, but we may move this way in future.

source4/dsdb/samdb/ldb_modules/extended_dn_out.c
source4/dsdb/samdb/ldb_modules/repl_meta_data.c

index b0d618ab83b2a1a21894bd1ad2515e81e73b4bd1..f28ad8e12fcfdb62ce2a62ccc69b4b8cf12c74af 100644 (file)
@@ -748,7 +748,7 @@ static int extended_dn_out_dereference_init(struct ldb_module *module, const cha
        struct dsdb_openldap_dereference_control *dereference_control;
        struct dsdb_attribute *cur;
        struct ldb_context *ldb = ldb_module_get_ctx(module);
-       struct dsdb_schema *schema;
+       const struct dsdb_schema *schema;
 
        ldb_module_set_private(module, p);
 
index a7e2a48ff252d9248cb04b4685f3a3ddd6f64be0..91cd825a8467896e3a77be2c3dee354dcf5b046b 100644 (file)
@@ -668,7 +668,7 @@ static int replmd_add_fix_la(struct ldb_module *module, struct ldb_message_eleme
        struct ldb_context *ldb = ldb_module_get_ctx(module);
 
        /* We will take a reference to the schema in replmd_add_backlink */
-       struct dsdb_schema *schema = dsdb_get_schema(ldb, NULL);
+       const struct dsdb_schema *schema = dsdb_get_schema(ldb, NULL);
        NTTIME now;
 
        unix_to_nt_time(&now, t);
@@ -1537,7 +1537,7 @@ static int replmd_update_la_val(TALLOC_CTX *mem_ctx, struct ldb_val *v, struct d
   handle adding a linked attribute
  */
 static int replmd_modify_la_add(struct ldb_module *module,
-                               struct dsdb_schema *schema,
+                               const struct dsdb_schema *schema,
                                struct ldb_message *msg,
                                struct ldb_message_element *el,
                                struct ldb_message_element *old_el,
@@ -1656,7 +1656,7 @@ static int replmd_modify_la_add(struct ldb_module *module,
   handle deleting all active linked attributes
  */
 static int replmd_modify_la_delete(struct ldb_module *module,
-                                  struct dsdb_schema *schema,
+                                  const struct dsdb_schema *schema,
                                   struct ldb_message *msg,
                                   struct ldb_message_element *el,
                                   struct ldb_message_element *old_el,
@@ -1775,7 +1775,7 @@ static int replmd_modify_la_delete(struct ldb_module *module,
   handle replacing a linked attribute
  */
 static int replmd_modify_la_replace(struct ldb_module *module,
-                                   struct dsdb_schema *schema,
+                                   const struct dsdb_schema *schema,
                                    struct ldb_message *msg,
                                    struct ldb_message_element *el,
                                    struct ldb_message_element *old_el,
@@ -1937,7 +1937,7 @@ static int replmd_modify_handle_linked_attribs(struct ldb_module *module,
        struct ldb_context *ldb = ldb_module_get_ctx(module);
        struct ldb_message *old_msg;
 
-       struct dsdb_schema *schema;
+       const struct dsdb_schema *schema;
        struct GUID old_guid;
 
        if (seq_num == 0) {
@@ -2235,7 +2235,7 @@ static int replmd_rename_callback(struct ldb_request *req, struct ldb_reply *are
    is deleted
  */
 static int replmd_delete_remove_link(struct ldb_module *module,
-                                    struct dsdb_schema *schema,
+                                    const struct dsdb_schema *schema,
                                     struct ldb_dn *dn,
                                     struct ldb_message_element *el,
                                     const struct dsdb_attribute *sa)
@@ -2322,7 +2322,7 @@ static int replmd_delete(struct ldb_module *module, struct ldb_request *req)
        const struct ldb_val *rdn_value, *new_rdn_value;
        struct GUID guid;
        struct ldb_context *ldb = ldb_module_get_ctx(module);
-       struct dsdb_schema *schema;
+       const struct dsdb_schema *schema;
        struct ldb_message *msg, *old_msg;
        struct ldb_message_element *el;
        TALLOC_CTX *tmp_ctx;
@@ -3510,7 +3510,7 @@ static int replmd_process_linked_attribute(struct ldb_module *module,
        struct ldb_context *ldb = ldb_module_get_ctx(module);
        struct ldb_message *msg;
        TALLOC_CTX *tmp_ctx = talloc_new(la_entry);
-       struct dsdb_schema *schema = dsdb_get_schema(ldb, tmp_ctx);
+       const struct dsdb_schema *schema = dsdb_get_schema(ldb, tmp_ctx);
        int ret;
        const struct dsdb_attribute *attr;
        struct dsdb_dn *dsdb_dn;