summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/pvfs_search.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-09-23 07:44:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:06 -0500
commita3cec511bbef2cc7768906f3af947ce2f900bde6 (patch)
tree16c0df54ed092084abd2265acc01a111cdb4c4b3 /source4/ntvfs/posix/pvfs_search.c
parent5821c39553f1d9899f6bcfb703876de767ccebf4 (diff)
downloadsamba-a3cec511bbef2cc7768906f3af947ce2f900bde6.tar.gz
samba-a3cec511bbef2cc7768906f3af947ce2f900bde6.tar.bz2
samba-a3cec511bbef2cc7768906f3af947ce2f900bde6.zip
r2561: completely redid the ntvfs module chaining code, You can now do something like:
ntvfs handler = nbench posix and the nbench pass-thru module will be called before the posix module. The chaining logic is now much saner, and less racy, with each level in the chain getting its own private pointer rather than relying on save/restore logic in the pass-thru module. The only pass-thru module we have at the moment is the nbench one (which records all traffic in a nbench compatibe format), but I plan on soon writing a "unixuid" pass-thru module that will implement the setegid()/setgroups()/seteuid() logic for standard posix uid handling. This separation of the posix backend from the uid handling should simplify the code, and make development easier. I also modified the nbench module so it can do multiple chaining, so if you want to you can do: ntvfs module = nbench nbench posix and it will save 2 copies of the log file in /tmp. This is really only useful for testing at the moment until we have more than one pass-thru module. (This used to be commit f84c0af35cb54c8fdc4933afefc18fa4c062aae4)
Diffstat (limited to 'source4/ntvfs/posix/pvfs_search.c')
-rw-r--r--source4/ntvfs/posix/pvfs_search.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/ntvfs/posix/pvfs_search.c b/source4/ntvfs/posix/pvfs_search.c
index 1d1d973d3f..414b010263 100644
--- a/source4/ntvfs/posix/pvfs_search.c
+++ b/source4/ntvfs/posix/pvfs_search.c
@@ -255,7 +255,7 @@ static NTSTATUS pvfs_search_first_old(struct smbsrv_request *req, union smb_sear
BOOL (*callback)(void *, union smb_search_data *))
{
struct pvfs_dir *dir;
- struct pvfs_state *pvfs = req->tcon->ntvfs_private;
+ NTVFS_GET_PRIVATE(pvfs_state, pvfs, req);
struct pvfs_search_state *search;
uint_t reply_count;
uint16_t search_attrib;
@@ -331,7 +331,7 @@ static NTSTATUS pvfs_search_next_old(struct smbsrv_request *req, union smb_searc
void *search_private,
BOOL (*callback)(void *, union smb_search_data *))
{
- struct pvfs_state *pvfs = req->tcon->ntvfs_private;
+ NTVFS_GET_PRIVATE(pvfs_state, pvfs, req);
struct pvfs_search_state *search;
struct pvfs_dir *dir;
uint_t reply_count, max_count;
@@ -379,7 +379,7 @@ NTSTATUS pvfs_search_first(struct smbsrv_request *req, union smb_search_first *i
BOOL (*callback)(void *, union smb_search_data *))
{
struct pvfs_dir *dir;
- struct pvfs_state *pvfs = req->tcon->ntvfs_private;
+ NTVFS_GET_PRIVATE(pvfs_state, pvfs, req);
struct pvfs_search_state *search;
uint_t reply_count;
uint16_t search_attrib, max_count;
@@ -470,7 +470,7 @@ NTSTATUS pvfs_search_next(struct smbsrv_request *req, union smb_search_next *io,
void *search_private,
BOOL (*callback)(void *, union smb_search_data *))
{
- struct pvfs_state *pvfs = req->tcon->ntvfs_private;
+ NTVFS_GET_PRIVATE(pvfs_state, pvfs, req);
struct pvfs_search_state *search;
struct pvfs_dir *dir;
uint_t reply_count;
@@ -547,7 +547,7 @@ found:
/* close a search */
NTSTATUS pvfs_search_close(struct smbsrv_request *req, union smb_search_close *io)
{
- struct pvfs_state *pvfs = req->tcon->ntvfs_private;
+ NTVFS_GET_PRIVATE(pvfs_state, pvfs, req);
struct pvfs_search_state *search;
uint16_t handle;