s3: smbd: fix a check in stat_cache_add()
authorRalph Boehme <slow@samba.org>
Wed, 27 Jun 2018 11:07:00 +0000 (13:07 +0200)
committerRalph Boehme <slow@samba.org>
Sat, 7 Jul 2018 11:41:09 +0000 (13:41 +0200)
commit4ad2a716fb0733e44f5bc000fb85e31aff83e682
tree8a4b5c7a4d550aa87cbc4193d5485d67111b0d15
parent0cd44821f3889067620d685344c3eaf913a31329
s3: smbd: fix a check in stat_cache_add()

As the comment above the if condition says:

        /*
         * If we are in case insentive mode, we don't need to
         * store names that need no translation - else, it
         * would be a waste.
         */

Ie if stat_cache_add() is called as

        stat_cache_add("foo/bar", "foo/bar", false)

There's no need to cache the path, as a simple stat() on the client
supplied name (full_orig_name) matches the name used in the
filesystem (passed to stat_cache_add() as translated_path).

So fix the if condition to match the comment.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/statcache.c