]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3-lsa: only proceed in _lsa_EnumTrustedDomainsEx when backend has trusted domain...
authorGünther Deschner <gd@samba.org>
Thu, 17 Feb 2011 13:37:32 +0000 (14:37 +0100)
committerGünther Deschner <gd@samba.org>
Thu, 17 Feb 2011 15:02:20 +0000 (16:02 +0100)
Guenther

source3/passdb/pdb_ipa.c
source3/rpc_server/lsa/srv_lsa_nt.c

index 3108c5e1f012e44c07d72ca2554d4cb9ade43429..9e52e952a1004bc590bd88d4429b45b74e77b597 100644 (file)
@@ -705,7 +705,7 @@ static NTSTATUS ipasam_enum_trusteddoms(struct pdb_methods *methods,
 
 static uint32_t pdb_ipasam_capabilities(struct pdb_methods *methods)
 {
-       return PDB_CAP_STORE_RIDS | PDB_CAP_ADS;
+       return PDB_CAP_STORE_RIDS | PDB_CAP_ADS | PDB_CAP_TRUSTED_DOMAINS_EX;
 }
 
 static struct pdb_domain_info *pdb_ipasam_get_domain_info(struct pdb_methods *pdb_methods,
index 9f05433631a324be70307fc8064b61e80f44c9bc..4b4a27c2a87e5c5064b34ad61ee67406da41f57b 100644 (file)
@@ -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;