diff options
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/client.c | 2 | ||||
-rw-r--r-- | source3/client/smbmnt.c | 2 | ||||
-rw-r--r-- | source3/client/smbmount.c | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index 04a30ffb21..65f3a7a75e 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -1838,7 +1838,7 @@ static void process_stdin(void) int i; /* display a prompt */ - slprintf(prompt, sizeof(prompt), "smb: %s> ", cur_dir); + slprintf(prompt, sizeof(prompt)-1, "smb: %s> ", cur_dir); line = smb_readline(prompt, readline_callback, completion_fn); if (!line) break; diff --git a/source3/client/smbmnt.c b/source3/client/smbmnt.c index 209d50ab81..36248987b1 100644 --- a/source3/client/smbmnt.c +++ b/source3/client/smbmnt.c @@ -160,7 +160,7 @@ do_mount(char *share_name, unsigned int flags, struct smb_mount_data *data) data2 = (char *) data; } - slprintf(opts, sizeof(opts), + slprintf(opts, sizeof(opts)-1, "version=7,uid=%d,gid=%d,file_mode=0%o,dir_mode=0%o,%s", data->uid, data->gid, data->file_mode, data->dir_mode,options); if (mount(share_name, ".", "smbfs", flags, data1) == 0) diff --git a/source3/client/smbmount.c b/source3/client/smbmount.c index 9b92cf261a..35677815ff 100644 --- a/source3/client/smbmount.c +++ b/source3/client/smbmount.c @@ -455,22 +455,22 @@ static void init_mount(void) args[i++] = "-r"; } if (mount_uid) { - slprintf(tmp, sizeof(tmp), "%d", mount_uid); + slprintf(tmp, sizeof(tmp)-1, "%d", mount_uid); args[i++] = "-u"; args[i++] = xstrdup(tmp); } if (mount_gid) { - slprintf(tmp, sizeof(tmp), "%d", mount_gid); + slprintf(tmp, sizeof(tmp)-1, "%d", mount_gid); args[i++] = "-g"; args[i++] = xstrdup(tmp); } if (mount_fmask) { - slprintf(tmp, sizeof(tmp), "0%o", mount_fmask); + slprintf(tmp, sizeof(tmp)-1, "0%o", mount_fmask); args[i++] = "-f"; args[i++] = xstrdup(tmp); } if (mount_dmask) { - slprintf(tmp, sizeof(tmp), "0%o", mount_dmask); + slprintf(tmp, sizeof(tmp)-1, "0%o", mount_dmask); args[i++] = "-d"; args[i++] = xstrdup(tmp); } |