summaryrefslogtreecommitdiff
path: root/source3/client
diff options
context:
space:
mode:
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/client.c19
-rw-r--r--source3/client/clitar.c12
-rwxr-xr-xsource3/client/mount.cifs.c5
-rw-r--r--source3/client/smbmount.c4
-rw-r--r--source3/client/tree.c6
5 files changed, 28 insertions, 18 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 918b435b2d..d9c3a7aa1b 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -659,7 +659,7 @@ static int do_get(char *rname, char *lname, BOOL reget)
GetTimeOfDay(&tp_start);
if (lowercase) {
- strlower(lname);
+ strlower_m(lname);
}
fnum = cli_open(cli, rname, O_RDONLY, DENY_NONE);
@@ -834,7 +834,7 @@ static void do_mget(file_info *finfo)
unix_format(finfo->name);
if (lowercase)
- strlower(finfo->name);
+ strlower_m(finfo->name);
if (!directory_exist(finfo->name,NULL) &&
mkdir(finfo->name,0777) != 0) {
@@ -2108,7 +2108,7 @@ static struct
/* Yes, this must be here, see crh's comment above. */
{"!",NULL,"run a shell command on the local system",{COMPL_NONE,COMPL_NONE}},
- {"",NULL,NULL,{COMPL_NONE,COMPL_NONE}}
+ {NULL,NULL,NULL,{COMPL_NONE,COMPL_NONE}}
};
@@ -2328,11 +2328,9 @@ static char **completion_fn(const char *text, int start, int end)
if (sp == NULL)
return NULL;
- for (i = 0; commands[i].description; i++) {
+ for (i = 0; commands[i].name; i++)
if ((strncmp(commands[i].name, text, sp - buf) == 0) && (commands[i].name[sp - buf] == 0))
break;
- }
-
if (commands[i].name == NULL)
return NULL;
@@ -2565,6 +2563,9 @@ static struct cli_state *do_connect(const char *server, const char *share)
if (password[0] || !username[0] || use_kerberos ||
!cli_session_setup(c, "", "", 0, "", 0, lp_workgroup())) {
d_printf("session setup failed: %s\n", cli_errstr(c));
+ if (NT_STATUS_V(cli_nt_error(c)) ==
+ NT_STATUS_V(NT_STATUS_MORE_PROCESSING_REQUIRED))
+ d_printf("did you forget to run kinit?\n");
cli_shutdown(c);
return NULL;
}
@@ -2749,7 +2750,7 @@ static void remember_query_host(const char *arg,
{ "tar", 'T', POPT_ARG_STRING, NULL, 'T', "Command line tar", "<c|x>IXFqgbNan" },
{ "directory", 'D', POPT_ARG_STRING, NULL, 'D', "Start from directory", "DIR" },
{ "command", 'c', POPT_ARG_STRING, &cmdstr, 'c', "Execute semicolon separated commands" },
- { "send-buffer", 'b', POPT_ARG_INT, NULL, 'b', "Changes the transmit/send buffer", "BYTES" },
+ { "send-buffer", 'b', POPT_ARG_INT, &io_bufsize, 'b', "Changes the transmit/send buffer", "BYTES" },
{ "port", 'p', POPT_ARG_INT, &port, 'p', "Port to connect to", "PORT" },
POPT_COMMON_SAMBA
POPT_COMMON_CONNECTION
@@ -2823,9 +2824,6 @@ static void remember_query_host(const char *arg,
case 'D':
fstrcpy(base_directory,poptGetOptArg(pc));
break;
- case 'b':
- io_bufsize = MAX(1, atoi(poptGetOptArg(pc)));
- break;
}
}
@@ -2864,6 +2862,7 @@ static void remember_query_host(const char *arg,
pstrcpy(username, cmdline_auth_info.username);
pstrcpy(password, cmdline_auth_info.password);
+
use_kerberos = cmdline_auth_info.use_kerberos;
got_pass = cmdline_auth_info.got_pass;
diff --git a/source3/client/clitar.c b/source3/client/clitar.c
index dfda997ca2..765bc2a659 100644
--- a/source3/client/clitar.c
+++ b/source3/client/clitar.c
@@ -197,7 +197,7 @@ static void writetarheader(int f, const char *aname, SMB_BIG_UINT size, time_t m
fixtarname(hb.dbuf.name, aname, (l >= NAMSIZ) ? NAMSIZ : l + 1);
if (lowercase)
- strlower(hb.dbuf.name);
+ strlower_m(hb.dbuf.name);
/* write out a "standard" tar format header */
@@ -206,6 +206,16 @@ static void writetarheader(int f, const char *aname, SMB_BIG_UINT size, time_t m
oct_it((SMB_BIG_UINT)0, 8, hb.dbuf.uid);
oct_it((SMB_BIG_UINT)0, 8, hb.dbuf.gid);
oct_it((SMB_BIG_UINT) size, 13, hb.dbuf.size);
+ if (size > (SMB_BIG_UINT)077777777777LL) {
+
+ /* This is a non-POSIX compatible extention to store files
+ greater than 8GB. */
+
+ memset(hb.dbuf.size, 0, 4);
+ hb.dbuf.size[0]=128;
+ for (i = 8, jp=(char*)&size; i; i--)
+ hb.dbuf.size[i+3] = *(jp++);
+ }
oct_it((SMB_BIG_UINT) mtime, 13, hb.dbuf.mtime);
memcpy(hb.dbuf.chksum, " ", sizeof(hb.dbuf.chksum));
memset(hb.dbuf.linkname, 0, NAMSIZ);
diff --git a/source3/client/mount.cifs.c b/source3/client/mount.cifs.c
index 8ba1eff02e..9592dbdf96 100755
--- a/source3/client/mount.cifs.c
+++ b/source3/client/mount.cifs.c
@@ -222,6 +222,7 @@ char * parse_server(char * unc_name)
printf(" %s does not begin with \\\\ or //\n",unc_name);
return 0;
} else {
+ unc_name[0] = '\\';
unc_name[0] = '/';
unc_name[1] = '/';
unc_name += 2;
@@ -376,7 +377,7 @@ int main(int argc, char ** argv)
test_opts = xstrdup(optarg);
break;*/
case 'r': /* mount readonly */
- flags |= MS_RDONLY;;
+ flags |= MS_RDONLY;
break;
case 'U':
uuid = optarg;
@@ -388,7 +389,7 @@ int main(int argc, char ** argv)
printf ("mount: %s\n", version);
exit (0);*/
case 'w':
- flags &= ~MS_RDONLY;;
+ flags &= ~MS_RDONLY;
break;
/* case 0:
break;
diff --git a/source3/client/smbmount.c b/source3/client/smbmount.c
index 1ee7dbc8cb..343d4f2675 100644
--- a/source3/client/smbmount.c
+++ b/source3/client/smbmount.c
@@ -891,7 +891,7 @@ static void parse_mount_smb(int argc, char **argv)
got_pass = True;
memset(strchr_m(getenv("USER"),'%')+1,'X',strlen(password));
}
- strupper(username);
+ strupper_m(username);
}
if (getenv("PASSWD")) {
@@ -933,7 +933,7 @@ static void parse_mount_smb(int argc, char **argv)
if (!*my_netbios_name) {
pstrcpy(my_netbios_name, myhostname());
}
- strupper(my_netbios_name);
+ strupper_m(my_netbios_name);
init_mount();
return 0;
diff --git a/source3/client/tree.c b/source3/client/tree.c
index 94fd93c210..3b90d15f65 100644
--- a/source3/client/tree.c
+++ b/source3/client/tree.c
@@ -36,7 +36,7 @@ struct tree_data {
};
-void error_message(gchar *message) {
+static void tree_error_message(gchar *message) {
GtkWidget *dialog, *label, *okay_button;
@@ -344,7 +344,7 @@ static void cb_itemsignal( GtkWidget *item,
slprintf(errmsg, sizeof(errmsg), "cb_itemsignal: Could not open dir %s, %s\n", get_path(item), strerror(errno));
- error_message(errmsg);
+ tree_error_message(errmsg);
/* gtk_main_quit();*/
@@ -363,7 +363,7 @@ static void cb_itemsignal( GtkWidget *item,
slprintf(errmsg, sizeof(errmsg), "cb_itemsignal: Could not read dir smbc://, %s\n", strerror(errno));
- error_message(errmsg);
+ tree_error_message(errmsg);
/* gtk_main_quit();*/