From b3e9dfc37585b9544f95c0a6cdac2d2149cd476a Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Tue, 8 Apr 2003 15:38:38 +0000 Subject: Update smbmount to include unicode and lfs capabilities options -- smbfs supports this already (This used to be commit fbbb9a6660e1e384d7a4ff4c5fe2d077246bedd1) --- source3/client/smbmount.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'source3/client/smbmount.c') 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= NetBIOS scope\n\ iocharset= Linux charset (iso8859-1, utf8)\n\ codepage= server codepage (cp850)\n\ + unicode use unicode when communicating with server\n\ + lfs large file system support\n\ ttl= 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); -- cgit