diff options
author | Günther Deschner <gd@samba.org> | 2009-10-20 12:48:30 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2011-02-16 11:44:03 +0100 |
commit | b9eda2ac987d6e9182a4a10922f3c785c7ba263f (patch) | |
tree | fb3cb4b0d18a8ff7de363de5e605a0e0aea0454c /source3 | |
parent | 1ce0d9791be5265a13af8761f545b6c81dee2966 (diff) | |
download | samba-b9eda2ac987d6e9182a4a10922f3c785c7ba263f.tar.gz samba-b9eda2ac987d6e9182a4a10922f3c785c7ba263f.tar.bz2 samba-b9eda2ac987d6e9182a4a10922f3c785c7ba263f.zip |
s3-lsa: implement _lsa_QueryTrustedDomainInfoBySid().
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpc_server/lsa/srv_lsa_nt.c | 45 |
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 ca54d51410..5cb383c1d0 100644 --- a/source3/rpc_server/lsa/srv_lsa_nt.c +++ b/source3/rpc_server/lsa/srv_lsa_nt.c @@ -1801,6 +1801,44 @@ NTSTATUS _lsa_QueryTrustedDomainInfo(struct pipes_struct *p, } /*************************************************************************** + _lsa_QueryTrustedDomainInfoBySid + ***************************************************************************/ + +NTSTATUS _lsa_QueryTrustedDomainInfoBySid(struct pipes_struct *p, + struct lsa_QueryTrustedDomainInfoBySid *r) +{ + NTSTATUS status; + struct policy_handle trustdom_handle; + struct lsa_OpenTrustedDomain o; + struct lsa_QueryTrustedDomainInfo q; + struct lsa_Close c; + + o.in.handle = r->in.handle; + o.in.sid = r->in.dom_sid; + o.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; + o.out.trustdom_handle = &trustdom_handle; + + status = _lsa_OpenTrustedDomain(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) @@ -2910,13 +2948,6 @@ NTSTATUS _lsa_QuerySecret(struct pipes_struct *p, struct lsa_QuerySecret *r) return NT_STATUS_NOT_IMPLEMENTED; } -NTSTATUS _lsa_QueryTrustedDomainInfoBySid(struct pipes_struct *p, - struct lsa_QueryTrustedDomainInfoBySid *r) -{ - p->rng_fault_state = True; - return NT_STATUS_NOT_IMPLEMENTED; -} - NTSTATUS _lsa_SetTrustedDomainInfo(struct pipes_struct *p, struct lsa_SetTrustedDomainInfo *r) { |