summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorLuk Claes <luk@debian.org>2012-05-19 17:31:50 +0200
committerStefan Metzmacher <metze@samba.org>2012-05-28 14:49:45 +0200
commit4f6f4ea93c83fa5154f450e2e43649467e4c2b32 (patch)
tree5d765e8b1d8bcf9215a4dce43585a69ccfc66819 /source3/utils
parent987e81b0ee681a25a8e3308169626a2206e3fd26 (diff)
downloadsamba-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/utils')
-rw-r--r--source3/utils/net_rap.c5
-rw-r--r--source3/utils/net_rpc.c6
-rw-r--r--source3/utils/net_rpc_join.c6
-rw-r--r--source3/utils/net_rpc_printer.c12
4 files changed, 15 insertions, 14 deletions
diff --git a/source3/utils/net_rap.c b/source3/utils/net_rap.c
index 67e6416cfa..d5b78fc99c 100644
--- a/source3/utils/net_rap.c
+++ b/source3/utils/net_rap.c
@@ -28,6 +28,7 @@
#include "utils/net.h"
#include "libsmb/libsmb.h"
#include "libsmb/clirap.h"
+#include "../libcli/smb/smbXcli_base.h"
/* The following messages were for error checking that is not properly
reported at the moment. Which should be reinstated? */
@@ -702,7 +703,7 @@ static int rap_printq_info(struct net_context *c, int argc, const char **argv)
if (!NT_STATUS_IS_OK(net_make_ipc_connection(c, 0, &cli)))
return -1;
- d_printf(PRINTQ_ENUM_DISPLAY, cli_state_remote_name(cli)); /* list header */
+ d_printf(PRINTQ_ENUM_DISPLAY, smbXcli_conn_remote_name(cli->conn)); /* list header */
ret = cli_NetPrintQGetInfo(cli, argv[0], enum_queue, enum_jobs);
cli_shutdown(cli);
return ret;
@@ -763,7 +764,7 @@ int net_rap_printq(struct net_context *c, int argc, const char **argv)
if (!NT_STATUS_IS_OK(net_make_ipc_connection(c, 0, &cli)))
return -1;
- d_printf(PRINTQ_ENUM_DISPLAY, cli_state_remote_name(cli)); /* list header */
+ d_printf(PRINTQ_ENUM_DISPLAY, smbXcli_conn_remote_name(cli->conn)); /* list header */
ret = cli_NetPrintQEnum(cli, enum_queue, enum_jobs);
cli_shutdown(cli);
return ret;
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 3196b4f871..37f088dae8 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -207,7 +207,7 @@ int run_rpc_command(struct net_context *c,
NCACN_IP_TCP : NCACN_NP,
DCERPC_AUTH_TYPE_NTLMSSP,
DCERPC_AUTH_LEVEL_PRIVACY,
- cli_state_remote_name(cli),
+ smbXcli_conn_remote_name(cli->conn),
lp_workgroup(), c->opt_user_name,
c->opt_password, &pipe_hnd);
} else {
@@ -353,7 +353,7 @@ static NTSTATUS rpc_oldjoin_internals(struct net_context *c,
if (!NT_STATUS_IS_OK(result)) {
DEBUG(0,("rpc_oldjoin_internals: netlogon pipe open to machine %s failed. "
"error was %s\n",
- cli_state_remote_name(cli),
+ smbXcli_conn_remote_name(cli->conn),
nt_errstr(result) ));
return result;
}
@@ -3983,7 +3983,7 @@ static NTSTATUS rpc_share_migrate_files_internals(struct net_context *c,
/* open share source */
nt_status = connect_to_service(c, &cp_clistate.cli_share_src,
smbXcli_conn_remote_sockaddr(cli->conn),
- cli_state_remote_name(cli),
+ smbXcli_conn_remote_name(cli->conn),
info502.name, "A:");
if (!NT_STATUS_IS_OK(nt_status))
goto done;
diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c
index 06a01c0608..f89ffb8b10 100644
--- a/source3/utils/net_rpc_join.c
+++ b/source3/utils/net_rpc_join.c
@@ -123,7 +123,7 @@ NTSTATUS net_rpc_join_ok(struct net_context *c, const char *domain,
} else {
DEBUG(0,("net_rpc_join_ok: failed to get schannel session "
"key from server %s for domain %s. Error was %s\n",
- cli_state_remote_name(cli), domain, nt_errstr(ntret) ));
+ smbXcli_conn_remote_name(cli->conn), domain, nt_errstr(ntret) ));
cli_shutdown(cli);
return ntret;
}
@@ -144,7 +144,7 @@ NTSTATUS net_rpc_join_ok(struct net_context *c, const char *domain,
if (!NT_STATUS_IS_OK(ntret)) {
DEBUG(0,("net_rpc_join_ok: failed to open schannel session "
"on netlogon pipe to server %s for domain %s. Error was %s\n",
- cli_state_remote_name(cli), domain, nt_errstr(ntret) ));
+ smbXcli_conn_remote_name(cli->conn), domain, nt_errstr(ntret) ));
/*
* Note: here, we have:
* (pipe_hnd != NULL) if and only if NT_STATUS_IS_OK(ntret)
@@ -513,7 +513,7 @@ int net_rpc_join_newstyle(struct net_context *c, int argc, const char **argv)
}
/* double-check, connection from scratch */
- status = net_rpc_join_ok(c, domain, cli_state_remote_name(cli),
+ status = net_rpc_join_ok(c, domain, smbXcli_conn_remote_name(cli->conn),
smbXcli_conn_remote_sockaddr(cli->conn));
retval = NT_STATUS_IS_OK(status) ? 0 : -1;
diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c
index 7348595c98..0ab08efcc0 100644
--- a/source3/utils/net_rpc_printer.c
+++ b/source3/utils/net_rpc_printer.c
@@ -369,9 +369,9 @@ NTSTATUS net_copy_file(struct net_context *c,
d_printf(_("copying [\\\\%s\\%s%s] => [\\\\%s\\%s%s] "
"%s ACLs and %s DOS Attributes %s\n"),
- cli_state_remote_name(cli_share_src),
+ smbXcli_conn_remote_name(cli_share_src->conn),
cli_share_src->share, src_name,
- cli_state_remote_name(cli_share_dst),
+ smbXcli_conn_remote_name(cli_share_dst->conn),
cli_share_dst->share, dst_name,
copy_acls ? _("with") : _("without"),
copy_attrs ? _("with") : _("without"),
@@ -389,7 +389,7 @@ NTSTATUS net_copy_file(struct net_context *c,
if (!NT_STATUS_IS_OK(nt_status)) {
d_fprintf(stderr,
_("Error reading file [\\\\%s\\%s%s]: %s\n"),
- cli_state_remote_name(cli_share_src),
+ smbXcli_conn_remote_name(cli_share_src->conn),
cli_share_src->share,
src_name, nt_errstr(nt_status));
goto out;
@@ -404,7 +404,7 @@ NTSTATUS net_copy_file(struct net_context *c,
if (!NT_STATUS_IS_OK(nt_status)) {
d_fprintf(stderr,
_("Error writing file: [\\\\%s\\%s%s]: %s\n"),
- cli_state_remote_name(cli_share_dst),
+ smbXcli_conn_remote_name(cli_share_dst->conn),
cli_share_dst->share,
dst_name, nt_errstr(nt_status));
goto out;
@@ -1916,7 +1916,7 @@ NTSTATUS rpc_printer_migrate_drivers_internals(struct net_context *c,
/* open print$-share on the src server */
nt_status = connect_to_service(c, &cli_share_src,
smbXcli_conn_remote_sockaddr(cli->conn),
- cli_state_remote_name(cli),
+ smbXcli_conn_remote_name(cli->conn),
"print$", "A:");
if (!NT_STATUS_IS_OK(nt_status))
goto done;
@@ -1927,7 +1927,7 @@ NTSTATUS rpc_printer_migrate_drivers_internals(struct net_context *c,
/* open print$-share on the dst server */
nt_status = connect_to_service(c, &cli_share_dst,
smbXcli_conn_remote_sockaddr(cli_dst->conn),
- cli_state_remote_name(cli_dst),
+ smbXcli_conn_remote_name(cli_dst->conn),
"print$", "A:");
if (!NT_STATUS_IS_OK(nt_status))
return nt_status;