]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:smbd: skip write-time fetching for directories.
authorRalph Boehme <slow@samba.org>
Mon, 2 Sep 2019 10:21:56 +0000 (12:21 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 11 Sep 2019 00:33:25 +0000 (00:33 +0000)
The whole logic only applies to files.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Sep 11 00:33:26 UTC 2019 on sn-devel-184

source3/smbd/dir.c
source3/smbd/smb2_query_directory.c

index f60812fd8c9fe3c6e3cb4a1c6b22b138fa89369a..49e8dd17451ee0aac53d2365a1f5a1cf2b60096c 100644 (file)
@@ -892,7 +892,7 @@ bool smbd_dirptr_get_entry(TALLOC_CTX *ctx,
                        continue;
                }
 
-               if (ask_sharemode) {
+               if (ask_sharemode && !S_ISDIR(smb_fname.st.st_ex_mode)) {
                        struct timespec write_time_ts;
                        struct file_id fileid;
 
index dc8c09b8969633d0d96f3dc4d605276c046314dd..aee17cdaed6ff256c715c4a943f8f4ae3775848b 100644 (file)
@@ -618,7 +618,9 @@ static bool smb2_query_directory_next_entry(struct tevent_req *req)
                }
        }
 
-       if (state->async_ask_sharemode) {
+       if (state->async_ask_sharemode &&
+           !S_ISDIR(smb_fname->st.st_ex_mode))
+       {
                struct tevent_req *subreq = NULL;
                char *buf = state->base_data + state->last_entry_off;