summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-09-27 05:11:45 +0200
committerMichael Adam <obnox@samba.org>2013-10-17 16:12:17 +0200
commit226dde2879ff8b4b366bf3d9f44f59e7fdc343c0 (patch)
treeea75afa7420141305bdddcc98a1e972bcdbea99a /source3/libsmb
parent60f16bacdc242a8512df352dcdd625661e4b25ad (diff)
downloadsamba-226dde2879ff8b4b366bf3d9f44f59e7fdc343c0.tar.gz
samba-226dde2879ff8b4b366bf3d9f44f59e7fdc343c0.tar.bz2
samba-226dde2879ff8b4b366bf3d9f44f59e7fdc343c0.zip
s3:libsmb: call smbXcli_tcon_{get,set}_fs_attributes() from cli_set_case_sensitive()
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clientgen.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 821a134a6c..e717bb2ed3 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -426,6 +426,23 @@ uint16_t cli_state_set_uid(struct cli_state *cli, uint16_t uid)
bool cli_set_case_sensitive(struct cli_state *cli, bool case_sensitive)
{
bool ret = cli->case_sensitive;
+ uint32_t fs_attrs;
+ struct smbXcli_tcon *tcon;
+
+ if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) {
+ tcon = cli->smb2.tcon;
+ } else {
+ tcon = cli->smb1.tcon;
+ }
+
+ fs_attrs = smbXcli_tcon_get_fs_attributes(tcon);
+ if (case_sensitive) {
+ fs_attrs |= FILE_CASE_SENSITIVE_SEARCH;
+ } else {
+ fs_attrs &= ~FILE_CASE_SENSITIVE_SEARCH;
+ }
+ smbXcli_tcon_set_fs_attributes(tcon, fs_attrs);
+
cli->case_sensitive = case_sensitive;
return ret;
}