diff options
Diffstat (limited to 'source4/rpc_server')
-rw-r--r-- | source4/rpc_server/lsa/dcesrv_lsa.c | 5 | ||||
-rw-r--r-- | source4/rpc_server/samr/dcesrv_samr.c | 14 |
2 files changed, 5 insertions, 14 deletions
diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c index 9ee0d6faec..bac25fcc24 100644 --- a/source4/rpc_server/lsa/dcesrv_lsa.c +++ b/source4/rpc_server/lsa/dcesrv_lsa.c @@ -1774,10 +1774,7 @@ static NTSTATUS lsa_CreateSecret(struct dcesrv_call_state *dce_call, TALLOC_CTX return NT_STATUS_INTERNAL_DB_CORRUPTION; } - msg->dn = ldb_dn_build_child(mem_ctx, - "cn", name, - ldb_dn_build_child(mem_ctx, - "cn", "LSA Secrets", NULL)); + msg->dn = ldb_dn_string_compose(mem_ctx, NULL, "cn=%s,cn=LSA Secrets", name); samdb_msg_add_string(secret_state->sam_ldb, mem_ctx, msg, "cn", name); } diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c index 81db2b386b..ff15eb43bb 100644 --- a/source4/rpc_server/samr/dcesrv_samr.c +++ b/source4/rpc_server/samr/dcesrv_samr.c @@ -554,11 +554,8 @@ static NTSTATUS samr_CreateDomainGroup(struct dcesrv_call_state *dce_call, TALLO } /* add core elements to the ldb_message for the user */ - msg->dn = ldb_dn_build_child(mem_ctx, - "CN", groupname, - ldb_dn_build_child(mem_ctx, - "CN", "Users", - d_state->domain_dn)); + msg->dn = ldb_dn_string_compose(mem_ctx, d_state->domain_dn, + "CN=%s, CN=Users", groupname); if (!msg->dn) { return NT_STATUS_NO_MEMORY; } @@ -991,11 +988,8 @@ static NTSTATUS samr_CreateDomAlias(struct dcesrv_call_state *dce_call, TALLOC_C } /* add core elements to the ldb_message for the alias */ - msg->dn = ldb_dn_build_child(mem_ctx, - "CN", alias_name, - ldb_dn_build_child(mem_ctx, - "CN", "Users", - d_state->domain_dn)); + msg->dn = ldb_dn_string_compose(mem_ctx, d_state->domain_dn, + "CN=%s, CN=Users", alias_name); if (!msg->dn) { return NT_STATUS_NO_MEMORY; } |