diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-01-02 07:51:13 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:07:55 -0500 |
commit | 500d5523d2a83234d6bfbf264d78293426488bfc (patch) | |
tree | 2a90456d248fb4c27184771ac2ede645356e6025 /source4/dsdb/samdb | |
parent | 1a988ec9af7960616fb4661b20d86ff05146d836 (diff) | |
download | samba-500d5523d2a83234d6bfbf264d78293426488bfc.tar.gz samba-500d5523d2a83234d6bfbf264d78293426488bfc.tar.xz samba-500d5523d2a83234d6bfbf264d78293426488bfc.zip |
r4475: fixed smbd to work with the small changes in the ldb API (the most important
change was in the ldb_msg_add_*() routines, which now use the msg as a context,
and thus it needs to be a talloc ptr)
(This used to be commit 1a4713bfd0e519f3eb7b3241121ff914a6eeef18)
Diffstat (limited to 'source4/dsdb/samdb')
-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 8188bf20160..65f818b37d2 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); } |