From f6004a1cfd484ecc908bfc77883f03e9fbf3ab88 Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Fri, 20 Aug 2010 11:28:43 +0200 Subject: s3-lsa: make lsa_lookup_trusted_domain_by_name() use pdb_get_trusted_domain(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Günther Deschner --- source3/rpc_server/lsa/srv_lsa_nt.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'source3') diff --git a/source3/rpc_server/lsa/srv_lsa_nt.c b/source3/rpc_server/lsa/srv_lsa_nt.c index 4e504cb221..8a70a987d6 100644 --- a/source3/rpc_server/lsa/srv_lsa_nt.c +++ b/source3/rpc_server/lsa/srv_lsa_nt.c @@ -1447,11 +1447,13 @@ static NTSTATUS lsa_lookup_trusted_domain_by_name(TALLOC_CTX *mem_ctx, const char *netbios_domain_name, struct trustdom_info **info_p) { - struct dom_sid sid; + NTSTATUS status; struct trustdom_info *info; + struct pdb_trusted_domain *td; - if (!pdb_get_trusteddom_pw(netbios_domain_name, NULL, &sid, NULL)) { - return NT_STATUS_INVALID_PARAMETER; + status = pdb_get_trusted_domain(mem_ctx, netbios_domain_name, &td); + if (!NT_STATUS_IS_OK(status)) { + return status; } info = talloc(mem_ctx, struct trustdom_info); @@ -1461,7 +1463,8 @@ static NTSTATUS lsa_lookup_trusted_domain_by_name(TALLOC_CTX *mem_ctx, info->name = talloc_strdup(info, netbios_domain_name); NT_STATUS_HAVE_NO_MEMORY(info->name); - info->sid = sid; + + sid_copy(&info->sid, &td->security_identifier); *info_p = info; -- cgit