winbindd: remove unused .trusted_domains() from winbindd_methods
[metze/samba/wip.git] / source3 / winbindd / winbindd_samr.c
index 396e2c97709b4013e2918e363ba4022a19150dbe..94f9c517b805b4a3ab52be8cc132227f9fbf7061 100644 (file)
@@ -327,65 +327,6 @@ done:
        return status;
 }
 
-/* get a list of trusted domains - builtin domain */
-static NTSTATUS sam_trusted_domains(struct winbindd_domain *domain,
-                                   TALLOC_CTX *mem_ctx,
-                                   struct netr_DomainTrustList *ptrust_list)
-{
-       struct rpc_pipe_client *lsa_pipe;
-       struct policy_handle lsa_policy = { 0 };
-       struct netr_DomainTrust *trusts = NULL;
-       uint32_t num_trusts = 0;
-       TALLOC_CTX *tmp_ctx;
-       NTSTATUS status;
-       bool retry = false;
-
-       DEBUG(3,("samr: trusted domains\n"));
-
-       if (ptrust_list) {
-               ZERO_STRUCTP(ptrust_list);
-       }
-
-       tmp_ctx = talloc_stackframe();
-       if (tmp_ctx == NULL) {
-               return NT_STATUS_NO_MEMORY;
-       }
-
-again:
-       status = open_cached_internal_pipe_conn(domain,
-                                               NULL,
-                                               NULL,
-                                               &lsa_pipe,
-                                               &lsa_policy);
-       if (!NT_STATUS_IS_OK(status)) {
-               goto done;
-       }
-
-       status = rpc_trusted_domains(tmp_ctx,
-                                    lsa_pipe,
-                                    &lsa_policy,
-                                    &num_trusts,
-                                    &trusts);
-
-       if (!retry && reset_connection_on_error(domain, lsa_pipe, status)) {
-               retry = true;
-               goto again;
-       }
-
-       if (!NT_STATUS_IS_OK(status)) {
-               goto done;
-       }
-
-       if (ptrust_list) {
-               ptrust_list->count = num_trusts;
-               ptrust_list->array = talloc_move(mem_ctx, &trusts);
-       }
-
-done:
-       TALLOC_FREE(tmp_ctx);
-       return status;
-}
-
 /* Lookup group membership given a rid.   */
 static NTSTATUS sam_lookup_groupmem(struct winbindd_domain *domain,
                                    TALLOC_CTX *mem_ctx,
@@ -499,15 +440,6 @@ static NTSTATUS builtin_query_user_list(struct winbindd_domain *domain,
        return NT_STATUS_OK;
 }
 
-/* get a list of trusted domains - builtin domain */
-static NTSTATUS builtin_trusted_domains(struct winbindd_domain *domain,
-                                       TALLOC_CTX *mem_ctx,
-                                       struct netr_DomainTrustList *trusts)
-{
-       ZERO_STRUCTP(trusts);
-       return NT_STATUS_OK;
-}
-
 /*********************************************************************
  COMMON functions.
 *********************************************************************/
@@ -1142,7 +1074,6 @@ struct winbindd_methods builtin_passdb_methods = {
        .sequence_number       = sam_sequence_number,
        .lockout_policy        = sam_lockout_policy,
        .password_policy       = sam_password_policy,
-       .trusted_domains       = builtin_trusted_domains
 };
 
 /* the rpc backend methods are exposed via this structure */
@@ -1161,5 +1092,4 @@ struct winbindd_methods sam_passdb_methods = {
        .sequence_number       = sam_sequence_number,
        .lockout_policy        = sam_lockout_policy,
        .password_policy       = sam_password_policy,
-       .trusted_domains       = sam_trusted_domains
 };