summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/client/smbmount.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/source3/client/smbmount.c b/source3/client/smbmount.c
index 98302485e4..1ee7dbc8cb 100644
--- a/source3/client/smbmount.c
+++ b/source3/client/smbmount.c
@@ -51,6 +51,8 @@ static unsigned mount_dmask;
static BOOL use_kerberos;
/* TODO: Add code to detect smbfs version in kernel */
static BOOL status32_smbfs = False;
+static BOOL smbfs_has_unicode = False;
+static BOOL smbfs_has_lfs = False;
static void usage(void);
@@ -201,15 +203,14 @@ static struct cli_state *do_connection(char *the_service)
/* This should be right for current smbfs. Future versions will support
large files as well as unicode and oplocks. */
- if (status32_smbfs) {
- c->capabilities &= ~(CAP_UNICODE | CAP_LARGE_FILES | CAP_NT_SMBS |
- CAP_NT_FIND | CAP_LEVEL_II_OPLOCKS);
- }
- else {
- c->capabilities &= ~(CAP_UNICODE | CAP_LARGE_FILES | CAP_NT_SMBS |
- CAP_NT_FIND | CAP_STATUS32 |
- CAP_LEVEL_II_OPLOCKS);
- c->force_dos_errors = True;
+ c->capabilities &= ~(CAP_NT_SMBS | CAP_NT_FIND | CAP_LEVEL_II_OPLOCKS);
+ if (!smbfs_has_lfs)
+ c->capabilities &= ~CAP_LARGE_FILES;
+ if (!smbfs_has_unicode)
+ c->capabilities &= ~CAP_UNICODE;
+ if (!status32_smbfs) {
+ c->capabilities &= ~CAP_STATUS32;
+ c->force_dos_errors = True;
}
if (!cli_session_setup(c, username,
@@ -683,6 +684,8 @@ static void usage(void)
scope=<arg> NetBIOS scope\n\
iocharset=<arg> Linux charset (iso8859-1, utf8)\n\
codepage=<arg> server codepage (cp850)\n\
+ unicode use unicode when communicating with server\n\
+ lfs large file system support\n\
ttl=<arg> dircache time to live\n\
guest don't prompt for a password\n\
ro mount read-only\n\
@@ -828,6 +831,10 @@ static void parse_mount_smb(int argc, char **argv)
mount_ro = 0;
} else if(!strcmp(opts, "ro")) {
mount_ro = 1;
+ } else if(!strcmp(opts, "unicode")) {
+ smbfs_has_unicode = True;
+ } else if(!strcmp(opts, "lfs")) {
+ smbfs_has_lfs = True;
} else {
strncpy(p, opts, sizeof(pstring) - (p - options) - 1);
p += strlen(opts);