diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/netapi/samr.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/source3/lib/netapi/samr.c b/source3/lib/netapi/samr.c index f859c529f1..fb30d4d71e 100644 --- a/source3/lib/netapi/samr.c +++ b/source3/lib/netapi/samr.c @@ -81,13 +81,20 @@ WERROR libnetapi_samr_open_domain(struct libnetapi_ctx *mem_ctx, } if (!is_valid_policy_hnd(connect_handle)) { - status = rpccli_try_samr_connects(pipe_cli, mem_ctx, + NTSTATUS result; + status = dcerpc_try_samr_connects(pipe_cli->binding_handle, mem_ctx, + pipe_cli->srv_name_slash, connect_mask, - connect_handle); + connect_handle, + &result); if (!NT_STATUS_IS_OK(status)) { werr = ntstatus_to_werror(status); goto done; } + if (!NT_STATUS_IS_OK(result)) { + werr = ntstatus_to_werror(result); + goto done; + } } status = dcerpc_samr_EnumDomains(b, mem_ctx, @@ -215,13 +222,20 @@ WERROR libnetapi_samr_open_builtin_domain(struct libnetapi_ctx *mem_ctx, } if (!is_valid_policy_hnd(connect_handle)) { - status = rpccli_try_samr_connects(pipe_cli, mem_ctx, + NTSTATUS result; + status = dcerpc_try_samr_connects(pipe_cli->binding_handle, mem_ctx, + pipe_cli->srv_name_slash, connect_mask, - connect_handle); + connect_handle, + &result); if (!NT_STATUS_IS_OK(status)) { werr = ntstatus_to_werror(status); goto done; } + if (!NT_STATUS_IS_OK(result)) { + werr = ntstatus_to_werror(result); + goto done; + } } status = dcerpc_samr_OpenDomain(b, mem_ctx, |