From: Jeremy Allison Date: Wed, 19 Dec 2001 03:14:54 +0000 (+0000) Subject: Fix for extra capabilities from Urban Widmark . X-Git-Tag: prerelease-2-2-5pre1~974^2~81 X-Git-Url: http://git.samba.org/samba.git/?p=tprouty%2Fsamba.git;a=commitdiff_plain;h=e943ace4f0fc70476668b0445acd91314a2e2a01 Fix for extra capabilities from Urban Widmark . Jeremy. --- diff --git a/source/client/smbmount.c b/source/client/smbmount.c index 02db69dfd5..2b5617ceb5 100644 --- a/source/client/smbmount.c +++ b/source/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= SMB username - password= SMB password - credentials= file with username/password - netbiosname= source NetBIOS name - uid= mount uid or username - gid= mount gid or groupname - port= remote SMB port number - fmask= file umask - dmask= directory umask - debug= debug level - ip= destination host or IP address - workgroup= workgroup on destination - sockopt= TCP socket options - scope= NetBIOS scope - iocharset= Linux charset (iso8859-1, utf8) - codepage= server codepage (cp850) - ttl= 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= SMB username\n\ + password= SMB password\n\ + credentials= file with username/password\n\ + netbiosname= source NetBIOS name\n\ + uid= mount uid or username\n\ + gid= mount gid or groupname\n\ + port= remote SMB port number\n\ + fmask= file umask\n\ + dmask= directory umask\n\ + debug= debug level\n\ + ip= destination host or IP address\n\ + workgroup= workgroup on destination\n\ + sockopt= TCP socket options\n\ + scope= NetBIOS scope\n\ + iocharset= Linux charset (iso8859-1, utf8)\n\ + codepage= server codepage (cp850)\n\ + ttl= 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 */