}
}
+ remote_name = smbXcli_conn_remote_name(cli->conn);
+ remote_sockaddr = smbXcli_conn_remote_sockaddr(cli->conn);
+
do_serverauth = force_reauth || !found_existing_creds;
if (!do_serverauth) {
/*
* Do the quick schannel bind without a reauth
*/
- status = cli_rpc_pipe_open_bind_schannel(
- cli, &ndr_table_netlogon, transport, creds_ctx,
- &rpccli);
+ status = cli_rpc_pipe_open_bind_schannel(cli,
+ &ndr_table_netlogon,
+ transport,
+ creds_ctx,
+ remote_name,
+ remote_sockaddr,
+ &rpccli);
if (!retry && NT_STATUS_EQUAL(status, NT_STATUS_NETWORK_ACCESS_DENIED)) {
DBG_DEBUG("Retrying with serverauthenticate\n");
TALLOC_FREE(lck);
goto fail;
}
- remote_name = smbXcli_conn_remote_name(cli->conn);
- remote_sockaddr = smbXcli_conn_remote_sockaddr(cli->conn);
-
status = cli_rpc_pipe_open_noauth_transport(cli,
transport,
&ndr_table_netlogon,
goto done;
}
- status = cli_rpc_pipe_open_bind_schannel(
- cli, &ndr_table_netlogon, transport, creds_ctx, &rpccli);
+ status = cli_rpc_pipe_open_bind_schannel(cli,
+ &ndr_table_netlogon,
+ transport,
+ creds_ctx,
+ remote_name,
+ remote_sockaddr,
+ &rpccli);
if (!NT_STATUS_IS_OK(status)) {
DBG_DEBUG("cli_rpc_pipe_open_bind_schannel "
"failed: %s\n", nt_errstr(status));
const struct ndr_interface_table *table,
enum dcerpc_transport_t transport,
struct netlogon_creds_cli_context *netlogon_creds,
+ const char *remote_name,
+ const struct sockaddr_storage *remote_sockaddr,
struct rpc_pipe_client **_rpccli)
{
struct rpc_pipe_client *rpccli;
struct cli_credentials *cli_creds;
enum dcerpc_AuthLevel auth_level;
NTSTATUS status;
- const char *remote_name = smbXcli_conn_remote_name(cli->conn);
- const struct sockaddr_storage *remote_sockaddr =
- smbXcli_conn_remote_sockaddr(cli->conn);
status = cli_rpc_pipe_open(cli,
transport,
struct rpc_pipe_client *rpccli;
struct netlogon_creds_cli_lck *lck;
NTSTATUS status;
+ const char *remote_name = smbXcli_conn_remote_name(cli->conn);
+ const struct sockaddr_storage *remote_sockaddr =
+ smbXcli_conn_remote_sockaddr(cli->conn);
status = netlogon_creds_cli_lck(
netlogon_creds, NETLOGON_CREDS_CLI_LCK_EXCLUSIVE,
return status;
}
- status = cli_rpc_pipe_open_bind_schannel(
- cli, table, transport, netlogon_creds, &rpccli);
+ status = cli_rpc_pipe_open_bind_schannel(cli,
+ table,
+ transport,
+ netlogon_creds,
+ remote_name,
+ remote_sockaddr,
+ &rpccli);
if (NT_STATUS_EQUAL(status, NT_STATUS_NETWORK_ACCESS_DENIED)) {
netlogon_creds_cli_delete_lck(netlogon_creds);
}
const struct ndr_interface_table *table,
enum dcerpc_transport_t transport,
struct netlogon_creds_cli_context *netlogon_creds,
+ const char *remote_name,
+ const struct sockaddr_storage *remote_sockaddr,
struct rpc_pipe_client **_rpccli);
NTSTATUS cli_rpc_pipe_open_schannel_with_creds(struct cli_state *cli,
const struct ndr_interface_table *table,
const struct ndr_interface_table *table,
enum dcerpc_transport_t transport,
const char *domain,
+ const char *remote_name,
+ const struct sockaddr_storage *remote_sockaddr,
struct rpc_pipe_client **presult,
TALLOC_CTX *mem_ctx,
struct netlogon_creds_cli_context **pcreds);
const struct ndr_interface_table *table,
enum dcerpc_transport_t transport,
const char *domain,
+ const char *remote_name,
+ const struct sockaddr_storage *remote_sockaddr,
struct rpc_pipe_client **presult,
TALLOC_CTX *mem_ctx,
struct netlogon_creds_cli_context **pcreds)
{
TALLOC_CTX *frame = talloc_stackframe();
- const char *dc_name = smbXcli_conn_remote_name(cli->conn);
struct rpc_pipe_client *result = NULL;
NTSTATUS status;
struct cli_credentials *cli_creds = NULL;
}
status = rpccli_create_netlogon_creds_ctx(cli_creds,
- dc_name,
+ remote_name,
msg_ctx,
frame,
&netlogon_creds);
cmd_entry->table,
transport,
rpcclient_netlogon_domain,
+ remote_name,
+ remote_sockaddr,
&cmd_entry->rpc_pipe,
rpcclient_msg_ctx,
&rpcclient_netlogon_creds);
if (lp_client_schannel()
&& (ndr_syntax_id_equal(&table->syntax_id,
&ndr_table_netlogon.syntax_id))) {
+ const char *remote_name =
+ smbXcli_conn_remote_name(cli->conn);
+ const struct sockaddr_storage *remote_sockaddr =
+ smbXcli_conn_remote_sockaddr(cli->conn);
+
/* Always try and create an schannel netlogon pipe. */
TALLOC_FREE(c->netlogon_creds);
nt_status = cli_rpc_pipe_open_schannel(
cli, c->msg_ctx, table, NCACN_NP,
domain_name,
+ remote_name,
+ remote_sockaddr,
&pipe_hnd, c, &c->netlogon_creds);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(0, ("Could not initialise schannel netlogon pipe. Error was %s\n",