s3: vfs_dirsort module.
commitc86c98d18e2b0719238341d6b8d5554a9abaa350
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:31:51 +0000 (14 20:31 +0100)
tree0141b5050e390b25169267ae534441757c6ffe3f
parent9e398837bab5e520429fc93e3277f00b6081559c
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>
(back-ported from commit fd79652b0e598882e0c4d156bd897c29dae8ec04)
source3/modules/vfs_dirsort.c