]>
Commit | Line | Data |
---|---|---|
c0119cfb AF |
1 | From 2d0424e7bb2c30bf9049529b207c73b55370dfc8 Mon Sep 17 00:00:00 2001 |
2 | From: Andreas Schneider <asn@samba.org> | |
3 | Date: Tue, 10 Jan 2012 16:38:16 +0100 | |
4 | Subject: [PATCH] s3-rpc_client: Fix updating netlogon credentials. | |
5 | MIME-Version: 1.0 | |
6 | Content-Type: text/plain; charset=utf8 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ||
9 | Signed-off-by: Günther Deschner <gd@samba.org> | |
10 | (cherry picked from commit 33206b1e240e55acedad606aed4f1952f7496b35) | |
11 | --- | |
12 | source3/rpc_client/cli_pipe.c | 15 +++++++-------- | |
13 | 1 file changed, 7 insertions(+), 8 deletions(-) | |
14 | ||
15 | diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c | |
16 | index a211d92..92ca494 100644 | |
17 | --- a/source3/rpc_client/cli_pipe.c | |
18 | +++ b/source3/rpc_client/cli_pipe.c | |
19 | @@ -2128,9 +2128,6 @@ static void rpc_pipe_bind_step_two_done(struct tevent_req *subreq) | |
20 | struct rpc_pipe_bind_state *state = | |
21 | tevent_req_data(req, | |
22 | struct rpc_pipe_bind_state); | |
23 | - struct schannel_state *schannel_auth = | |
24 | - talloc_get_type_abort(state->cli->auth->auth_ctx, | |
25 | - struct schannel_state); | |
26 | NTSTATUS status; | |
27 | ||
28 | status = dcerpc_netr_LogonGetCapabilities_r_recv(subreq, talloc_tos()); | |
29 | @@ -2188,8 +2185,8 @@ static void rpc_pipe_bind_step_two_done(struct tevent_req *subreq) | |
30 | return; | |
31 | } | |
32 | ||
33 | - TALLOC_FREE(schannel_auth->creds); | |
34 | - schannel_auth->creds = talloc_steal(state->cli, state->creds); | |
35 | + TALLOC_FREE(state->cli->dc); | |
36 | + state->cli->dc = talloc_steal(state->cli, state->creds); | |
37 | ||
38 | if (!NT_STATUS_IS_OK(state->r.out.result)) { | |
39 | DEBUG(0, ("dcerpc_netr_LogonGetCapabilities_r_recv failed with %s\n", | |
40 | @@ -3385,10 +3382,12 @@ NTSTATUS cli_rpc_pipe_open_schannel_with_key(struct cli_state *cli, | |
41 | * The credentials on a new netlogon pipe are the ones we are passed | |
42 | * in - copy them over | |
43 | */ | |
44 | - result->dc = netlogon_creds_copy(result, *pdc); | |
45 | if (result->dc == NULL) { | |
46 | - TALLOC_FREE(result); | |
47 | - return NT_STATUS_NO_MEMORY; | |
48 | + result->dc = netlogon_creds_copy(result, *pdc); | |
49 | + if (result->dc == NULL) { | |
50 | + TALLOC_FREE(result); | |
51 | + return NT_STATUS_NO_MEMORY; | |
52 | + } | |
53 | } | |
54 | ||
55 | DEBUG(10,("cli_rpc_pipe_open_schannel_with_key: opened pipe %s to machine %s " | |
56 | -- | |
57 | 1.9.1 | |
58 |