summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2011-04-06 14:40:50 +0200
committerGünther Deschner <gd@samba.org>2011-04-12 12:20:43 +0200
commit7ea03840fc817b21d7d333aebc6bbaeded9a0485 (patch)
tree39b7dfa33692bf06620b0bcf91d9f3b61da0e67a /source3/lib
parent3acd6bde58ecd68faf8200268cc674a71c57778d (diff)
downloadsamba-7ea03840fc817b21d7d333aebc6bbaeded9a0485.tar.gz
samba-7ea03840fc817b21d7d333aebc6bbaeded9a0485.tar.bz2
samba-7ea03840fc817b21d7d333aebc6bbaeded9a0485.zip
s3-netapi: use dcerpc_try_samr_connects().
Guenther
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/netapi/samr.c22
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,