From 2acd0848663f28afedff9b11b738e048f5ead2cc Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 15 Jun 2004 18:36:45 +0000 Subject: r1154: Change default setting for case sensitivity to "auto". If set to auto then is the client supports it (current clients supported are Samba and CIFSVFS - detected by the negprot strings "Samba", "POSIX 2" and a bare "NT LM 0.12" string) then the setting of the per packet flag smb_flag FLAG_CASELESS_PATHNAMES is taken into account per packet. This allows the linux CIFS client to use Samba in a case sensitive manner. Additional command in smbclient "case_sensitive", toggles the flag in subsequent packets. Docs to follow. Jeremy. (This used to be commit cf84c0fe1a061acc0313f7db124b8f947cdf623d) --- source3/client/client.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'source3/client') diff --git a/source3/client/client.c b/source3/client/client.c index 63d73c2d4c..ea8ec93f97 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -1868,6 +1868,21 @@ static int cmd_lowercase(void) return 0; } +/**************************************************************************** + Toggle the case sensitive flag. +****************************************************************************/ + +static int cmd_setcase(void) +{ + BOOL orig_case_sensitive = cli_set_case_sensitive(cli, False); + + cli_set_case_sensitive(cli, !orig_case_sensitive); + DEBUG(2,("filename case sensitivity is now %s\n",!orig_case_sensitive ? + "on":"off")); + + return 0; +} + /**************************************************************************** Toggle the recurse flag. ****************************************************************************/ @@ -2179,6 +2194,7 @@ static struct {"archive",cmd_archive,"\n0=ignore archive bit\n1=only get archive files\n2=only get archive files and reset archive bit\n3=get all files and reset archive bit",{COMPL_NONE,COMPL_NONE}}, {"blocksize",cmd_block,"blocksize (default 20)",{COMPL_NONE,COMPL_NONE}}, {"cancel",cmd_cancel," cancel a print queue entry",{COMPL_NONE,COMPL_NONE}}, + {"case_sensitive",cmd_setcase,"toggle the case sensitive flag to server",{COMPL_NONE,COMPL_NONE}}, {"cd",cmd_cd,"[directory] change/report the remote directory",{COMPL_REMOTE,COMPL_NONE}}, {"chmod",cmd_chmod," chmod a file using UNIX permission",{COMPL_REMOTE,COMPL_REMOTE}}, {"chown",cmd_chown," chown a file using UNIX uids and gids",{COMPL_REMOTE,COMPL_REMOTE}}, -- cgit