summaryrefslogtreecommitdiff
path: root/source3/rpc_server/lsa
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-10-19 19:02:24 +0200
committerGünther Deschner <gd@samba.org>2011-02-16 11:44:04 +0100
commit4d22986541efc052ee7f41dceccfa48471b32fe2 (patch)
tree6334ee01b1d70495fe341d399584f7240853c24d /source3/rpc_server/lsa
parentcdd4df72d73dce810e23dbf18de2d8d74b02dd22 (diff)
downloadsamba-4d22986541efc052ee7f41dceccfa48471b32fe2.tar.gz
samba-4d22986541efc052ee7f41dceccfa48471b32fe2.tar.bz2
samba-4d22986541efc052ee7f41dceccfa48471b32fe2.zip
s3-lsa: implement _lsa_OpenTrustedDomainByName().
Guenther Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3/rpc_server/lsa')
-rw-r--r--source3/rpc_server/lsa/srv_lsa_nt.c37
1 files changed, 30 insertions, 7 deletions
diff --git a/source3/rpc_server/lsa/srv_lsa_nt.c b/source3/rpc_server/lsa/srv_lsa_nt.c
index e3b5009e31..6a9d12b652 100644
--- a/source3/rpc_server/lsa/srv_lsa_nt.c
+++ b/source3/rpc_server/lsa/srv_lsa_nt.c
@@ -1565,6 +1565,36 @@ NTSTATUS _lsa_OpenTrustedDomain(struct pipes_struct *p,
}
/***************************************************************************
+ _lsa_OpenTrustedDomainByName
+ ***************************************************************************/
+
+NTSTATUS _lsa_OpenTrustedDomainByName(struct pipes_struct *p,
+ struct lsa_OpenTrustedDomainByName *r)
+{
+ struct lsa_info *handle = NULL;
+ struct trustdom_info *info;
+ NTSTATUS status;
+
+ if (!find_policy_by_hnd(p, r->in.handle, (void **)(void *)&handle)) {
+ return NT_STATUS_INVALID_HANDLE;
+ }
+
+ if (handle->type != LSA_HANDLE_POLICY_TYPE) {
+ return NT_STATUS_INVALID_HANDLE;
+ }
+
+ status = lsa_lookup_trusted_domain_by_name(p->mem_ctx,
+ r->in.name.string,
+ &info);
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ return _lsa_OpenTrustedDomain_base(p, r->in.access_mask, info,
+ r->out.trustdom_handle);
+}
+
+/***************************************************************************
_lsa_CreateTrustedDomainEx2
***************************************************************************/
@@ -3193,13 +3223,6 @@ NTSTATUS _lsa_SetDomainInformationPolicy(struct pipes_struct *p,
return NT_STATUS_NOT_IMPLEMENTED;
}
-NTSTATUS _lsa_OpenTrustedDomainByName(struct pipes_struct *p,
- struct lsa_OpenTrustedDomainByName *r)
-{
- p->rng_fault_state = True;
- return NT_STATUS_NOT_IMPLEMENTED;
-}
-
NTSTATUS _lsa_TestCall(struct pipes_struct *p, struct lsa_TestCall *r)
{
p->rng_fault_state = True;