diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-04-20 16:50:49 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-04-20 16:50:49 +0200 |
commit | 53765c81f726a8c056cc4e57004592dd489975c9 (patch) | |
tree | 74fc6b3adcf876ce3b68f38c5ac0237bf02e66bb | |
parent | 8a5d94e329e8ee2e7d4e03b9719188cb50bc4978 (diff) | |
download | samba-53765c81f726a8c056cc4e57004592dd489975c9.tar.gz samba-53765c81f726a8c056cc4e57004592dd489975c9.tar.bz2 samba-53765c81f726a8c056cc4e57004592dd489975c9.zip |
Remove use of talloc_reference in cli_rpc_pipe_open_schannel_with_key()
-rw-r--r-- | source3/include/proto.h | 2 | ||||
-rw-r--r-- | source3/libnet/libnet_join.c | 2 | ||||
-rw-r--r-- | source3/rpc_client/cli_pipe.c | 12 | ||||
-rw-r--r-- | source3/utils/net_rpc_join.c | 2 | ||||
-rw-r--r-- | source3/winbindd/winbindd_cm.c | 2 |
5 files changed, 11 insertions, 9 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index 9b27ca608a..4cb908b665 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -5244,7 +5244,7 @@ NTSTATUS cli_rpc_pipe_open_schannel_with_key(struct cli_state *cli, const struct ndr_syntax_id *interface, enum pipe_auth_level auth_level, const char *domain, - struct netlogon_creds_CredentialState *pdc, + struct netlogon_creds_CredentialState **pdc, struct rpc_pipe_client **presult); NTSTATUS cli_rpc_pipe_open_ntlmssp_auth_schannel(struct cli_state *cli, const struct ndr_syntax_id *interface, diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c index 724cc90596..8e75d36fe3 100644 --- a/source3/libnet/libnet_join.c +++ b/source3/libnet/libnet_join.c @@ -1072,7 +1072,7 @@ NTSTATUS libnet_join_ok(const char *netbios_domain_name, status = cli_rpc_pipe_open_schannel_with_key( cli, &ndr_table_netlogon.syntax_id, PIPE_AUTH_LEVEL_PRIVACY, - netbios_domain_name, netlogon_pipe->dc, &pipe_hnd); + netbios_domain_name, &netlogon_pipe->dc, &pipe_hnd); cli_shutdown(cli); diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index 567794db88..3d7db068d5 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -3845,13 +3845,15 @@ NTSTATUS get_schannel_session_key(struct cli_state *cli, External interface. Open a named pipe to an SMB server and bind using schannel (bind type 68) using session_key. sign and seal. + + The *pdc will be stolen onto this new pipe ****************************************************************************/ NTSTATUS cli_rpc_pipe_open_schannel_with_key(struct cli_state *cli, const struct ndr_syntax_id *interface, enum pipe_auth_level auth_level, const char *domain, - struct netlogon_creds_CredentialState *pdc, + struct netlogon_creds_CredentialState **pdc, struct rpc_pipe_client **presult) { struct rpc_pipe_client *result; @@ -3864,7 +3866,7 @@ NTSTATUS cli_rpc_pipe_open_schannel_with_key(struct cli_state *cli, } status = rpccli_schannel_bind_data(result, domain, auth_level, - pdc->session_key, &auth); + (*pdc)->session_key, &auth); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("rpccli_schannel_bind_data returned %s\n", nt_errstr(status))); @@ -3885,7 +3887,7 @@ NTSTATUS cli_rpc_pipe_open_schannel_with_key(struct cli_state *cli, * The credentials on a new netlogon pipe are the ones we are passed * in - reference them in */ - result->dc = talloc_reference(result, pdc); + result->dc = talloc_move(result, pdc); if (result->dc == NULL) { DEBUG(0, ("talloc reference failed\n")); TALLOC_FREE(result); @@ -3964,7 +3966,7 @@ NTSTATUS cli_rpc_pipe_open_ntlmssp_auth_schannel(struct cli_state *cli, } status = cli_rpc_pipe_open_schannel_with_key( - cli, interface, auth_level, domain, netlogon_pipe->dc, + cli, interface, auth_level, domain, &netlogon_pipe->dc, &result); /* Now we've bound using the session key we can close the netlog pipe. */ @@ -4002,7 +4004,7 @@ NTSTATUS cli_rpc_pipe_open_schannel(struct cli_state *cli, } status = cli_rpc_pipe_open_schannel_with_key( - cli, interface, auth_level, domain, netlogon_pipe->dc, + cli, interface, auth_level, domain, &netlogon_pipe->dc, &result); /* Now we've bound using the session key we can close the netlog pipe. */ diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c index 58d6cdc5af..1587793bdc 100644 --- a/source3/utils/net_rpc_join.c +++ b/source3/utils/net_rpc_join.c @@ -102,7 +102,7 @@ NTSTATUS net_rpc_join_ok(struct net_context *c, const char *domain, ntret = cli_rpc_pipe_open_schannel_with_key( cli, &ndr_table_netlogon.syntax_id, PIPE_AUTH_LEVEL_PRIVACY, - domain, netlogon_pipe->dc, &pipe_hnd); + domain, &netlogon_pipe->dc, &pipe_hnd); if (!NT_STATUS_IS_OK(ntret)) { DEBUG(0,("net_rpc_join_ok: failed to open schannel session " diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index f22f213eec..e9cf05e90b 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -2090,7 +2090,7 @@ NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx, } result = cli_rpc_pipe_open_schannel_with_key (conn->cli, &ndr_table_samr.syntax_id, PIPE_AUTH_LEVEL_PRIVACY, - domain->name, p_creds, &conn->samr_pipe); + domain->name, &p_creds, &conn->samr_pipe); if (!NT_STATUS_IS_OK(result)) { DEBUG(10,("cm_connect_sam: failed to connect to SAMR pipe for " |