summaryrefslogtreecommitdiff
path: root/source4/param
diff options
context:
space:
mode:
Diffstat (limited to 'source4/param')
-rw-r--r--source4/param/secrets.c2
-rw-r--r--source4/param/share_ldb.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/source4/param/secrets.c b/source4/param/secrets.c
index 876be607f1..a7eb9607de 100644
--- a/source4/param/secrets.c
+++ b/source4/param/secrets.c
@@ -141,7 +141,7 @@ struct dom_sid *secrets_get_domain_sid(TALLOC_CTX *mem_ctx,
}
ldb_ret = gendb_search(ldb, ldb,
- ldb_dn_explode(mem_ctx, SECRETS_PRIMARY_DOMAIN_DN),
+ ldb_dn_new(mem_ctx, ldb, SECRETS_PRIMARY_DOMAIN_DN),
&msgs, attrs,
SECRETS_PRIMARY_DOMAIN_FILTER, domain);
diff --git a/source4/param/share_ldb.c b/source4/param/share_ldb.c
index 62b529e6cf..8db3a02f1c 100644
--- a/source4/param/share_ldb.c
+++ b/source4/param/share_ldb.c
@@ -171,7 +171,7 @@ static NTSTATUS sldb_list_all(TALLOC_CTX *mem_ctx,
ldb = talloc_get_type(ctx->priv_data, struct ldb_context);
- ret = ldb_search(ldb, ldb_dn_explode(tmp_ctx, "CN=SHARES"), LDB_SCOPE_SUBTREE, "(name=*)", NULL, &res);
+ ret = ldb_search(ldb, ldb_dn_new(tmp_ctx, ldb, "CN=SHARES"), LDB_SCOPE_SUBTREE, "(name=*)", NULL, &res);
talloc_steal(tmp_ctx, res);
if (ret != LDB_SUCCESS) {
talloc_free(tmp_ctx);
@@ -227,7 +227,7 @@ static NTSTATUS sldb_get_config(TALLOC_CTX *mem_ctx,
talloc_free(tmp_ctx);
return NT_STATUS_NO_MEMORY;
}
- ret = ldb_search(ldb, ldb_dn_explode(tmp_ctx, "CN=SHARES"), LDB_SCOPE_SUBTREE, filter, NULL, &res);
+ ret = ldb_search(ldb, ldb_dn_new(tmp_ctx, ldb, "CN=SHARES"), LDB_SCOPE_SUBTREE, filter, NULL, &res);
talloc_steal(tmp_ctx, res);
if (ret != LDB_SUCCESS || res->count != 1) {
talloc_free(tmp_ctx);
@@ -324,7 +324,7 @@ NTSTATUS sldb_create(struct share_context *ctx, const char *name, struct share_i
}
/* TODO: escape info->name */
- msg->dn = ldb_dn_string_compose(tmp_ctx, ldb_dn_new(tmp_ctx), "CN=%s,CN=SHARES", name);
+ msg->dn = ldb_dn_new_fmt(tmp_ctx, ldb, "CN=%s,CN=SHARES", name);
if (!msg->dn) {
DEBUG(0,("ERROR: Out of memory!\n"));
ret = NT_STATUS_NO_MEMORY;
@@ -454,7 +454,7 @@ NTSTATUS sldb_set(struct share_context *ctx, const char *name, struct share_info
}
/* TODO: escape name */
- msg->dn = ldb_dn_string_compose(tmp_ctx, ldb_dn_new(tmp_ctx), "CN=%s,CN=SHARES", name);
+ msg->dn = ldb_dn_new_fmt(tmp_ctx, ldb, "CN=%s,CN=SHARES", name);
if (!msg->dn) {
DEBUG(0,("ERROR: Out of memory!\n"));
ret = NT_STATUS_NO_MEMORY;
@@ -493,7 +493,7 @@ NTSTATUS sldb_set(struct share_context *ctx, const char *name, struct share_info
olddn = msg->dn;
/* TODO: escape newname */
- newdn = ldb_dn_string_compose(tmp_ctx, ldb_dn_new(tmp_ctx), "CN=%s,CN=SHARES", newname);
+ newdn = ldb_dn_new_fmt(tmp_ctx, ldb, "CN=%s,CN=SHARES", newname);
if (!newdn) {
DEBUG(0,("ERROR: Out of memory!\n"));
ret = NT_STATUS_NO_MEMORY;
@@ -549,7 +549,7 @@ NTSTATUS sldb_remove(struct share_context *ctx, const char *name)
ldb = talloc_get_type(ctx->priv_data, struct ldb_context);
- dn = ldb_dn_string_compose(tmp_ctx, ldb_dn_new(tmp_ctx), "CN=%s,CN=SHARES", name);
+ dn = ldb_dn_new_fmt(tmp_ctx, ldb, "CN=%s,CN=SHARES", name);
if (!dn) {
DEBUG(0,("ERROR: Out of memory!\n"));
ret = NT_STATUS_NO_MEMORY;