diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-01-04 17:18:22 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-01-04 21:29:03 +0100 |
commit | 4c37257f16cf2b34550a993f5423ee772254870f (patch) | |
tree | 809ee4e43acd6c1bbc358ebff2491ab76d4e1a72 /source3/utils | |
parent | f016e4d4bd86d34a39822e9fdc0f83dbf67442b7 (diff) | |
download | samba-4c37257f16cf2b34550a993f5423ee772254870f.tar.gz samba-4c37257f16cf2b34550a993f5423ee772254870f.tar.bz2 samba-4c37257f16cf2b34550a993f5423ee772254870f.zip |
s3:net_utils: use dcerpc_dssetup_DsRoleGetPrimaryDomainInformation()
metze
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_util.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/utils/net_util.c b/source3/utils/net_util.c index 2f031c4123..79d453fa8a 100644 --- a/source3/utils/net_util.c +++ b/source3/utils/net_util.c @@ -627,8 +627,10 @@ NTSTATUS net_scan_dc(struct net_context *c, { TALLOC_CTX *mem_ctx = talloc_tos(); struct rpc_pipe_client *dssetup_pipe = NULL; + struct dcerpc_binding_handle *dssetup_handle = NULL; union dssetup_DsRoleInfo info; NTSTATUS status; + WERROR werr; ZERO_STRUCTP(dc_info); @@ -637,13 +639,17 @@ NTSTATUS net_scan_dc(struct net_context *c, if (!NT_STATUS_IS_OK(status)) { return status; } + dssetup_handle = dssetup_pipe->binding_handle; - status = rpccli_dssetup_DsRoleGetPrimaryDomainInformation(dssetup_pipe, mem_ctx, + status = dcerpc_dssetup_DsRoleGetPrimaryDomainInformation(dssetup_handle, mem_ctx, DS_ROLE_BASIC_INFORMATION, &info, - NULL); + &werr); TALLOC_FREE(dssetup_pipe); + if (NT_STATUS_IS_OK(status)) { + status = werror_to_ntstatus(werr); + } if (!NT_STATUS_IS_OK(status)) { return status; } |