diff options
Diffstat (limited to 'source4/dsdb/samdb/samdb.c')
-rw-r--r-- | source4/dsdb/samdb/samdb.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/source4/dsdb/samdb/samdb.c b/source4/dsdb/samdb/samdb.c index 8188bf2016..65f818b37d 100644 --- a/source4/dsdb/samdb/samdb.c +++ b/source4/dsdb/samdb/samdb.c @@ -104,7 +104,6 @@ int samdb_search_free(void *ctx, TALLOC_CTX *mem_ctx, struct ldb_message **res) { struct ldb_wrap *sam_ctx = ctx; - ldb_set_alloc(sam_ctx->ldb, talloc_realloc_fn, mem_ctx); return ldb_search_free(sam_ctx->ldb, res); } @@ -733,7 +732,6 @@ int samdb_msg_add_string(void *ctx, TALLOC_CTX *mem_ctx, struct ldb_message *msg if (s == NULL || a == NULL) { return -1; } - ldb_set_alloc(sam_ctx->ldb, talloc_realloc_fn, mem_ctx); return ldb_msg_add_string(sam_ctx->ldb, msg, a, s); } @@ -748,7 +746,6 @@ int samdb_msg_add_delete(void *ctx, TALLOC_CTX *mem_ctx, struct ldb_message *msg if (a == NULL) { return -1; } - ldb_set_alloc(sam_ctx->ldb, talloc_realloc_fn, mem_ctx); /* we use an empty replace rather than a delete, as it allows for samdb_replace() to be used everywhere */ return ldb_msg_add_empty(sam_ctx->ldb, msg, a, LDB_FLAG_MOD_REPLACE); @@ -770,7 +767,6 @@ int samdb_msg_add_addval(void *ctx, TALLOC_CTX *mem_ctx, struct ldb_message *msg v = talloc_strdup(mem_ctx, value); if (v == NULL) return -1; - ldb_set_alloc(sam_ctx->ldb, talloc_realloc_fn, mem_ctx); ret = ldb_msg_add_string(sam_ctx->ldb, msg, a, v); if (ret != 0) return ret; @@ -797,7 +793,6 @@ int samdb_msg_add_delval(void *ctx, TALLOC_CTX *mem_ctx, struct ldb_message *msg v = talloc_strdup(mem_ctx, value); if (v == NULL) return -1; - ldb_set_alloc(sam_ctx->ldb, talloc_realloc_fn, mem_ctx); ret = ldb_msg_add_string(sam_ctx->ldb, msg, a, v); if (ret != 0) return ret; @@ -852,7 +847,6 @@ int samdb_msg_add_hash(void *ctx, TALLOC_CTX *mem_ctx, struct ldb_message *msg, return -1; } memcpy(val.data, hash.hash, 16); - ldb_set_alloc(sam_ctx->ldb, talloc_realloc_fn, mem_ctx); return ldb_msg_add_value(sam_ctx->ldb, msg, attr_name, &val); } @@ -873,7 +867,6 @@ int samdb_msg_add_hashes(void *ctx, TALLOC_CTX *mem_ctx, struct ldb_message *msg for (i=0;i<count;i++) { memcpy(i*16 + (char *)val.data, hashes[i].hash, 16); } - ldb_set_alloc(sam_ctx->ldb, talloc_realloc_fn, mem_ctx); return ldb_msg_add_value(sam_ctx->ldb, msg, attr_name, &val); } @@ -896,7 +889,6 @@ int samdb_msg_add_logon_hours(void *ctx, TALLOC_CTX *mem_ctx, struct ldb_message struct ldb_val val; val.length = hours->units_per_week / 8; val.data = hours->bitmap; - ldb_set_alloc(sam_ctx->ldb, talloc_realloc_fn, mem_ctx); return ldb_msg_add_value(sam_ctx->ldb, msg, attr_name, &val); } @@ -906,11 +898,8 @@ int samdb_msg_add_logon_hours(void *ctx, TALLOC_CTX *mem_ctx, struct ldb_message int samdb_msg_set_string(void *ctx, TALLOC_CTX *mem_ctx, struct ldb_message *msg, const char *attr_name, const char *str) { - struct ldb_wrap *sam_ctx = ctx; struct ldb_message_element *el; - ldb_set_alloc(sam_ctx->ldb, talloc_realloc_fn, mem_ctx); - el = ldb_msg_find_element(msg, attr_name); if (el) { el->num_values = 0; @@ -938,7 +927,6 @@ int samdb_add(void *ctx, TALLOC_CTX *mem_ctx, struct ldb_message *msg) { struct ldb_wrap *sam_ctx = ctx; - ldb_set_alloc(sam_ctx->ldb, talloc_realloc_fn, mem_ctx); return ldb_add(sam_ctx->ldb, msg); } @@ -949,7 +937,6 @@ int samdb_delete(void *ctx, TALLOC_CTX *mem_ctx, const char *dn) { struct ldb_wrap *sam_ctx = ctx; - ldb_set_alloc(sam_ctx->ldb, talloc_realloc_fn, mem_ctx); return ldb_delete(sam_ctx->ldb, dn); } @@ -960,7 +947,6 @@ int samdb_modify(void *ctx, TALLOC_CTX *mem_ctx, struct ldb_message *msg) { struct ldb_wrap *sam_ctx = ctx; - ldb_set_alloc(sam_ctx->ldb, talloc_realloc_fn, mem_ctx); return ldb_modify(sam_ctx->ldb, msg); } |