diff options
author | Günther Deschner <gd@samba.org> | 2011-01-18 18:05:49 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2011-02-02 20:00:59 +0100 |
commit | 387d1543ed8ac16389ace7a09cb9a452e2d220db (patch) | |
tree | a435a664392bf7fc527a120adb8df1199134712a /source3/winbindd | |
parent | 04ac046a46fe59b0551e2898ebc8940da601c406 (diff) | |
download | samba-387d1543ed8ac16389ace7a09cb9a452e2d220db.tar.gz samba-387d1543ed8ac16389ace7a09cb9a452e2d220db.tar.bz2 samba-387d1543ed8ac16389ace7a09cb9a452e2d220db.zip |
s3-winbind: prefer dcerpc_lsa_X functions in winbindd/winbindd_rpc.c.
Guenther
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/winbindd_rpc.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/source3/winbindd/winbindd_rpc.c b/source3/winbindd/winbindd_rpc.c index a2aa54cf0c..5efd57e219 100644 --- a/source3/winbindd/winbindd_rpc.c +++ b/source3/winbindd/winbindd_rpc.c @@ -29,7 +29,7 @@ #include "librpc/gen_ndr/ndr_samr_c.h" #include "librpc/gen_ndr/srv_samr.h" -#include "librpc/gen_ndr/cli_lsa.h" +#include "librpc/gen_ndr/ndr_lsa_c.h" #include "librpc/gen_ndr/srv_lsa.h" #include "rpc_client/cli_samr.h" #include "rpc_client/cli_lsarpc.h" @@ -969,7 +969,8 @@ NTSTATUS rpc_trusted_domains(TALLOC_CTX *mem_ctx, struct netr_DomainTrust *array = NULL; uint32_t enum_ctx = 0; uint32_t count = 0; - NTSTATUS status; + NTSTATUS status, result; + struct dcerpc_binding_handle *b = lsa_pipe->binding_handle; do { struct lsa_DomainList dom_list; @@ -980,15 +981,19 @@ NTSTATUS rpc_trusted_domains(TALLOC_CTX *mem_ctx, * We don't run into deadlocks here, cause winbind_off() is * called in the main function. */ - status = rpccli_lsa_EnumTrustDom(lsa_pipe, + status = dcerpc_lsa_EnumTrustDom(b, mem_ctx, lsa_policy, &enum_ctx, &dom_list, - (uint32_t) -1); + (uint32_t) -1, + &result); if (!NT_STATUS_IS_OK(status)) { - if (!NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES)) { - return status; + return status; + } + if (!NT_STATUS_IS_OK(result)) { + if (!NT_STATUS_EQUAL(result, STATUS_MORE_ENTRIES)) { + return result; } } @@ -1020,7 +1025,7 @@ NTSTATUS rpc_trusted_domains(TALLOC_CTX *mem_ctx, sid_copy(sid, dom_list.domains[i].sid); trust->sid = sid; } - } while (NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES)); + } while (NT_STATUS_EQUAL(result, STATUS_MORE_ENTRIES)); *pnum_trusts = count; *ptrusts = array; |