Bug 12571 - The VFS dirsort module should not walk directories twice
Summary: The VFS dirsort module should not walk directories twice
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: 4.5.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-09 15:46 UTC by Andreas Schneider
Modified: 2017-02-21 08:48 UTC (History)
3 users (show)

See Also:


Attachments
patch for 4.6, 4.5 and 4.4 (3.24 KB, patch)
2017-02-10 12:37 UTC, Andreas Schneider
jra: review+
Details
patch for 4.4 (3.24 KB, patch)
2017-02-13 16:26 UTC, Andreas Schneider
no flags Details
patch for 4.5 (3.24 KB, patch)
2017-02-13 16:26 UTC, Andreas Schneider
no flags Details
patch for 4.6 (3.24 KB, patch)
2017-02-13 16:27 UTC, Andreas Schneider
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schneider 2017-02-09 15:46:05 UTC
The VFS dirsort module should not walk directories twice.


Patch will follow.
Comment 1 Andreas Schneider 2017-02-10 12:37:24 UTC
Created attachment 12914 [details]
patch for 4.6, 4.5 and 4.4
Comment 2 Jeremy Allison 2017-02-10 18:35:16 UTC
Comment on attachment 12914 [details]
patch for 4.6, 4.5 and 4.4

LGTM.
Comment 3 Jeremy Allison 2017-02-10 18:38:46 UTC
Re-assigning to Karolin for inclusion in 4.6.next, 4.5.next, 4.4.next.
Comment 4 Karolin Seeger 2017-02-13 15:53:52 UTC
(In reply to Jeremy Allison from comment #3)
Patch does not apply on all three current branches.

user@#host:/data/git/samba/v4-6-test$ git am ../v4-4-test/bug-12531-4.4v1
Applying: s3: smbd: Correctly canonicalize any incoming shadow copy path.
error: patch failed: source3/smbd/filename.c:220
error: source3/smbd/filename.c: patch does not apply
Comment 5 Andreas Schneider 2017-02-13 16:26:06 UTC
Created attachment 12922 [details]
patch for 4.4
Comment 6 Andreas Schneider 2017-02-13 16:26:54 UTC
Created attachment 12923 [details]
patch for 4.5
Comment 7 Andreas Schneider 2017-02-13 16:27:47 UTC
Created attachment 12924 [details]
patch for 4.6
Comment 8 Andreas Schneider 2017-02-13 16:29:30 UTC
This patch only applies to source3/modules/vfs_dirsort.c it doesn't touch source3/smbd/filename.c.

Did you try to apply the wrong patch? However I cherry-picked the patch again to all branches and generated it there.
Comment 9 Jeremy Allison 2017-02-13 19:00:25 UTC
Yes, I did test the original patches applied cleanly to 4.6.x, 4.5.x and 4.4.x and compiled before adding my +1.
Comment 10 Karolin Seeger 2017-02-17 10:57:47 UTC
Might be that I tried the wrong patch, sorry.
Pushed to autobuild-v4-{6,5,4}-test.
Comment 11 Karolin Seeger 2017-02-21 08:48:49 UTC
(In reply to Karolin Seeger from comment #10)
Pushed to all branches.
Closing out bug report.

Thanks!