summaryrefslogtreecommitdiffstats
path: root/source4/rpc_server
diff options
context:
space:
mode:
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/lsa/dcesrv_lsa.c6
-rw-r--r--source4/rpc_server/samr/dcesrv_samr.c14
2 files changed, 13 insertions, 7 deletions
diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c
index 07c4696845..71132119ac 100644
--- a/source4/rpc_server/lsa/dcesrv_lsa.c
+++ b/source4/rpc_server/lsa/dcesrv_lsa.c
@@ -265,7 +265,8 @@ static NTSTATUS lsa_get_policy_state(struct dcesrv_call_state *dce_call, TALLOC_
}
state->domain_sid = samdb_search_dom_sid(state->sam_ldb, state,
- state->domain_dn, "objectSid", NULL);
+ state->domain_dn, "objectSid",
+ "dn=%s", state->domain_dn);
if (!state->domain_sid) {
return NT_STATUS_NO_SUCH_DOMAIN;
}
@@ -277,7 +278,8 @@ static NTSTATUS lsa_get_policy_state(struct dcesrv_call_state *dce_call, TALLOC_
state->domain_name = talloc_reference(state,
samdb_search_string(state->sam_ldb, mem_ctx,
- state->domain_dn, "name", NULL));
+ state->domain_dn, "name",
+ "dn=%s", state->domain_dn));
if (!state->domain_name) {
return NT_STATUS_NO_SUCH_DOMAIN;
}
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c
index 31b49bcd86..5539cdde96 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -515,7 +515,7 @@ static NTSTATUS samr_CreateDomainGroup(struct dcesrv_call_state *dce_call, TALLO
/* retrieve the sid for the group just created */
sid = samdb_search_dom_sid(d_state->sam_ctx, a_state,
- msg->dn, "objectSid", NULL);
+ msg->dn, "objectSid", "dn=%s", msg->dn);
if (sid == NULL) {
return NT_STATUS_UNSUCCESSFUL;
}
@@ -749,7 +749,7 @@ static NTSTATUS samr_CreateUser2(struct dcesrv_call_state *dce_call, TALLOC_CTX
/* retrieve the sid for the group just created */
sid = samdb_search_dom_sid(d_state->sam_ctx, a_state,
- msg->dn, "objectSid", NULL);
+ msg->dn, "objectSid", "dn=%s", msg->dn);
if (sid == NULL) {
return NT_STATUS_UNSUCCESSFUL;
}
@@ -949,7 +949,7 @@ static NTSTATUS samr_CreateDomAlias(struct dcesrv_call_state *dce_call, TALLOC_C
/* retrieve the sid for the alias just created */
sid = samdb_search_dom_sid(d_state->sam_ctx, a_state,
- msg->dn, "objectSid", NULL);
+ msg->dn, "objectSid", "dn=%s", msg->dn);
a_state->account_name = talloc_strdup(a_state, alias_name);
if (!a_state->account_name) {
@@ -3072,9 +3072,13 @@ static NTSTATUS samr_GetUserPwInfo(struct dcesrv_call_state *dce_call, TALLOC_CT
a_state = h->data;
r->out.info.min_password_length = samdb_search_uint(a_state->sam_ctx, mem_ctx, 0,
- a_state->domain_state->domain_dn, "minPwdLength", NULL);
+ a_state->domain_state->domain_dn, "minPwdLength",
+ "dn=%s",
+ a_state->domain_state->domain_dn);
r->out.info.password_properties = samdb_search_uint(a_state->sam_ctx, mem_ctx, 0,
- a_state->account_dn, "pwdProperties", NULL);
+ a_state->account_dn,
+ "pwdProperties",
+ "dn=%s", a_state->account_dn);
return NT_STATUS_OK;
}