summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-12-19 03:14:54 +0000
committerJeremy Allison <jra@samba.org>2001-12-19 03:14:54 +0000
commit22f25edb8edf496555483e6e6f9b4ff2727b4b1d (patch)
treec572a3080c44621812ea24c8775ec9360d0faaf9
parent9648cd0c0fb39f3ba0874547d79639db2b238d1a (diff)
downloadsamba-22f25edb8edf496555483e6e6f9b4ff2727b4b1d.tar.gz
samba-22f25edb8edf496555483e6e6f9b4ff2727b4b1d.tar.bz2
samba-22f25edb8edf496555483e6e6f9b4ff2727b4b1d.zip
Fix for extra capabilities from Urban Widmark <urban@teststation.com>.
Jeremy. (This used to be commit e943ace4f0fc70476668b0445acd91314a2e2a01)
-rw-r--r--source3/client/smbmount.c58
1 files changed, 33 insertions, 25 deletions
diff --git a/source3/client/smbmount.c b/source3/client/smbmount.c
index 02db69dfd5..2b5617ceb5 100644
--- a/source3/client/smbmount.c
+++ b/source3/client/smbmount.c
@@ -184,6 +184,11 @@ 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. */
+ c->capabilities &= ~(CAP_UNICODE | CAP_LARGE_FILES | CAP_NT_SMBS |
+ CAP_NT_FIND | CAP_STATUS32 | CAP_LEVEL_II_OPLOCKS);
+ c->force_dos_errors = True;
if (!cli_session_setup(c, username,
password, strlen(password),
password, strlen(password),
@@ -355,6 +360,7 @@ static void send_fs_socket(char *the_service, char *mount_point, struct cli_stat
If we don't do this we will "leak" sockets and memory on
each reconnection we have to make. */
cli_shutdown(c);
+ c = NULL;
if (!closed) {
/* redirect stdout & stderr since we can't know that
@@ -633,31 +639,31 @@ static void usage(void)
printf("Version %s\n\n",VERSION);
printf(
-"Options:
- username=<arg> SMB username
- password=<arg> SMB password
- credentials=<filename> file with username/password
- netbiosname=<arg> source NetBIOS name
- uid=<arg> mount uid or username
- gid=<arg> mount gid or groupname
- port=<arg> remote SMB port number
- fmask=<arg> file umask
- dmask=<arg> directory umask
- debug=<arg> debug level
- ip=<arg> destination host or IP address
- workgroup=<arg> workgroup on destination
- sockopt=<arg> TCP socket options
- scope=<arg> NetBIOS scope
- iocharset=<arg> Linux charset (iso8859-1, utf8)
- codepage=<arg> server codepage (cp850)
- ttl=<arg> dircache time to live
- guest don't prompt for a password
- ro mount read-only
- rw mount read-write
-
-This command is designed to be run from within /bin/mount by giving
-the option '-t smbfs'. For example:
- mount -t smbfs -o username=tridge,password=foobar //fjall/test /data/test
+"Options:\n\
+ username=<arg> SMB username\n\
+ password=<arg> SMB password\n\
+ credentials=<filename> file with username/password\n\
+ netbiosname=<arg> source NetBIOS name\n\
+ uid=<arg> mount uid or username\n\
+ gid=<arg> mount gid or groupname\n\
+ port=<arg> remote SMB port number\n\
+ fmask=<arg> file umask\n\
+ dmask=<arg> directory umask\n\
+ debug=<arg> debug level\n\
+ ip=<arg> destination host or IP address\n\
+ workgroup=<arg> workgroup on destination\n\
+ sockopt=<arg> TCP socket options\n\
+ scope=<arg> NetBIOS scope\n\
+ iocharset=<arg> Linux charset (iso8859-1, utf8)\n\
+ codepage=<arg> server codepage (cp850)\n\
+ ttl=<arg> dircache time to live\n\
+ guest don't prompt for a password\n\
+ ro mount read-only\n\
+ rw mount read-write\n\
+\n\
+This command is designed to be run from within /bin/mount by giving\n\
+the option '-t smbfs'. For example:\n\
+ mount -t smbfs -o username=tridge,password=foobar //fjall/test /data/test\n\
");
}
@@ -808,6 +814,7 @@ static void parse_mount_smb(int argc, char **argv)
/* here we are interactive, even if run from autofs */
setup_logging("mount.smbfs",True);
+#if 0 /* JRA - Urban says not needed ? */
/* CLI_FORCE_ASCII=false makes smbmount negotiate unicode. The default
is to not announce any unicode capabilities as current smbfs does
not support it. */
@@ -816,6 +823,7 @@ static void parse_mount_smb(int argc, char **argv)
unsetenv("CLI_FORCE_ASCII");
else
setenv("CLI_FORCE_ASCII", "true", 1);
+#endif
in_client = True; /* Make sure that we tell lp_load we are */