From 226dde2879ff8b4b366bf3d9f44f59e7fdc343c0 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 27 Sep 2013 05:11:45 +0200 Subject: 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 Reviewed-by: Michael Adam --- source3/libsmb/clientgen.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'source3') 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; } -- cgit