diff options
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/libsmb_context.c | 1 | ||||
-rw-r--r-- | source3/libsmb/libsmb_server.c | 7 | ||||
-rw-r--r-- | source3/libsmb/libsmb_setget.c | 14 |
3 files changed, 22 insertions, 0 deletions
diff --git a/source3/libsmb/libsmb_context.c b/source3/libsmb/libsmb_context.c index 66329e2860..ca8ceedbc2 100644 --- a/source3/libsmb/libsmb_context.c +++ b/source3/libsmb/libsmb_context.c @@ -69,6 +69,7 @@ smbc_new_context(void) smbc_setOptionFullTimeNames(context, False); smbc_setOptionOpenShareMode(context, SMBC_SHAREMODE_DENY_NONE); smbc_setOptionSmbEncryptionLevel(context, SMBC_ENCRYPTLEVEL_NONE); + smbc_setOptionCaseSensitive(context, True); smbc_setOptionBrowseMaxLmbCount(context, 3); /* # LMBs to query */ smbc_setOptionUrlEncodeReaddirEntries(context, False); smbc_setOptionOneSharePerServer(context, False); diff --git a/source3/libsmb/libsmb_server.c b/source3/libsmb/libsmb_server.c index f4714346d1..e2cc07118b 100644 --- a/source3/libsmb/libsmb_server.c +++ b/source3/libsmb/libsmb_server.c @@ -356,6 +356,13 @@ again: return NULL; } + /* POSIX-like - always request case-sensitivity by default. */ + if (smbc_getOptionCaseSensitive(context)) { + cli_set_case_sensitive(c, True); + } else { + cli_set_case_sensitive(c, False); + } + if (smbc_getOptionUseKerberos(context)) { c->use_kerberos = True; } diff --git a/source3/libsmb/libsmb_setget.c b/source3/libsmb/libsmb_setget.c index d0823bd77e..bca2a80d14 100644 --- a/source3/libsmb/libsmb_setget.c +++ b/source3/libsmb/libsmb_setget.c @@ -193,6 +193,20 @@ smbc_setOptionSmbEncryptionLevel(SMBCCTX *c, smbc_smb_encrypt_level level) c->internal->smb_encryption_level = level; } +/** Get whether to treat file names as case-sensitive. */ +smbc_bool +smbc_getOptionCaseSensitive(SMBCCTX *c) +{ + return c->internal->case_sensitive; +} + +/** Set whether to treat file names as case-sensitive. */ +void +smbc_setOptionCaseSensitive(SMBCCTX *c, smbc_bool b) +{ + c->internal->case_sensitive = b; +} + /** * Get from how many local master browsers should the list of workgroups be * retrieved. It can take up to 12 minutes or longer after a server becomes a |