summaryrefslogtreecommitdiff
path: root/source3/rpc_server/lsa/srv_lsa_nt.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2011-02-17 14:37:32 +0100
committerGünther Deschner <gd@samba.org>2011-02-17 16:02:20 +0100
commit67dfc87291a342dc17dbb7bcee06157dd614f3e3 (patch)
tree6a0c2dbc945b46cad99894e7a7f47037413a4d09 /source3/rpc_server/lsa/srv_lsa_nt.c
parent0ed46df56a84dfc40e172ea1e460fa6490b15a2a (diff)
downloadsamba-67dfc87291a342dc17dbb7bcee06157dd614f3e3.tar.gz
samba-67dfc87291a342dc17dbb7bcee06157dd614f3e3.tar.bz2
samba-67dfc87291a342dc17dbb7bcee06157dd614f3e3.zip
s3-lsa: only proceed in _lsa_EnumTrustedDomainsEx when backend has trusted domain support.
Guenther
Diffstat (limited to 'source3/rpc_server/lsa/srv_lsa_nt.c')
-rw-r--r--source3/rpc_server/lsa/srv_lsa_nt.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/rpc_server/lsa/srv_lsa_nt.c b/source3/rpc_server/lsa/srv_lsa_nt.c
index 9f05433631..4b4a27c2a8 100644
--- a/source3/rpc_server/lsa/srv_lsa_nt.c
+++ b/source3/rpc_server/lsa/srv_lsa_nt.c
@@ -3297,6 +3297,15 @@ NTSTATUS _lsa_EnumTrustedDomainsEx(struct pipes_struct *p,
int i;
NTSTATUS nt_status;
+ /* bail out early if pdb backend is not capable of ex trusted domains,
+ * if we dont do that, the client might not call
+ * _lsa_EnumTrustedDomains() afterwards - gd */
+
+ if (!(pdb_capabilities() & PDB_CAP_TRUSTED_DOMAINS_EX)) {
+ p->rng_fault_state = True;
+ return NT_STATUS_NOT_IMPLEMENTED;
+ }
+
if (!find_policy_by_hnd(p, r->in.handle, (void **)(void *)&info))
return NT_STATUS_INVALID_HANDLE;