summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-10-20 12:50:33 +0200
committerGünther Deschner <gd@samba.org>2011-02-16 11:44:03 +0100
commit06245d13356bb2f7e00ec6ff020aff8758c9da32 (patch)
tree16e76787e06be96dba51e21f5be8296cba3d182a
parentb9eda2ac987d6e9182a4a10922f3c785c7ba263f (diff)
downloadsamba-06245d13356bb2f7e00ec6ff020aff8758c9da32.tar.gz
samba-06245d13356bb2f7e00ec6ff020aff8758c9da32.tar.bz2
samba-06245d13356bb2f7e00ec6ff020aff8758c9da32.zip
s3-lsa: implement _lsa_QueryTrustedDomainInfoByName().
Guenther Signed-off-by: Günther Deschner <gd@samba.org>
-rw-r--r--source3/rpc_server/lsa/srv_lsa_nt.c45
1 files changed, 38 insertions, 7 deletions
diff --git a/source3/rpc_server/lsa/srv_lsa_nt.c b/source3/rpc_server/lsa/srv_lsa_nt.c
index 5cb383c1d0..a70293aae5 100644
--- a/source3/rpc_server/lsa/srv_lsa_nt.c
+++ b/source3/rpc_server/lsa/srv_lsa_nt.c
@@ -1839,6 +1839,44 @@ NTSTATUS _lsa_QueryTrustedDomainInfoBySid(struct pipes_struct *p,
}
/***************************************************************************
+ _lsa_QueryTrustedDomainInfoByName
+ ***************************************************************************/
+
+NTSTATUS _lsa_QueryTrustedDomainInfoByName(struct pipes_struct *p,
+ struct lsa_QueryTrustedDomainInfoByName *r)
+{
+ NTSTATUS status;
+ struct policy_handle trustdom_handle;
+ struct lsa_OpenTrustedDomainByName o;
+ struct lsa_QueryTrustedDomainInfo q;
+ struct lsa_Close c;
+
+ o.in.handle = r->in.handle;
+ o.in.name.string = r->in.trusted_domain->string;
+ o.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
+ o.out.trustdom_handle = &trustdom_handle;
+
+ status = _lsa_OpenTrustedDomainByName(p, &o);
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ q.in.trustdom_handle = &trustdom_handle;
+ q.in.level = r->in.level;
+ q.out.info = r->out.info;
+
+ status = _lsa_QueryTrustedDomainInfo(p, &q);
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ c.in.handle = &trustdom_handle;
+ c.out.handle = &trustdom_handle;
+
+ return _lsa_Close(p, &c);
+}
+
+/***************************************************************************
***************************************************************************/
NTSTATUS _lsa_CreateSecret(struct pipes_struct *p, struct lsa_CreateSecret *r)
@@ -2976,13 +3014,6 @@ NTSTATUS _lsa_SetInfoPolicy2(struct pipes_struct *p,
return NT_STATUS_NOT_IMPLEMENTED;
}
-NTSTATUS _lsa_QueryTrustedDomainInfoByName(struct pipes_struct *p,
- struct lsa_QueryTrustedDomainInfoByName *r)
-{
- p->rng_fault_state = True;
- return NT_STATUS_NOT_IMPLEMENTED;
-}
-
NTSTATUS _lsa_SetTrustedDomainInfoByName(struct pipes_struct *p,
struct lsa_SetTrustedDomainInfoByName *r)
{