diff options
author | Sumit Bose <sbose@redhat.com> | 2010-08-20 11:28:43 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2011-02-16 11:43:18 +0100 |
commit | f6004a1cfd484ecc908bfc77883f03e9fbf3ab88 (patch) | |
tree | 20f5f5bc416464a1674d8e5b5d5f07dc28de8f07 /source3 | |
parent | 387e37efcec387a1b13014e8bcf9bd8e7786f632 (diff) | |
download | samba-f6004a1cfd484ecc908bfc77883f03e9fbf3ab88.tar.gz samba-f6004a1cfd484ecc908bfc77883f03e9fbf3ab88.tar.bz2 samba-f6004a1cfd484ecc908bfc77883f03e9fbf3ab88.zip |
s3-lsa: make lsa_lookup_trusted_domain_by_name() use pdb_get_trusted_domain().
Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpc_server/lsa/srv_lsa_nt.c | 11 |
1 files changed, 7 insertions, 4 deletions
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; |