s3:libsmb: remove unused cli_state->case_sensitive
authorStefan Metzmacher <metze@samba.org>
Fri, 27 Sep 2013 03:45:21 +0000 (05:45 +0200)
committerMichael Adam <obnox@samba.org>
Thu, 17 Oct 2013 14:24:52 +0000 (16:24 +0200)
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>
source3/include/client.h
source3/libsmb/clientgen.c

index babcfb8a660f293326443236f6347ff7b30bc39c..35fa2f178acd2b39ab0025f7338de163299513c3 100644 (file)
@@ -89,8 +89,6 @@ struct cli_state {
 
        bool use_oplocks; /* should we use oplocks? */
 
-       bool case_sensitive; /* False by default. */
-
        /* Where (if anywhere) this is mounted under DFS. */
        char *dfs_mountpoint;
 
index e717bb2ed322d9480f799c1a81292e19f651f642..8a3881018ea500e2dbcdf1a444c53d2a4d564225 100644 (file)
@@ -177,7 +177,6 @@ struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx,
        cli->raw_status = NT_STATUS_INTERNAL_ERROR;
        cli->map_dos_errors = true; /* remove this */
        cli->timeout = CLIENT_TIMEOUT;
-       cli->case_sensitive = false;
 
        /* Set the CLI_FORCE_DOSERR environment variable to test
           client routines using DOS errors instead of STATUS32
@@ -425,7 +424,7 @@ 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;
+       bool ret;
        uint32_t fs_attrs;
        struct smbXcli_tcon *tcon;
 
@@ -436,6 +435,11 @@ bool cli_set_case_sensitive(struct cli_state *cli, bool case_sensitive)
        }
 
        fs_attrs = smbXcli_tcon_get_fs_attributes(tcon);
+       if (fs_attrs & FILE_CASE_SENSITIVE_SEARCH) {
+               ret = true;
+       } else {
+               ret = false;
+       }
        if (case_sensitive) {
                fs_attrs |= FILE_CASE_SENSITIVE_SEARCH;
        } else {
@@ -443,7 +447,6 @@ bool cli_set_case_sensitive(struct cli_state *cli, bool case_sensitive)
        }
        smbXcli_tcon_set_fs_attributes(tcon, fs_attrs);
 
-       cli->case_sensitive = case_sensitive;
        return ret;
 }