diff options
author | Luk Claes <luk@debian.org> | 2012-05-19 17:31:50 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-05-28 14:49:45 +0200 |
commit | 4f6f4ea93c83fa5154f450e2e43649467e4c2b32 (patch) | |
tree | 5d765e8b1d8bcf9215a4dce43585a69ccfc66819 /source3/rpc_client | |
parent | 987e81b0ee681a25a8e3308169626a2206e3fd26 (diff) | |
download | samba-4f6f4ea93c83fa5154f450e2e43649467e4c2b32.tar.gz samba-4f6f4ea93c83fa5154f450e2e43649467e4c2b32.tar.bz2 samba-4f6f4ea93c83fa5154f450e2e43649467e4c2b32.zip |
s3:libsmb: get rid of cli_state_remote_name
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/cli_pipe.c | 5 | ||||
-rw-r--r-- | source3/rpc_client/cli_pipe_schannel.c | 13 |
2 files changed, 10 insertions, 8 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index 5f5f99201d..6b052f95ed 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -35,6 +35,7 @@ #include "libsmb/libsmb.h" #include "auth/gensec/gensec.h" #include "auth/credentials/credentials.h" +#include "../libcli/smb/smbXcli_base.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_CLI @@ -2608,7 +2609,7 @@ static NTSTATUS rpc_pipe_open_np(struct cli_state *cli, result->abstract_syntax = *abstract_syntax; result->transfer_syntax = ndr_transfer_syntax_ndr; - result->desthost = talloc_strdup(result, cli_state_remote_name(cli)); + result->desthost = talloc_strdup(result, smbXcli_conn_remote_name(cli->conn)); result->srv_name_slash = talloc_asprintf_strupper_m( result, "\\\\%s", result->desthost); @@ -2661,7 +2662,7 @@ static NTSTATUS cli_rpc_pipe_open(struct cli_state *cli, { switch (transport) { case NCACN_IP_TCP: - return rpc_pipe_open_tcp(NULL, cli_state_remote_name(cli), + return rpc_pipe_open_tcp(NULL, smbXcli_conn_remote_name(cli->conn), interface, presult); case NCACN_NP: return rpc_pipe_open_np(cli, interface, presult); diff --git a/source3/rpc_client/cli_pipe_schannel.c b/source3/rpc_client/cli_pipe_schannel.c index 0ee2a8551f..c27572047c 100644 --- a/source3/rpc_client/cli_pipe_schannel.c +++ b/source3/rpc_client/cli_pipe_schannel.c @@ -28,6 +28,7 @@ #include "passdb.h" #include "libsmb/libsmb.h" #include "auth/gensec/gensec.h" +#include "../libcli/smb/smbXcli_base.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_CLI @@ -57,7 +58,7 @@ static NTSTATUS get_schannel_session_key_common(struct rpc_pipe_client *netlogon } status = rpccli_netlogon_setup_creds(netlogon_pipe, - cli_state_remote_name(cli), /* server name */ + smbXcli_conn_remote_name(cli->conn), /* server name */ domain, /* domain */ lp_netbios_name(), /* client name */ machine_account, /* machine account name */ @@ -69,14 +70,14 @@ static NTSTATUS get_schannel_session_key_common(struct rpc_pipe_client *netlogon DEBUG(3, ("get_schannel_session_key_common: " "rpccli_netlogon_setup_creds failed with result %s " "to server %s, domain %s, machine account %s.\n", - nt_errstr(status), cli_state_remote_name(cli), domain, + nt_errstr(status), smbXcli_conn_remote_name(cli->conn), domain, machine_account )); return status; } if (((*pneg_flags) & NETLOGON_NEG_SCHANNEL) == 0) { DEBUG(3, ("get_schannel_session_key: Server %s did not offer schannel\n", - cli_state_remote_name(cli))); + smbXcli_conn_remote_name(cli->conn))); return NT_STATUS_INVALID_NETWORK_RESPONSE; } @@ -103,7 +104,7 @@ static NTSTATUS get_schannel_session_key_auth_ntlmssp(struct cli_state *cli, cli, &ndr_table_netlogon, NCACN_NP, GENSEC_OID_NTLMSSP, DCERPC_AUTH_LEVEL_PRIVACY, - cli_state_remote_name(cli), + smbXcli_conn_remote_name(cli->conn), domain, username, password, &netlogon_pipe); if (!NT_STATUS_IS_OK(status)) { return status; @@ -145,7 +146,7 @@ NTSTATUS cli_rpc_pipe_open_ntlmssp_auth_schannel(struct cli_state *cli, if (!NT_STATUS_IS_OK(status)) { DEBUG(0,("cli_rpc_pipe_open_ntlmssp_auth_schannel: failed to get schannel session " "key from server %s for domain %s.\n", - cli_state_remote_name(cli), domain )); + smbXcli_conn_remote_name(cli->conn), domain )); return status; } @@ -184,7 +185,7 @@ NTSTATUS cli_rpc_pipe_open_schannel(struct cli_state *cli, if (!NT_STATUS_IS_OK(status)) { DEBUG(0,("cli_rpc_pipe_open_schannel: failed to get schannel session " "key from server %s for domain %s.\n", - cli_state_remote_name(cli), domain )); + smbXcli_conn_remote_name(cli->conn), domain )); return status; } |