summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2011-01-18 12:05:38 +0100
committerGünther Deschner <gd@samba.org>2011-02-01 23:29:14 +0100
commit49f08d1d7cd9a8bd9e7757ec2575175b79255e14 (patch)
tree188736955a6d2cd506501c7284f1a3af6df8a37f /source3
parent37f2f518bed220a83025884e4b345ba2b0a08dd6 (diff)
downloadsamba-49f08d1d7cd9a8bd9e7757ec2575175b79255e14.tar.gz
samba-49f08d1d7cd9a8bd9e7757ec2575175b79255e14.tar.bz2
samba-49f08d1d7cd9a8bd9e7757ec2575175b79255e14.zip
s3-net: prefer dcerpc_samr_X functions in rpc_aliaslist_internals.
Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/net_rpc.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 8d636d402e..6c98e4b738 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -4474,29 +4474,35 @@ static NTSTATUS rpc_aliaslist_internals(struct net_context *c,
int argc,
const char **argv)
{
- NTSTATUS result;
+ NTSTATUS result, status;
struct policy_handle connect_pol;
+ struct dcerpc_binding_handle *b = pipe_hnd->binding_handle;
- result = rpccli_samr_Connect2(pipe_hnd, mem_ctx,
+ status = dcerpc_samr_Connect2(b, mem_ctx,
pipe_hnd->desthost,
MAXIMUM_ALLOWED_ACCESS,
- &connect_pol);
-
- if (!NT_STATUS_IS_OK(result))
+ &connect_pol,
+ &result);
+ if (!NT_STATUS_IS_OK(status)) {
goto done;
+ }
+ if (!NT_STATUS_IS_OK(result)) {
+ status = result;
+ goto done;
+ }
- result = rpc_fetch_domain_aliases(pipe_hnd, mem_ctx, &connect_pol,
+ status = rpc_fetch_domain_aliases(pipe_hnd, mem_ctx, &connect_pol,
&global_sid_Builtin);
-
- if (!NT_STATUS_IS_OK(result))
+ if (!NT_STATUS_IS_OK(status)) {
goto done;
+ }
- result = rpc_fetch_domain_aliases(pipe_hnd, mem_ctx, &connect_pol,
+ status = rpc_fetch_domain_aliases(pipe_hnd, mem_ctx, &connect_pol,
domain_sid);
- rpccli_samr_Close(pipe_hnd, mem_ctx, &connect_pol);
+ dcerpc_samr_Close(b, mem_ctx, &connect_pol, &result);
done:
- return result;
+ return status;
}
static void init_user_token(struct security_token *token, struct dom_sid *user_sid)