s3: vfs_dirsort module.
authorJeremy Allison <jra@samba.org>
Thu, 30 Jan 2014 01:01:30 +0000 (17:01 -0800)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 11 Feb 2014 23:37:03 +0000 (12:37 +1300)
commitfd79652b0e598882e0c4d156bd897c29dae8ec04
tree0b5b5ac7e70fe7a1f149ecfc7b20cd18919958d6
parentda9b3c15d52cd3b2acccd376a41bea828292668d
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>
source3/modules/vfs_dirsort.c