summaryrefslogtreecommitdiff
path: root/source3/client
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2003-04-08 15:38:38 +0000
committerAlexander Bokovoy <ab@samba.org>2003-04-08 15:38:38 +0000
commitb3e9dfc37585b9544f95c0a6cdac2d2149cd476a (patch)
tree984d8688c9ca8a4d22644ee642b283c4123773c6 /source3/client
parentb4f1061cca33d66a0e473cb6631b1373bca338ac (diff)
downloadsamba-b3e9dfc37585b9544f95c0a6cdac2d2149cd476a.tar.gz
samba-b3e9dfc37585b9544f95c0a6cdac2d2149cd476a.tar.bz2
samba-b3e9dfc37585b9544f95c0a6cdac2d2149cd476a.zip
Update smbmount to include unicode and lfs capabilities options -- smbfs supports this already
(This used to be commit fbbb9a6660e1e384d7a4ff4c5fe2d077246bedd1)
Diffstat (limited to 'source3/client')
-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);