diff options
author | Alexander Bokovoy <ab@samba.org> | 2003-04-08 15:38:09 +0000 |
---|---|---|
committer | Alexander Bokovoy <ab@samba.org> | 2003-04-08 15:38:09 +0000 |
commit | a87d3b2cba01f0d0417de0b7a1070872741b2762 (patch) | |
tree | 7fc36390cb58d4a4b93f6af6f80bd83e6c502a78 /source3 | |
parent | 1eda5b4987360b0f2f2e330e8227962fdb890623 (diff) | |
download | samba-a87d3b2cba01f0d0417de0b7a1070872741b2762.tar.gz samba-a87d3b2cba01f0d0417de0b7a1070872741b2762.tar.bz2 samba-a87d3b2cba01f0d0417de0b7a1070872741b2762.zip |
Update smbmount to include unicode and lfs capabilities options -- smbfs supports this already
(This used to be commit a003a5f052a9ef7ad14f6f79157669d1bbd37f96)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/client/smbmount.c | 25 |
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); |