summaryrefslogtreecommitdiff
path: root/source3/client
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-07-03 19:59:37 +0200
committerVolker Lendecke <vlendec@samba.org>2011-07-03 23:57:53 +0200
commit80838491e6ac9f4299daccfc5506b3e1e79fab38 (patch)
tree0a9afeda9aa2b6d6140125c546ec4abc9a538395 /source3/client
parent714e1014c59979d9a7a7c12f21185fdf7bcab818 (diff)
downloadsamba-80838491e6ac9f4299daccfc5506b3e1e79fab38.tar.gz
samba-80838491e6ac9f4299daccfc5506b3e1e79fab38.tar.bz2
samba-80838491e6ac9f4299daccfc5506b3e1e79fab38.zip
s3: Make cli_cm_open return NTSTATUS
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Sun Jul 3 23:57:53 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/client.c62
1 files changed, 38 insertions, 24 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 94c7e98ab3..bc653d5ec7 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -4466,12 +4466,15 @@ static int process_command_string(const char *cmd_in)
/* establish the connection if not already */
if (!cli) {
- cli = cli_cm_open(talloc_tos(), NULL,
- have_ip ? dest_ss_str : desthost,
- service, auth_info,
- true, smb_encrypt,
- max_protocol, port, name_type);
- if (!cli) {
+ NTSTATUS status;
+
+ status = cli_cm_open(talloc_tos(), NULL,
+ have_ip ? dest_ss_str : desthost,
+ service, auth_info,
+ true, smb_encrypt,
+ max_protocol, port, name_type,
+ &cli);
+ if (!NT_STATUS_IS_OK(status)) {
return 1;
}
}
@@ -4938,12 +4941,13 @@ static int process_stdin(void)
static int process(const char *base_directory)
{
int rc = 0;
+ NTSTATUS status;
- cli = cli_cm_open(talloc_tos(), NULL,
- have_ip ? dest_ss_str : desthost,
- service, auth_info, true, smb_encrypt,
- max_protocol, port, name_type);
- if (!cli) {
+ status = cli_cm_open(talloc_tos(), NULL,
+ have_ip ? dest_ss_str : desthost,
+ service, auth_info, true, smb_encrypt,
+ max_protocol, port, name_type, &cli);
+ if (!NT_STATUS_IS_OK(status)) {
return 1;
}
@@ -4971,11 +4975,15 @@ static int process(const char *base_directory)
static int do_host_query(const char *query_host)
{
- cli = cli_cm_open(talloc_tos(), NULL,
- have_ip ? dest_ss_str : query_host, "IPC$", auth_info, true, smb_encrypt,
- max_protocol, port, name_type);
- if (!cli)
+ NTSTATUS status;
+
+ status = cli_cm_open(talloc_tos(), NULL,
+ have_ip ? dest_ss_str : query_host,
+ "IPC$", auth_info, true, smb_encrypt,
+ max_protocol, port, name_type, &cli);
+ if (!NT_STATUS_IS_OK(status)) {
return 1;
+ }
browse_host(true);
@@ -4997,10 +5005,13 @@ static int do_host_query(const char *query_host)
else but port 139... */
cli_shutdown(cli);
- cli = cli_cm_open(talloc_tos(), NULL,
- have_ip ? dest_ss_str : query_host, "IPC$",
- auth_info, true, smb_encrypt,
- max_protocol, 139, name_type);
+ status = cli_cm_open(talloc_tos(), NULL,
+ have_ip ? dest_ss_str : query_host,
+ "IPC$", auth_info, true, smb_encrypt,
+ max_protocol, 139, name_type, &cli);
+ if (!NT_STATUS_IS_OK(status)) {
+ cli = NULL;
+ }
}
if (cli == NULL) {
@@ -5025,12 +5036,15 @@ static int do_tar_op(const char *base_directory)
/* do we already have a connection? */
if (!cli) {
- cli = cli_cm_open(talloc_tos(), NULL,
- have_ip ? dest_ss_str : desthost,
- service, auth_info, true, smb_encrypt,
- max_protocol, port, name_type);
- if (!cli)
+ NTSTATUS status;
+
+ status = cli_cm_open(talloc_tos(), NULL,
+ have_ip ? dest_ss_str : desthost,
+ service, auth_info, true, smb_encrypt,
+ max_protocol, port, name_type, &cli);
+ if (!NT_STATUS_IS_OK(status)) {
return 1;
+ }
}
recurse=true;