summaryrefslogtreecommitdiff
path: root/source3/param/loadparm.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-06-15 18:36:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:51:57 -0500
commit2acd0848663f28afedff9b11b738e048f5ead2cc (patch)
tree3f36e5c0fc1bba20f626ae58ee5cfa9371a4f8d0 /source3/param/loadparm.c
parent2895acb6e7c476e88735096b7f5d01f616739fe3 (diff)
downloadsamba-2acd0848663f28afedff9b11b738e048f5ead2cc.tar.gz
samba-2acd0848663f28afedff9b11b738e048f5ead2cc.tar.bz2
samba-2acd0848663f28afedff9b11b738e048f5ead2cc.zip
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)
Diffstat (limited to 'source3/param/loadparm.c')
-rw-r--r--source3/param/loadparm.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 03b86a9c18..5e959dbba3 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -364,7 +364,7 @@ typedef struct
int iBlock_size;
BOOL bPreexecClose;
BOOL bRootpreexecClose;
- BOOL bCaseSensitive;
+ int iCaseSensitive;
BOOL bCasePreserve;
BOOL bShortCasePreserve;
BOOL bHideDotFiles;
@@ -487,7 +487,7 @@ static service sDefault = {
1024, /* iBlock_size */
False, /* bPreexecClose */
False, /* bRootpreexecClose */
- False, /* case sensitive */
+ Auto, /* case sensitive */
True, /* case preserve */
True, /* short case preserve */
True, /* bHideDotFiles */
@@ -980,8 +980,8 @@ static struct parm_struct parm_table[] = {
{"mangle prefix", P_INTEGER, P_GLOBAL, &Globals.mangle_prefix, NULL, NULL, FLAG_ADVANCED},
{"default case", P_ENUM, P_LOCAL, &sDefault.iDefaultCase, NULL, enum_case, FLAG_ADVANCED | FLAG_SHARE},
- {"case sensitive", P_BOOL, P_LOCAL, &sDefault.bCaseSensitive, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL},
- {"casesignames", P_BOOL, P_LOCAL, &sDefault.bCaseSensitive, NULL, NULL, FLAG_HIDE},
+ {"case sensitive", P_ENUM, P_LOCAL, &sDefault.iCaseSensitive, NULL, enum_bool_auto, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL},
+ {"casesignames", P_ENUM, P_LOCAL, &sDefault.iCaseSensitive, NULL, enum_bool_auto, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL | FLAG_HIDE},
{"preserve case", P_BOOL, P_LOCAL, &sDefault.bCasePreserve, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL},
{"short preserve case", P_BOOL, P_LOCAL, &sDefault.bShortCasePreserve, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL},
{"mangling char", P_CHAR, P_LOCAL, &sDefault.magic_char, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL},
@@ -1836,7 +1836,7 @@ FN_LOCAL_BOOL(lp_msdfs_root, bMSDfsRoot)
FN_LOCAL_BOOL(lp_autoloaded, autoloaded)
FN_LOCAL_BOOL(lp_preexec_close, bPreexecClose)
FN_LOCAL_BOOL(lp_rootpreexec_close, bRootpreexecClose)
-FN_LOCAL_BOOL(lp_casesensitive, bCaseSensitive)
+FN_LOCAL_INTEGER(lp_casesensitive, iCaseSensitive)
FN_LOCAL_BOOL(lp_preservecase, bCasePreserve)
FN_LOCAL_BOOL(lp_shortpreservecase, bShortCasePreserve)
FN_LOCAL_BOOL(lp_hide_dot_files, bHideDotFiles)
@@ -2997,10 +2997,8 @@ static void lp_set_enum_parm( struct parm_struct *parm, const char *pszParmValue
{
int i;
- for (i = 0; parm->enum_list[i].name; i++)
- {
- if ( strequal(pszParmValue, parm->enum_list[i].name))
- {
+ for (i = 0; parm->enum_list[i].name; i++) {
+ if ( strequal(pszParmValue, parm->enum_list[i].name)) {
*ptr = parm->enum_list[i].value;
break;
}
@@ -3870,11 +3868,12 @@ BOOL lp_load(const char *pszFname, BOOL global_only, BOOL save_defaults,
/* get the username for substituion -- preference to the current_user_info */
- if ( strlen( current_user_info.smb_name ) != 0 )
+ if ( strlen( current_user_info.smb_name ) != 0 ) {
username = current_user_info.smb_name;
- else
+ } else {
username = sub_get_smb_name();
-
+ }
+
standard_sub_basic( username, n2,sizeof(n2) );
add_to_file_list(pszFname, n2);
@@ -3889,8 +3888,7 @@ BOOL lp_load(const char *pszFname, BOOL global_only, BOOL save_defaults,
init_globals();
debug_init();
- if (save_defaults)
- {
+ if (save_defaults) {
init_locals();
lp_save_defaults();
}