s3: vfs_dirsort module.
commit9cb8ae1de2649f5f7993c799ea7c655f167403d1
authorJeremy Allison <jra@samba.org>
Thu, 30 Jan 2014 01:01:30 +0000 (29 17:01 -0800)
committerKarolin Seeger <kseeger@samba.org>
Fri, 14 Feb 2014 19:32:38 +0000 (14 20:32 +0100)
tree2fa3e35643a16d53c2c275b1e098a521189284bc
parent4ce9501d4d4aed8db3a666b77b556b97f8693014
s3: vfs_dirsort module.

Allow dirsort to work when multiple simultaneous
directories are open. The old code only keeps one
active private data pointer on the connection struct, opening
a second directory on the same connection will overwrite it.

This modification turns the private data pointer
into a linked list of open directories on the
connection struct, and finds the correct one by searching
on the passed in DIR *.

With this code in place, smbd passes raw.search
torture test on a share definition with:

vfs objects = dirsort

https://bugzilla.samba.org/show_bug.cgi?id=10406

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit fd79652b0e598882e0c4d156bd897c29dae8ec04)
source3/modules/vfs_dirsort.c