summaryrefslogtreecommitdiffstats
path: root/source/include
diff options
context:
space:
mode:
authorDerrell Lipman <derrell.lipman@unwireduniverse.com>2009-01-16 16:00:41 -0500
committerDerrell Lipman <derrell.lipman@unwireduniverse.com>2009-01-16 16:00:41 -0500
commitac4baafeb8d74bf1db7f2ce84b2bc3abdef90337 (patch)
treeb9e847979ace9ff80263a477fde1b3ea6da31166 /source/include
parentd9f66f3e3d9af9c3323029207e62391f382632e9 (diff)
downloadsamba-ac4baafeb8d74bf1db7f2ce84b2bc3abdef90337.tar.gz
samba-ac4baafeb8d74bf1db7f2ce84b2bc3abdef90337.tar.xz
samba-ac4baafeb8d74bf1db7f2ce84b2bc3abdef90337.zip
Treat file names in POSIX-like case-sensitive fashion by default
*** THIS COMMIT CAUSES A CHANGE OF DEFAULT BEHAVIOR IN libsmbclient!!! *** - libsmbclient now calls cli_set_case_sensitive() for a new CLI. By default, it requests case-sensitive, but the old behavior of case-insensitive can be requested with smbc_setOptionCaseSensitive(context, False); The change of behavior is considered a bug fix, as it was previously possible to accidentally overwrite a file that had the same case-insensitive name but a different case-sensitive name as a previously-existing file, while creating a new file. Derrell
Diffstat (limited to 'source/include')
-rw-r--r--source/include/libsmb_internal.h5
-rw-r--r--source/include/libsmbclient.h9
2 files changed, 14 insertions, 0 deletions
diff --git a/source/include/libsmb_internal.h b/source/include/libsmb_internal.h
index 7cf03307123..307d6b261d2 100644
--- a/source/include/libsmb_internal.h
+++ b/source/include/libsmb_internal.h
@@ -176,6 +176,11 @@ struct SMBC_internal_data {
*/
smbc_smb_encrypt_level smb_encryption_level;
+ /*
+ * Should we request case sensitivity of file names?
+ */
+ bool case_sensitive;
+
struct smbc_server_cache * server_cache;
/* POSIX emulation functions */
diff --git a/source/include/libsmbclient.h b/source/include/libsmbclient.h
index 74d0d5c9ddb..da2e03cf080 100644
--- a/source/include/libsmbclient.h
+++ b/source/include/libsmbclient.h
@@ -550,6 +550,15 @@ smbc_getOptionSmbEncryptionLevel(SMBCCTX *c);
void
smbc_setOptionSmbEncryptionLevel(SMBCCTX *c, smbc_smb_encrypt_level level);
+/** Get whether to treat file names as case-sensitive. */
+smbc_bool
+smbc_getOptionCaseSensitive(SMBCCTX *c);
+
+/** Set whether to treat file names as case-sensitive. */
+void
+smbc_setOptionCaseSensitive(SMBCCTX *c, smbc_bool 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