r1280: rename struct request_context to smbsrv_request
authorStefan Metzmacher <metze@samba.org>
Mon, 28 Jun 2004 08:39:00 +0000 (08:39 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:56:48 +0000 (12:56 -0500)
metze

28 files changed:
source/include/context.h
source/ntvfs/cifs/vfs_cifs.c
source/ntvfs/ipc/vfs_ipc.c
source/ntvfs/nbench/vfs_nbench.c
source/ntvfs/ntvfs.h
source/ntvfs/ntvfs_base.c
source/ntvfs/ntvfs_generic.c
source/ntvfs/posix/vfs_posix.c
source/ntvfs/print/vfs_print.c
source/ntvfs/reference/ref_util.c
source/ntvfs/reference/vfs_ref.c
source/ntvfs/simple/svfs_util.c
source/ntvfs/simple/vfs_simple.c
source/smb_server/negprot.c
source/smb_server/nttrans.c
source/smb_server/reply.c
source/smb_server/request.c
source/smb_server/search.c
source/smb_server/service.c
source/smb_server/sesssetup.c
source/smb_server/signing.c
source/smb_server/smb_server.c
source/smb_server/trans2.c
source/smbd/process_model.h
source/smbd/process_single.c
source/smbd/process_standard.c
source/smbd/process_thread.c
source/smbd/rewrite.c

index 2df68b96b9e1f423c7950a414736fdaaf6d478c4..93f8552d86038549c90c38c74d21cdf535db2e5e 100644 (file)
@@ -79,7 +79,7 @@ struct smbsrv_tcon {
 
 /* the context for a single SMB request. This is passed to any request-context 
    functions */
-struct request_context {
+struct smbsrv_request {
        /* the server_context contains all context specific to this SMB socket */
        struct smbsrv_context *smb_ctx;
 
@@ -130,7 +130,7 @@ struct request_context {
           end not the backend. The backend must not change it.
        */
        struct {
-               void (*send_fn)(struct request_context *);
+               void (*send_fn)(struct smbsrv_request *);
                void *private;
                NTSTATUS status;
        } async;
@@ -313,7 +313,7 @@ struct pending_request {
        struct pending_request *next, *prev;
 
        /* the request itself - needs to be freed */
-       struct request_context *request;
+       struct smbsrv_request *request;
 };
 
 /* the timers context contains info on when we last did various
index 6af8cd1878408d67b2546315451397c28c348f09..b0389b9e5999e099c9416c06a081e1d9b56488fb 100644 (file)
@@ -38,7 +38,7 @@ struct cvfs_private {
 
 /* a structure used to pass information to an async handler */
 struct async_info {
-       struct request_context *req;
+       struct smbsrv_request *req;
        void *parms;
 };
 
@@ -87,7 +87,7 @@ static void cifs_socket_handler(struct event_context *ev, struct fd_event *fde,
 /*
   connect to a share - used when a tree_connect operation comes in.
 */
-static NTSTATUS cvfs_connect(struct request_context *req, const char *sharename)
+static NTSTATUS cvfs_connect(struct smbsrv_request *req, const char *sharename)
 {
        struct smbsrv_tcon *tcon = req->tcon;
        NTSTATUS status;
@@ -149,7 +149,7 @@ static NTSTATUS cvfs_connect(struct request_context *req, const char *sharename)
           pointer in the operations structure */
        if (private->map_calls && in_list("trans2", private->map_calls, True)) {
                struct ntvfs_ops *ops = talloc_memdup(tcon->mem_ctx,tcon->ntvfs_ops,sizeof(*ops));
-               static NTSTATUS cvfs_trans2(struct request_context *,struct smb_trans2 *);
+               static NTSTATUS cvfs_trans2(struct smbsrv_request *,struct smb_trans2 *);
                if (!ops) {
                        return NT_STATUS_NO_MEMORY;
                }
@@ -195,7 +195,7 @@ static NTSTATUS cvfs_disconnect(struct smbsrv_tcon *tcon)
 static void async_simple(struct cli_request *c_req)
 {
        struct async_info *async = c_req->async.private;
-       struct request_context *req = async->req;
+       struct smbsrv_request *req = async->req;
        req->async.status = cli_request_simple_recv(c_req);
        req->async.send_fn(req);
 }
@@ -223,7 +223,7 @@ static void async_simple(struct cli_request *c_req)
   delete a file - the dirtype specifies the file types to include in the search. 
   The name can contain CIFS wildcards, but rarely does (except with OS/2 clients)
 */
-static NTSTATUS cvfs_unlink(struct request_context *req, struct smb_unlink *unl)
+static NTSTATUS cvfs_unlink(struct smbsrv_request *req, struct smb_unlink *unl)
 {
        struct cvfs_private *private = req->tcon->ntvfs_private;
        struct cli_request *c_req;
@@ -245,7 +245,7 @@ static NTSTATUS cvfs_unlink(struct request_context *req, struct smb_unlink *unl)
 static void async_ioctl(struct cli_request *c_req)
 {
        struct async_info *async = c_req->async.private;
-       struct request_context *req = async->req;
+       struct smbsrv_request *req = async->req;
        req->async.status = smb_raw_ioctl_recv(c_req, req->mem_ctx, async->parms);
        req->async.send_fn(req);
 }
@@ -253,7 +253,7 @@ static void async_ioctl(struct cli_request *c_req)
 /*
   ioctl interface
 */
-static NTSTATUS cvfs_ioctl(struct request_context *req, union smb_ioctl *io)
+static NTSTATUS cvfs_ioctl(struct smbsrv_request *req, union smb_ioctl *io)
 {
        struct cvfs_private *private = req->tcon->ntvfs_private;
        struct cli_request *c_req;
@@ -272,7 +272,7 @@ static NTSTATUS cvfs_ioctl(struct request_context *req, union smb_ioctl *io)
 /*
   check if a directory exists
 */
-static NTSTATUS cvfs_chkpath(struct request_context *req, struct smb_chkpath *cp)
+static NTSTATUS cvfs_chkpath(struct smbsrv_request *req, struct smb_chkpath *cp)
 {
        struct cvfs_private *private = req->tcon->ntvfs_private;
        struct cli_request *c_req;
@@ -292,7 +292,7 @@ static NTSTATUS cvfs_chkpath(struct request_context *req, struct smb_chkpath *cp
 static void async_qpathinfo(struct cli_request *c_req)
 {
        struct async_info *async = c_req->async.private;
-       struct request_context *req = async->req;
+       struct smbsrv_request *req = async->req;
        req->async.status = smb_raw_pathinfo_recv(c_req, req->mem_ctx, async->parms);
        req->async.send_fn(req);
 }
@@ -300,7 +300,7 @@ static void async_qpathinfo(struct cli_request *c_req)
 /*
   return info on a pathname
 */
-static NTSTATUS cvfs_qpathinfo(struct request_context *req, union smb_fileinfo *info)
+static NTSTATUS cvfs_qpathinfo(struct smbsrv_request *req, union smb_fileinfo *info)
 {
        struct cvfs_private *private = req->tcon->ntvfs_private;
        struct cli_request *c_req;
@@ -320,7 +320,7 @@ static NTSTATUS cvfs_qpathinfo(struct request_context *req, union smb_fileinfo *
 static void async_qfileinfo(struct cli_request *c_req)
 {
        struct async_info *async = c_req->async.private;
-       struct request_context *req = async->req;
+       struct smbsrv_request *req = async->req;
        req->async.status = smb_raw_fileinfo_recv(c_req, req->mem_ctx, async->parms);
        req->async.send_fn(req);
 }
@@ -328,7 +328,7 @@ static void async_qfileinfo(struct cli_request *c_req)
 /*
   query info on a open file
 */
-static NTSTATUS cvfs_qfileinfo(struct request_context *req, union smb_fileinfo *info)
+static NTSTATUS cvfs_qfileinfo(struct smbsrv_request *req, union smb_fileinfo *info)
 {
        struct cvfs_private *private = req->tcon->ntvfs_private;
        struct cli_request *c_req;
@@ -346,7 +346,7 @@ static NTSTATUS cvfs_qfileinfo(struct request_context *req, union smb_fileinfo *
 /*
   set info on a pathname
 */
-static NTSTATUS cvfs_setpathinfo(struct request_context *req, union smb_setfileinfo *st)
+static NTSTATUS cvfs_setpathinfo(struct smbsrv_request *req, union smb_setfileinfo *st)
 {
        struct cvfs_private *private = req->tcon->ntvfs_private;
        struct cli_request *c_req;
@@ -367,7 +367,7 @@ static NTSTATUS cvfs_setpathinfo(struct request_context *req, union smb_setfilei
 static void async_open(struct cli_request *c_req)
 {
        struct async_info *async = c_req->async.private;
-       struct request_context *req = async->req;
+       struct smbsrv_request *req = async->req;
        req->async.status = smb_raw_open_recv(c_req, req->mem_ctx, async->parms);
        req->async.send_fn(req);
 }
@@ -375,7 +375,7 @@ static void async_open(struct cli_request *c_req)
 /*
   open a file
 */
-static NTSTATUS cvfs_open(struct request_context *req, union smb_open *io)
+static NTSTATUS cvfs_open(struct smbsrv_request *req, union smb_open *io)
 {
        struct cvfs_private *private = req->tcon->ntvfs_private;
        struct cli_request *c_req;
@@ -397,7 +397,7 @@ static NTSTATUS cvfs_open(struct request_context *req, union smb_open *io)
 /*
   create a directory
 */
-static NTSTATUS cvfs_mkdir(struct request_context *req, union smb_mkdir *md)
+static NTSTATUS cvfs_mkdir(struct smbsrv_request *req, union smb_mkdir *md)
 {
        struct cvfs_private *private = req->tcon->ntvfs_private;
        struct cli_request *c_req;
@@ -414,7 +414,7 @@ static NTSTATUS cvfs_mkdir(struct request_context *req, union smb_mkdir *md)
 /*
   remove a directory
 */
-static NTSTATUS cvfs_rmdir(struct request_context *req, struct smb_rmdir *rd)
+static NTSTATUS cvfs_rmdir(struct smbsrv_request *req, struct smb_rmdir *rd)
 {
        struct cvfs_private *private = req->tcon->ntvfs_private;
        struct cli_request *c_req;
@@ -430,7 +430,7 @@ static NTSTATUS cvfs_rmdir(struct request_context *req, struct smb_rmdir *rd)
 /*
   rename a set of files
 */
-static NTSTATUS cvfs_rename(struct request_context *req, union smb_rename *ren)
+static NTSTATUS cvfs_rename(struct smbsrv_request *req, union smb_rename *ren)
 {
        struct cvfs_private *private = req->tcon->ntvfs_private;
        struct cli_request *c_req;
@@ -447,7 +447,7 @@ static NTSTATUS cvfs_rename(struct request_context *req, union smb_rename *ren)
 /*
   copy a set of files
 */
-static NTSTATUS cvfs_copy(struct request_context *req, struct smb_copy *cp)
+static NTSTATUS cvfs_copy(struct smbsrv_request *req, struct smb_copy *cp)
 {
        return NT_STATUS_NOT_SUPPORTED;
 }
@@ -458,7 +458,7 @@ static NTSTATUS cvfs_copy(struct request_context *req, struct smb_copy *cp)
 static void async_read(struct cli_request *c_req)
 {
        struct async_info *async = c_req->async.private;
-       struct request_context *req = async->req;
+       struct smbsrv_request *req = async->req;
        req->async.status = smb_raw_read_recv(c_req, async->parms);
        req->async.send_fn(req);
 }
@@ -466,7 +466,7 @@ static void async_read(struct cli_request *c_req)
 /*
   read from a file
 */
-static NTSTATUS cvfs_read(struct request_context *req, union smb_read *rd)
+static NTSTATUS cvfs_read(struct smbsrv_request *req, union smb_read *rd)
 {
        struct cvfs_private *private = req->tcon->ntvfs_private;
        struct cli_request *c_req;
@@ -486,7 +486,7 @@ static NTSTATUS cvfs_read(struct request_context *req, union smb_read *rd)
 static void async_write(struct cli_request *c_req)
 {
        struct async_info *async = c_req->async.private;
-       struct request_context *req = async->req;
+       struct smbsrv_request *req = async->req;
        req->async.status = smb_raw_write_recv(c_req, async->parms);
        req->async.send_fn(req);
 }
@@ -494,7 +494,7 @@ static void async_write(struct cli_request *c_req)
 /*
   write to a file
 */
-static NTSTATUS cvfs_write(struct request_context *req, union smb_write *wr)
+static NTSTATUS cvfs_write(struct smbsrv_request *req, union smb_write *wr)
 {
        struct cvfs_private *private = req->tcon->ntvfs_private;
        struct cli_request *c_req;
@@ -511,7 +511,7 @@ static NTSTATUS cvfs_write(struct request_context *req, union smb_write *wr)
 /*
   seek in a file
 */
-static NTSTATUS cvfs_seek(struct request_context *req, struct smb_seek *io)
+static NTSTATUS cvfs_seek(struct smbsrv_request *req, struct smb_seek *io)
 {
        return NT_STATUS_NOT_SUPPORTED;
 }
@@ -519,7 +519,7 @@ static NTSTATUS cvfs_seek(struct request_context *req, struct smb_seek *io)
 /*
   flush a file
 */
-static NTSTATUS cvfs_flush(struct request_context *req, struct smb_flush *io)
+static NTSTATUS cvfs_flush(struct smbsrv_request *req, struct smb_flush *io)
 {
        return NT_STATUS_OK;
 }
@@ -527,7 +527,7 @@ static NTSTATUS cvfs_flush(struct request_context *req, struct smb_flush *io)
 /*
   close a file
 */
-static NTSTATUS cvfs_close(struct request_context *req, union smb_close *io)
+static NTSTATUS cvfs_close(struct smbsrv_request *req, union smb_close *io)
 {
        struct cvfs_private *private = req->tcon->ntvfs_private;
        struct cli_request *c_req;
@@ -544,7 +544,7 @@ static NTSTATUS cvfs_close(struct request_context *req, union smb_close *io)
 /*
   exit - closing files?
 */
-static NTSTATUS cvfs_exit(struct request_context *req)
+static NTSTATUS cvfs_exit(struct smbsrv_request *req)
 {
        return NT_STATUS_NOT_SUPPORTED;
 }
@@ -552,7 +552,7 @@ static NTSTATUS cvfs_exit(struct request_context *req)
 /*
   lock a byte range
 */
-static NTSTATUS cvfs_lock(struct request_context *req, union smb_lock *lck)
+static NTSTATUS cvfs_lock(struct smbsrv_request *req, union smb_lock *lck)
 {
        struct cvfs_private *private = req->tcon->ntvfs_private;
        struct cli_request *c_req;
@@ -568,7 +568,7 @@ static NTSTATUS cvfs_lock(struct request_context *req, union smb_lock *lck)
 /*
   set info on a open file
 */
-static NTSTATUS cvfs_setfileinfo(struct request_context *req, 
+static NTSTATUS cvfs_setfileinfo(struct smbsrv_request *req, 
                                 union smb_setfileinfo *info)
 {
        struct cvfs_private *private = req->tcon->ntvfs_private;
@@ -589,7 +589,7 @@ static NTSTATUS cvfs_setfileinfo(struct request_context *req,
 static void async_fsinfo(struct cli_request *c_req)
 {
        struct async_info *async = c_req->async.private;
-       struct request_context *req = async->req;
+       struct smbsrv_request *req = async->req;
        req->async.status = smb_raw_fsinfo_recv(c_req, req->mem_ctx, async->parms);
        req->async.send_fn(req);
 }
@@ -597,7 +597,7 @@ static void async_fsinfo(struct cli_request *c_req)
 /*
   return filesystem space info
 */
-static NTSTATUS cvfs_fsinfo(struct request_context *req, union smb_fsinfo *fs)
+static NTSTATUS cvfs_fsinfo(struct smbsrv_request *req, union smb_fsinfo *fs)
 {
        struct cvfs_private *private = req->tcon->ntvfs_private;
        struct cli_request *c_req;
@@ -614,7 +614,7 @@ static NTSTATUS cvfs_fsinfo(struct request_context *req, union smb_fsinfo *fs)
 /*
   return print queue info
 */
-static NTSTATUS cvfs_lpq(struct request_context *req, union smb_lpq *lpq)
+static NTSTATUS cvfs_lpq(struct smbsrv_request *req, union smb_lpq *lpq)
 {
        return NT_STATUS_NOT_SUPPORTED;
 }
@@ -622,7 +622,7 @@ static NTSTATUS cvfs_lpq(struct request_context *req, union smb_lpq *lpq)
 /* 
    list files in a directory matching a wildcard pattern
 */
-static NTSTATUS cvfs_search_first(struct request_context *req, union smb_search_first *io, 
+static NTSTATUS cvfs_search_first(struct smbsrv_request *req, union smb_search_first *io, 
                                  void *search_private, 
                                  BOOL (*callback)(void *, union smb_search_data *))
 {
@@ -632,7 +632,7 @@ static NTSTATUS cvfs_search_first(struct request_context *req, union smb_search_
 }
 
 /* continue a search */
-static NTSTATUS cvfs_search_next(struct request_context *req, union smb_search_next *io, 
+static NTSTATUS cvfs_search_next(struct smbsrv_request *req, union smb_search_next *io, 
                                 void *search_private, 
                                 BOOL (*callback)(void *, union smb_search_data *))
 {
@@ -642,7 +642,7 @@ static NTSTATUS cvfs_search_next(struct request_context *req, union smb_search_n
 }
 
 /* close a search */
-static NTSTATUS cvfs_search_close(struct request_context *req, union smb_search_close *io)
+static NTSTATUS cvfs_search_close(struct smbsrv_request *req, union smb_search_close *io)
 {
        struct cvfs_private *private = req->tcon->ntvfs_private;
 
@@ -655,13 +655,13 @@ static NTSTATUS cvfs_search_close(struct request_context *req, union smb_search_
 static void async_trans2(struct cli_request *c_req)
 {
        struct async_info *async = c_req->async.private;
-       struct request_context *req = async->req;
+       struct smbsrv_request *req = async->req;
        req->async.status = smb_raw_trans2_recv(c_req, req->mem_ctx, async->parms);
        req->async.send_fn(req);
 }
 
 /* raw trans2 */
-static NTSTATUS cvfs_trans2(struct request_context *req, struct smb_trans2 *trans2)
+static NTSTATUS cvfs_trans2(struct smbsrv_request *req, struct smb_trans2 *trans2)
 {
        struct cvfs_private *private = req->tcon->ntvfs_private;
        struct cli_request *c_req;
@@ -677,7 +677,7 @@ static NTSTATUS cvfs_trans2(struct request_context *req, struct smb_trans2 *tran
 
 
 /* SMBtrans - not used on file shares */
-static NTSTATUS cvfs_trans(struct request_context *req, struct smb_trans2 *trans2)
+static NTSTATUS cvfs_trans(struct smbsrv_request *req, struct smb_trans2 *trans2)
 {
        return NT_STATUS_ACCESS_DENIED;
 }
index b726dd6116f6164e93650f942e6ea7f6169e8c74..8d3eaa2bb4e8be56831dbd36db4c9d1e3d337637 100644 (file)
@@ -105,7 +105,7 @@ static struct pipe_state *pipe_state_find(struct ipc_private *private, uint16_t
 /*
   connect to a share - always works 
 */
-static NTSTATUS ipc_connect(struct request_context *req, const char *sharename)
+static NTSTATUS ipc_connect(struct smbsrv_request *req, const char *sharename)
 {
        struct smbsrv_tcon *tcon = req->tcon;
        struct ipc_private *private;
@@ -145,7 +145,7 @@ static NTSTATUS ipc_disconnect(struct smbsrv_tcon *tcon)
 /*
   delete a file
 */
-static NTSTATUS ipc_unlink(struct request_context *req, struct smb_unlink *unl)
+static NTSTATUS ipc_unlink(struct smbsrv_request *req, struct smb_unlink *unl)
 {
        return NT_STATUS_ACCESS_DENIED;
 }
@@ -154,7 +154,7 @@ static NTSTATUS ipc_unlink(struct request_context *req, struct smb_unlink *unl)
 /*
   ioctl interface - we don't do any
 */
-static NTSTATUS ipc_ioctl(struct request_context *req, union smb_ioctl *io)
+static NTSTATUS ipc_ioctl(struct smbsrv_request *req, union smb_ioctl *io)
 {
        return NT_STATUS_ACCESS_DENIED;
 }
@@ -162,7 +162,7 @@ static NTSTATUS ipc_ioctl(struct request_context *req, union smb_ioctl *io)
 /*
   check if a directory exists
 */
-static NTSTATUS ipc_chkpath(struct request_context *req, struct smb_chkpath *cp)
+static NTSTATUS ipc_chkpath(struct smbsrv_request *req, struct smb_chkpath *cp)
 {
        return NT_STATUS_ACCESS_DENIED;
 }
@@ -170,7 +170,7 @@ static NTSTATUS ipc_chkpath(struct request_context *req, struct smb_chkpath *cp)
 /*
   return info on a pathname
 */
-static NTSTATUS ipc_qpathinfo(struct request_context *req, union smb_fileinfo *info)
+static NTSTATUS ipc_qpathinfo(struct smbsrv_request *req, union smb_fileinfo *info)
 {
        return NT_STATUS_ACCESS_DENIED;
 }
@@ -178,7 +178,7 @@ static NTSTATUS ipc_qpathinfo(struct request_context *req, union smb_fileinfo *i
 /*
   set info on a pathname
 */
-static NTSTATUS ipc_setpathinfo(struct request_context *req, union smb_setfileinfo *st)
+static NTSTATUS ipc_setpathinfo(struct smbsrv_request *req, union smb_setfileinfo *st)
 {
        return NT_STATUS_ACCESS_DENIED;
 }
@@ -188,7 +188,7 @@ static NTSTATUS ipc_setpathinfo(struct request_context *req, union smb_setfilein
 /*
   open a file backend - used for MSRPC pipes
 */
-static NTSTATUS ipc_open_generic(struct request_context *req, const char *fname, 
+static NTSTATUS ipc_open_generic(struct smbsrv_request *req, const char *fname, 
                                 struct pipe_state **ps)
 {
        struct pipe_state *p;
@@ -270,7 +270,7 @@ static NTSTATUS ipc_open_generic(struct request_context *req, const char *fname,
 /*
   open a file with ntcreatex - used for MSRPC pipes
 */
-static NTSTATUS ipc_open_ntcreatex(struct request_context *req, union smb_open *oi)
+static NTSTATUS ipc_open_ntcreatex(struct smbsrv_request *req, union smb_open *oi)
 {
        struct pipe_state *p;
        NTSTATUS status;
@@ -290,7 +290,7 @@ static NTSTATUS ipc_open_ntcreatex(struct request_context *req, union smb_open *
 /*
   open a file with openx - used for MSRPC pipes
 */
-static NTSTATUS ipc_open_openx(struct request_context *req, union smb_open *oi)
+static NTSTATUS ipc_open_openx(struct smbsrv_request *req, union smb_open *oi)
 {
        struct pipe_state *p;
        NTSTATUS status;
@@ -318,7 +318,7 @@ static NTSTATUS ipc_open_openx(struct request_context *req, union smb_open *oi)
 /*
   open a file - used for MSRPC pipes
 */
-static NTSTATUS ipc_open(struct request_context *req, union smb_open *oi)
+static NTSTATUS ipc_open(struct smbsrv_request *req, union smb_open *oi)
 {
        NTSTATUS status;
 
@@ -340,7 +340,7 @@ static NTSTATUS ipc_open(struct request_context *req, union smb_open *oi)
 /*
   create a directory
 */
-static NTSTATUS ipc_mkdir(struct request_context *req, union smb_mkdir *md)
+static NTSTATUS ipc_mkdir(struct smbsrv_request *req, union smb_mkdir *md)
 {
        return NT_STATUS_ACCESS_DENIED;
 }
@@ -348,7 +348,7 @@ static NTSTATUS ipc_mkdir(struct request_context *req, union smb_mkdir *md)
 /*
   remove a directory
 */
-static NTSTATUS ipc_rmdir(struct request_context *req, struct smb_rmdir *rd)
+static NTSTATUS ipc_rmdir(struct smbsrv_request *req, struct smb_rmdir *rd)
 {
        return NT_STATUS_ACCESS_DENIED;
 }
@@ -356,7 +356,7 @@ static NTSTATUS ipc_rmdir(struct request_context *req, struct smb_rmdir *rd)
 /*
   rename a set of files
 */
-static NTSTATUS ipc_rename(struct request_context *req, union smb_rename *ren)
+static NTSTATUS ipc_rename(struct smbsrv_request *req, union smb_rename *ren)
 {
        return NT_STATUS_ACCESS_DENIED;
 }
@@ -364,7 +364,7 @@ static NTSTATUS ipc_rename(struct request_context *req, union smb_rename *ren)
 /*
   copy a set of files
 */
-static NTSTATUS ipc_copy(struct request_context *req, struct smb_copy *cp)
+static NTSTATUS ipc_copy(struct smbsrv_request *req, struct smb_copy *cp)
 {
        return NT_STATUS_ACCESS_DENIED;
 }
@@ -372,7 +372,7 @@ static NTSTATUS ipc_copy(struct request_context *req, struct smb_copy *cp)
 /*
   read from a file
 */
-static NTSTATUS ipc_read(struct request_context *req, union smb_read *rd)
+static NTSTATUS ipc_read(struct smbsrv_request *req, union smb_read *rd)
 {
        struct ipc_private *private = req->tcon->ntvfs_private;
        DATA_BLOB data;
@@ -424,7 +424,7 @@ static NTSTATUS ipc_read(struct request_context *req, union smb_read *rd)
 /*
   write to a file
 */
-static NTSTATUS ipc_write(struct request_context *req, union smb_write *wr)
+static NTSTATUS ipc_write(struct smbsrv_request *req, union smb_write *wr)
 {
        struct ipc_private *private = req->tcon->ntvfs_private;
        DATA_BLOB data;
@@ -477,7 +477,7 @@ static NTSTATUS ipc_write(struct request_context *req, union smb_write *wr)
 /*
   seek in a file
 */
-static NTSTATUS ipc_seek(struct request_context *req, struct smb_seek *io)
+static NTSTATUS ipc_seek(struct smbsrv_request *req, struct smb_seek *io)
 {
        return NT_STATUS_ACCESS_DENIED;
 }
@@ -485,7 +485,7 @@ static NTSTATUS ipc_seek(struct request_context *req, struct smb_seek *io)
 /*
   flush a file
 */
-static NTSTATUS ipc_flush(struct request_context *req, struct smb_flush *io)
+static NTSTATUS ipc_flush(struct smbsrv_request *req, struct smb_flush *io)
 {
        return NT_STATUS_ACCESS_DENIED;
 }
@@ -493,7 +493,7 @@ static NTSTATUS ipc_flush(struct request_context *req, struct smb_flush *io)
 /*
   close a file
 */
-static NTSTATUS ipc_close(struct request_context *req, union smb_close *io)
+static NTSTATUS ipc_close(struct smbsrv_request *req, union smb_close *io)
 {
        struct ipc_private *private = req->tcon->ntvfs_private;
        struct pipe_state *p;
@@ -516,7 +516,7 @@ static NTSTATUS ipc_close(struct request_context *req, union smb_close *io)
 /*
   exit - closing files?
 */
-static NTSTATUS ipc_exit(struct request_context *req)
+static NTSTATUS ipc_exit(struct smbsrv_request *req)
 {
        return NT_STATUS_ACCESS_DENIED;
 }
@@ -524,7 +524,7 @@ static NTSTATUS ipc_exit(struct request_context *req)
 /*
   lock a byte range
 */
-static NTSTATUS ipc_lock(struct request_context *req, union smb_lock *lck)
+static NTSTATUS ipc_lock(struct smbsrv_request *req, union smb_lock *lck)
 {
        return NT_STATUS_ACCESS_DENIED;
 }
@@ -532,7 +532,7 @@ static NTSTATUS ipc_lock(struct request_context *req, union smb_lock *lck)
 /*
   set info on a open file
 */
-static NTSTATUS ipc_setfileinfo(struct request_context *req, union smb_setfileinfo *info)
+static NTSTATUS ipc_setfileinfo(struct smbsrv_request *req, union smb_setfileinfo *info)
 {
        return NT_STATUS_ACCESS_DENIED;
 }
@@ -540,7 +540,7 @@ static NTSTATUS ipc_setfileinfo(struct request_context *req, union smb_setfilein
 /*
   query info on a open file
 */
-static NTSTATUS ipc_qfileinfo(struct request_context *req, union smb_fileinfo *info)
+static NTSTATUS ipc_qfileinfo(struct smbsrv_request *req, union smb_fileinfo *info)
 {
        return NT_STATUS_ACCESS_DENIED;
 }
@@ -549,7 +549,7 @@ static NTSTATUS ipc_qfileinfo(struct request_context *req, union smb_fileinfo *i
 /*
   return filesystem info
 */
-static NTSTATUS ipc_fsinfo(struct request_context *req, union smb_fsinfo *fs)
+static NTSTATUS ipc_fsinfo(struct smbsrv_request *req, union smb_fsinfo *fs)
 {
        return NT_STATUS_ACCESS_DENIED;
 }
@@ -557,7 +557,7 @@ static NTSTATUS ipc_fsinfo(struct request_context *req, union smb_fsinfo *fs)
 /*
   return print queue info
 */
-static NTSTATUS ipc_lpq(struct request_context *req, union smb_lpq *lpq)
+static NTSTATUS ipc_lpq(struct smbsrv_request *req, union smb_lpq *lpq)
 {
        return NT_STATUS_ACCESS_DENIED;
 }
@@ -565,7 +565,7 @@ static NTSTATUS ipc_lpq(struct request_context *req, union smb_lpq *lpq)
 /* 
    list files in a directory matching a wildcard pattern
 */
-NTSTATUS ipc_search_first(struct request_context *req, union smb_search_first *io,
+NTSTATUS ipc_search_first(struct smbsrv_request *req, union smb_search_first *io,
                          void *search_private, 
                          BOOL (*callback)(void *, union smb_search_data *))
 {
@@ -575,7 +575,7 @@ NTSTATUS ipc_search_first(struct request_context *req, union smb_search_first *i
 /* 
    continue listing files in a directory 
 */
-NTSTATUS ipc_search_next(struct request_context *req, union smb_search_next *io,
+NTSTATUS ipc_search_next(struct smbsrv_request *req, union smb_search_next *io,
                         void *search_private, 
                         BOOL (*callback)(void *, union smb_search_data *))
 {
@@ -585,14 +585,14 @@ NTSTATUS ipc_search_next(struct request_context *req, union smb_search_next *io,
 /* 
    end listing files in a directory 
 */
-NTSTATUS ipc_search_close(struct request_context *req, union smb_search_close *io)
+NTSTATUS ipc_search_close(struct smbsrv_request *req, union smb_search_close *io)
 {
        return NT_STATUS_ACCESS_DENIED;
 }
 
 
 /* SMBtrans - handle a DCERPC command */
-static NTSTATUS ipc_dcerpc_cmd(struct request_context *req, struct smb_trans2 *trans)
+static NTSTATUS ipc_dcerpc_cmd(struct smbsrv_request *req, struct smb_trans2 *trans)
 {
        struct pipe_state *p;
        struct ipc_private *private = req->tcon->ntvfs_private;
@@ -637,7 +637,7 @@ static NTSTATUS ipc_dcerpc_cmd(struct request_context *req, struct smb_trans2 *t
 
 
 /* SMBtrans - set named pipe state */
-static NTSTATUS ipc_set_nm_pipe_state(struct request_context *req, struct smb_trans2 *trans)
+static NTSTATUS ipc_set_nm_pipe_state(struct smbsrv_request *req, struct smb_trans2 *trans)
 {
        struct pipe_state *p;
        struct ipc_private *private = req->tcon->ntvfs_private;
@@ -663,7 +663,7 @@ static NTSTATUS ipc_set_nm_pipe_state(struct request_context *req, struct smb_tr
 
 
 /* SMBtrans - used to provide access to SMB pipes */
-static NTSTATUS ipc_trans(struct request_context *req, struct smb_trans2 *trans)
+static NTSTATUS ipc_trans(struct smbsrv_request *req, struct smb_trans2 *trans)
 {
        NTSTATUS status;
 
index 5e9fd430cc297a9027a46ac894e19cf7c3be562c..dceaa9f45bb02e1c0fa5bd50afdd6a9691d3b1c4 100644 (file)
@@ -90,7 +90,7 @@ static void nbench_log(struct nbench_private *private,
 /*
   connect to a share - used when a tree_connect operation comes in.
 */
-static NTSTATUS nbench_connect(struct request_context *req, const char *sharename)
+static NTSTATUS nbench_connect(struct smbsrv_request *req, const char *sharename)
 {
        struct nbench_private *private;
        const char *passthru;
@@ -146,7 +146,7 @@ static NTSTATUS nbench_disconnect(struct smbsrv_tcon *tcon)
   delete a file - the dirtype specifies the file types to include in the search. 
   The name can contain CIFS wildcards, but rarely does (except with OS/2 clients)
 */
-static NTSTATUS nbench_unlink(struct request_context *req, struct smb_unlink *unl)
+static NTSTATUS nbench_unlink(struct smbsrv_request *req, struct smb_unlink *unl)
 {
        struct nbench_private *private = req->tcon->ntvfs_private;
        NTSTATUS status;
@@ -163,7 +163,7 @@ static NTSTATUS nbench_unlink(struct request_context *req, struct smb_unlink *un
 /*
   ioctl interface
 */
-static NTSTATUS nbench_ioctl(struct request_context *req, union smb_ioctl *io)
+static NTSTATUS nbench_ioctl(struct smbsrv_request *req, union smb_ioctl *io)
 {
        struct nbench_private *private = req->tcon->ntvfs_private;
        NTSTATUS status;
@@ -178,7 +178,7 @@ static NTSTATUS nbench_ioctl(struct request_context *req, union smb_ioctl *io)
 /*
   check if a directory exists
 */
-static NTSTATUS nbench_chkpath(struct request_context *req, struct smb_chkpath *cp)
+static NTSTATUS nbench_chkpath(struct smbsrv_request *req, struct smb_chkpath *cp)
 {
        struct nbench_private *private = req->tcon->ntvfs_private;
        NTSTATUS status;
@@ -195,7 +195,7 @@ static NTSTATUS nbench_chkpath(struct request_context *req, struct smb_chkpath *
 /*
   return info on a pathname
 */
-static NTSTATUS nbench_qpathinfo(struct request_context *req, union smb_fileinfo *info)
+static NTSTATUS nbench_qpathinfo(struct smbsrv_request *req, union smb_fileinfo *info)
 {
        struct nbench_private *private = req->tcon->ntvfs_private;
        NTSTATUS status;
@@ -213,7 +213,7 @@ static NTSTATUS nbench_qpathinfo(struct request_context *req, union smb_fileinfo
 /*
   query info on a open file
 */
-static NTSTATUS nbench_qfileinfo(struct request_context *req, union smb_fileinfo *info)
+static NTSTATUS nbench_qfileinfo(struct smbsrv_request *req, union smb_fileinfo *info)
 {
        struct nbench_private *private = req->tcon->ntvfs_private;
        NTSTATUS status;
@@ -232,7 +232,7 @@ static NTSTATUS nbench_qfileinfo(struct request_context *req, union smb_fileinfo
 /*
   set info on a pathname
 */
-static NTSTATUS nbench_setpathinfo(struct request_context *req, union smb_setfileinfo *st)
+static NTSTATUS nbench_setpathinfo(struct smbsrv_request *req, union smb_setfileinfo *st)
 {
        struct nbench_private *private = req->tcon->ntvfs_private;
        NTSTATUS status;
@@ -250,7 +250,7 @@ static NTSTATUS nbench_setpathinfo(struct request_context *req, union smb_setfil
 /*
   open a file
 */
-static NTSTATUS nbench_open(struct request_context *req, union smb_open *io)
+static NTSTATUS nbench_open(struct smbsrv_request *req, union smb_open *io)
 {
        struct nbench_private *private = req->tcon->ntvfs_private;
        NTSTATUS status;
@@ -279,7 +279,7 @@ static NTSTATUS nbench_open(struct request_context *req, union smb_open *io)
 /*
   create a directory
 */
-static NTSTATUS nbench_mkdir(struct request_context *req, union smb_mkdir *md)
+static NTSTATUS nbench_mkdir(struct smbsrv_request *req, union smb_mkdir *md)
 {
        struct nbench_private *private = req->tcon->ntvfs_private;
        NTSTATUS status;
@@ -294,7 +294,7 @@ static NTSTATUS nbench_mkdir(struct request_context *req, union smb_mkdir *md)
 /*
   remove a directory
 */
-static NTSTATUS nbench_rmdir(struct request_context *req, struct smb_rmdir *rd)
+static NTSTATUS nbench_rmdir(struct smbsrv_request *req, struct smb_rmdir *rd)
 {
        struct nbench_private *private = req->tcon->ntvfs_private;
        NTSTATUS status;
@@ -311,7 +311,7 @@ static NTSTATUS nbench_rmdir(struct request_context *req, struct smb_rmdir *rd)
 /*
   rename a set of files
 */
-static NTSTATUS nbench_rename(struct request_context *req, union smb_rename *ren)
+static NTSTATUS nbench_rename(struct smbsrv_request *req, union smb_rename *ren)
 {
        struct nbench_private *private = req->tcon->ntvfs_private;
        NTSTATUS status;
@@ -338,7 +338,7 @@ static NTSTATUS nbench_rename(struct request_context *req, union smb_rename *ren
 /*
   copy a set of files
 */
-static NTSTATUS nbench_copy(struct request_context *req, struct smb_copy *cp)
+static NTSTATUS nbench_copy(struct smbsrv_request *req, struct smb_copy *cp)
 {
        struct nbench_private *private = req->tcon->ntvfs_private;
        NTSTATUS status;
@@ -353,7 +353,7 @@ static NTSTATUS nbench_copy(struct request_context *req, struct smb_copy *cp)
 /*
   read from a file
 */
-static NTSTATUS nbench_read(struct request_context *req, union smb_read *rd)
+static NTSTATUS nbench_read(struct smbsrv_request *req, union smb_read *rd)
 {
        struct nbench_private *private = req->tcon->ntvfs_private;
        NTSTATUS status;
@@ -381,7 +381,7 @@ static NTSTATUS nbench_read(struct request_context *req, union smb_read *rd)
 /*
   write to a file
 */
-static NTSTATUS nbench_write(struct request_context *req, union smb_write *wr)
+static NTSTATUS nbench_write(struct smbsrv_request *req, union smb_write *wr)
 {
        struct nbench_private *private = req->tcon->ntvfs_private;
        NTSTATUS status;
@@ -419,7 +419,7 @@ static NTSTATUS nbench_write(struct request_context *req, union smb_write *wr)
 /*
   seek in a file
 */
-static NTSTATUS nbench_seek(struct request_context *req, struct smb_seek *io)
+static NTSTATUS nbench_seek(struct smbsrv_request *req, struct smb_seek *io)
 {
        struct nbench_private *private = req->tcon->ntvfs_private;
        NTSTATUS status;
@@ -434,7 +434,7 @@ static NTSTATUS nbench_seek(struct request_context *req, struct smb_seek *io)
 /*
   flush a file
 */
-static NTSTATUS nbench_flush(struct request_context *req, struct smb_flush *io)
+static NTSTATUS nbench_flush(struct smbsrv_request *req, struct smb_flush *io)
 {
        struct nbench_private *private = req->tcon->ntvfs_private;
        NTSTATUS status;
@@ -451,7 +451,7 @@ static NTSTATUS nbench_flush(struct request_context *req, struct smb_flush *io)
 /*
   close a file
 */
-static NTSTATUS nbench_close(struct request_context *req, union smb_close *io)
+static NTSTATUS nbench_close(struct smbsrv_request *req, union smb_close *io)
 {
        struct nbench_private *private = req->tcon->ntvfs_private;
        NTSTATUS status;
@@ -477,7 +477,7 @@ static NTSTATUS nbench_close(struct request_context *req, union smb_close *io)
 /*
   exit - closing files
 */
-static NTSTATUS nbench_exit(struct request_context *req)
+static NTSTATUS nbench_exit(struct smbsrv_request *req)
 {
        struct nbench_private *private = req->tcon->ntvfs_private;
        NTSTATUS status;
@@ -490,7 +490,7 @@ static NTSTATUS nbench_exit(struct request_context *req)
 /*
   lock a byte range
 */
-static NTSTATUS nbench_lock(struct request_context *req, union smb_lock *lck)
+static NTSTATUS nbench_lock(struct smbsrv_request *req, union smb_lock *lck)
 {
        struct nbench_private *private = req->tcon->ntvfs_private;
        NTSTATUS status;
@@ -522,7 +522,7 @@ static NTSTATUS nbench_lock(struct request_context *req, union smb_lock *lck)
 /*
   set info on a open file
 */
-static NTSTATUS nbench_setfileinfo(struct request_context *req, 
+static NTSTATUS nbench_setfileinfo(struct smbsrv_request *req, 
                                 union smb_setfileinfo *info)
 {
        struct nbench_private *private = req->tcon->ntvfs_private;
@@ -542,7 +542,7 @@ static NTSTATUS nbench_setfileinfo(struct request_context *req,
 /*
   return filesystem space info
 */
-static NTSTATUS nbench_fsinfo(struct request_context *req, union smb_fsinfo *fs)
+static NTSTATUS nbench_fsinfo(struct smbsrv_request *req, union smb_fsinfo *fs)
 {
        struct nbench_private *private = req->tcon->ntvfs_private;
        NTSTATUS status;
@@ -559,7 +559,7 @@ static NTSTATUS nbench_fsinfo(struct request_context *req, union smb_fsinfo *fs)
 /*
   return print queue info
 */
-static NTSTATUS nbench_lpq(struct request_context *req, union smb_lpq *lpq)
+static NTSTATUS nbench_lpq(struct smbsrv_request *req, union smb_lpq *lpq)
 {
        struct nbench_private *private = req->tcon->ntvfs_private;
        NTSTATUS status;
@@ -574,7 +574,7 @@ static NTSTATUS nbench_lpq(struct request_context *req, union smb_lpq *lpq)
 /* 
    list files in a directory matching a wildcard pattern
 */
-static NTSTATUS nbench_search_first(struct request_context *req, union smb_search_first *io, 
+static NTSTATUS nbench_search_first(struct smbsrv_request *req, union smb_search_first *io, 
                                  void *search_private, 
                                  BOOL (*callback)(void *, union smb_search_data *))
 {
@@ -602,7 +602,7 @@ static NTSTATUS nbench_search_first(struct request_context *req, union smb_searc
 }
 
 /* continue a search */
-static NTSTATUS nbench_search_next(struct request_context *req, union smb_search_next *io, 
+static NTSTATUS nbench_search_next(struct smbsrv_request *req, union smb_search_next *io, 
                                 void *search_private, 
                                 BOOL (*callback)(void *, union smb_search_data *))
 {
@@ -617,7 +617,7 @@ static NTSTATUS nbench_search_next(struct request_context *req, union smb_search
 }
 
 /* close a search */
-static NTSTATUS nbench_search_close(struct request_context *req, union smb_search_close *io)
+static NTSTATUS nbench_search_close(struct smbsrv_request *req, union smb_search_close *io)
 {
        struct nbench_private *private = req->tcon->ntvfs_private;
        NTSTATUS status;
@@ -630,7 +630,7 @@ static NTSTATUS nbench_search_close(struct request_context *req, union smb_searc
 }
 
 /* SMBtrans - not used on file shares */
-static NTSTATUS nbench_trans(struct request_context *req, struct smb_trans2 *trans2)
+static NTSTATUS nbench_trans(struct smbsrv_request *req, struct smb_trans2 *trans2)
 {
        struct nbench_private *private = req->tcon->ntvfs_private;
        NTSTATUS status;
index dd245b09ce836b051b9b4e215bf0a91bec44ac0f..b7c110ebdb6c19a815a74b16ac88ec189782aefe 100644 (file)
@@ -30,50 +30,50 @@ struct ntvfs_ops {
        enum ntvfs_type type;
        
        /* initial setup */
-       NTSTATUS (*connect)(struct request_context *req, const char *sharename);
+       NTSTATUS (*connect)(struct smbsrv_request *req, const char *sharename);
        NTSTATUS (*disconnect)(struct smbsrv_tcon *tcon);
 
        /* path operations */
-       NTSTATUS (*unlink)(struct request_context *req, struct smb_unlink *unl);
-       NTSTATUS (*chkpath)(struct request_context *req, struct smb_chkpath *cp);
-       NTSTATUS (*qpathinfo)(struct request_context *req, union smb_fileinfo *st);
-       NTSTATUS (*setpathinfo)(struct request_context *req, union smb_setfileinfo *st);
-       NTSTATUS (*open)(struct request_context *req, union smb_open *oi);
-       NTSTATUS (*mkdir)(struct request_context *req, union smb_mkdir *md);
-       NTSTATUS (*rmdir)(struct request_context *req, struct smb_rmdir *rd);
-       NTSTATUS (*rename)(struct request_context *req, union smb_rename *ren);
-       NTSTATUS (*copy)(struct request_context *req, struct smb_copy *cp);
+       NTSTATUS (*unlink)(struct smbsrv_request *req, struct smb_unlink *unl);
+       NTSTATUS (*chkpath)(struct smbsrv_request *req, struct smb_chkpath *cp);
+       NTSTATUS (*qpathinfo)(struct smbsrv_request *req, union smb_fileinfo *st);
+       NTSTATUS (*setpathinfo)(struct smbsrv_request *req, union smb_setfileinfo *st);
+       NTSTATUS (*open)(struct smbsrv_request *req, union smb_open *oi);
+       NTSTATUS (*mkdir)(struct smbsrv_request *req, union smb_mkdir *md);
+       NTSTATUS (*rmdir)(struct smbsrv_request *req, struct smb_rmdir *rd);
+       NTSTATUS (*rename)(struct smbsrv_request *req, union smb_rename *ren);
+       NTSTATUS (*copy)(struct smbsrv_request *req, struct smb_copy *cp);
 
        /* directory search */
-       NTSTATUS (*search_first)(struct request_context *req, union smb_search_first *io, void *private,
+       NTSTATUS (*search_first)(struct smbsrv_request *req, union smb_search_first *io, void *private,
                                 BOOL (*callback)(void *private, union smb_search_data *file));
-       NTSTATUS (*search_next)(struct request_context *req, union smb_search_next *io, void *private,
+       NTSTATUS (*search_next)(struct smbsrv_request *req, union smb_search_next *io, void *private,
                                 BOOL (*callback)(void *private, union smb_search_data *file));
-       NTSTATUS (*search_close)(struct request_context *req, union smb_search_close *io);
+       NTSTATUS (*search_close)(struct smbsrv_request *req, union smb_search_close *io);
 
        /* operations on open files */
-       NTSTATUS (*ioctl)(struct request_context *req, union smb_ioctl *io);
-       NTSTATUS (*read)(struct request_context *req, union smb_read *io);
-       NTSTATUS (*write)(struct request_context *req, union smb_write *io);
-       NTSTATUS (*seek)(struct request_context *req, struct smb_seek *io);
-       NTSTATUS (*flush)(struct request_context *req, struct smb_flush *flush);
-       NTSTATUS (*close)(struct request_context *req, union smb_close *io);
-       NTSTATUS (*exit)(struct request_context *req);
-       NTSTATUS (*lock)(struct request_context *req, union smb_lock *lck);
-       NTSTATUS (*setfileinfo)(struct request_context *req, union smb_setfileinfo *info);
-       NTSTATUS (*qfileinfo)(struct request_context *req, union smb_fileinfo *info);
+       NTSTATUS (*ioctl)(struct smbsrv_request *req, union smb_ioctl *io);
+       NTSTATUS (*read)(struct smbsrv_request *req, union smb_read *io);
+       NTSTATUS (*write)(struct smbsrv_request *req, union smb_write *io);
+       NTSTATUS (*seek)(struct smbsrv_request *req, struct smb_seek *io);
+       NTSTATUS (*flush)(struct smbsrv_request *req, struct smb_flush *flush);
+       NTSTATUS (*close)(struct smbsrv_request *req, union smb_close *io);
+       NTSTATUS (*exit)(struct smbsrv_request *req);
+       NTSTATUS (*lock)(struct smbsrv_request *req, union smb_lock *lck);
+       NTSTATUS (*setfileinfo)(struct smbsrv_request *req, union smb_setfileinfo *info);
+       NTSTATUS (*qfileinfo)(struct smbsrv_request *req, union smb_fileinfo *info);
 
        /* filesystem operations */
-       NTSTATUS (*fsinfo)(struct request_context *req, union smb_fsinfo *fs);
+       NTSTATUS (*fsinfo)(struct smbsrv_request *req, union smb_fsinfo *fs);
 
        /* printing specific operations */
-       NTSTATUS (*lpq)(struct request_context *req, union smb_lpq *lpq);
+       NTSTATUS (*lpq)(struct smbsrv_request *req, union smb_lpq *lpq);
 
        /* trans2 interface - only used by CIFS backend to prover complete passthru for testing */
-       NTSTATUS (*trans2)(struct request_context *req, struct smb_trans2 *trans2);
+       NTSTATUS (*trans2)(struct smbsrv_request *req, struct smb_trans2 *trans2);
 
        /* trans interface - used by IPC backend for pipes and RAP calls */
-       NTSTATUS (*trans)(struct request_context *req, struct smb_trans2 *trans);
+       NTSTATUS (*trans)(struct smbsrv_request *req, struct smb_trans2 *trans);
 };
 
 
@@ -83,5 +83,5 @@ struct ntvfs_critical_sizes {
        int sizeof_ntvfs_ops;
        int sizeof_SMB_OFF_T;
        int sizeof_smbsrv_tcon;
-       int sizeof_request_context;
+       int sizeof_smbsrv_request;
 };
index bb751bae015df3c4f6fd78901294bcb33b718fd5..f94dacb57fca839af6b5bc15d6d2aef6a7d064f1 100644 (file)
@@ -103,7 +103,7 @@ const struct ntvfs_critical_sizes *ntvfs_interface_version(void)
                sizeof(struct ntvfs_ops),
                sizeof(SMB_OFF_T),
                sizeof(struct smbsrv_tcon),
-               sizeof(struct request_context),
+               sizeof(struct smbsrv_request),
        };
 
        return &critical_sizes;
@@ -133,7 +133,7 @@ BOOL ntvfs_init(void)
 /*
   initialise a connection structure to point at a NTVFS backend
 */
-NTSTATUS ntvfs_init_connection(struct request_context *req)
+NTSTATUS ntvfs_init_connection(struct smbsrv_request *req)
 {
        const char *handler = lp_ntvfs_handler(req->tcon->service);
 
index b2cf107b7ddc20eea0dd0b11c52bcfadbb63ec61..ba2ec344f46cba1c8ee44fcc5ec3a5e3a7e3510a 100644 (file)
@@ -57,7 +57,7 @@ static BOOL is_exe_file(const char *fname)
 /* 
    NTVFS open generic to any mapper
 */
-NTSTATUS ntvfs_map_open(struct request_context *req, union smb_open *io)
+NTSTATUS ntvfs_map_open(struct smbsrv_request *req, union smb_open *io)
 {
        NTSTATUS status;
        union smb_open io2;
@@ -249,7 +249,7 @@ NTSTATUS ntvfs_map_open(struct request_context *req, union smb_open *io)
 /* 
    NTVFS fsinfo generic to any mapper
 */
-NTSTATUS ntvfs_map_fsinfo(struct request_context *req, union smb_fsinfo *fs)
+NTSTATUS ntvfs_map_fsinfo(struct smbsrv_request *req, union smb_fsinfo *fs)
 {
        NTSTATUS status;
        union smb_fsinfo fs2;
@@ -368,7 +368,7 @@ NTSTATUS ntvfs_map_fsinfo(struct request_context *req, union smb_fsinfo *fs)
 /* 
    NTVFS fileinfo generic to any mapper
 */
-NTSTATUS ntvfs_map_fileinfo(struct request_context *req, union smb_fileinfo *info, union smb_fileinfo *info2)
+NTSTATUS ntvfs_map_fileinfo(struct smbsrv_request *req, union smb_fileinfo *info, union smb_fileinfo *info2)
 {
        int i;
        /* and convert it to the required level using results in info2 */
@@ -590,7 +590,7 @@ NTSTATUS ntvfs_map_fileinfo(struct request_context *req, union smb_fileinfo *inf
 /* 
    NTVFS fileinfo generic to any mapper
 */
-NTSTATUS ntvfs_map_qfileinfo(struct request_context *req, union smb_fileinfo *info)
+NTSTATUS ntvfs_map_qfileinfo(struct smbsrv_request *req, union smb_fileinfo *info)
 {
        NTSTATUS status;
        union smb_fileinfo info2;
@@ -613,7 +613,7 @@ NTSTATUS ntvfs_map_qfileinfo(struct request_context *req, union smb_fileinfo *in
 /* 
    NTVFS pathinfo generic to any mapper
 */
-NTSTATUS ntvfs_map_qpathinfo(struct request_context *req, union smb_fileinfo *info)
+NTSTATUS ntvfs_map_qpathinfo(struct smbsrv_request *req, union smb_fileinfo *info)
 {
        NTSTATUS status;
        union smb_fileinfo info2;
index e013e019795a255316df2aba8e50757adabe131a..90b6f9248de5081621a9cfb1c0c3f1a18c43f2dd 100644 (file)
@@ -31,7 +31,7 @@
   directory exists (tho it doesn't need to be accessible by the user,
   that comes later)
 */
-static NTSTATUS pvfs_connect(struct request_context *req, const char *sharename)
+static NTSTATUS pvfs_connect(struct smbsrv_request *req, const char *sharename)
 {
        DEBUG(0,   ("Connection to share [%s] ACCESS DENIED!\n", sharename));
        DEBUGADD(0,("This is because your using the 'ntvfs handler = default'.\n"));
index a2ac429458d4c22b902a201e05c6b5d9931fd844..fa5835843a2c5ec4ae795274c00a9266c2a2fe58 100644 (file)
@@ -29,7 +29,7 @@
   in. For printing shares this should check that the spool directory
   is available
 */
-static NTSTATUS print_connect(struct request_context *req, const char *sharename)
+static NTSTATUS print_connect(struct smbsrv_request *req, const char *sharename)
 {
        return NT_STATUS_OK;
 }
@@ -45,7 +45,7 @@ static NTSTATUS print_disconnect(struct smbsrv_tcon *tcon)
 /*
   lots of operations are not allowed on printing shares - mostly return NT_STATUS_ACCESS_DENIED
 */
-static NTSTATUS print_unlink(struct request_context *req, struct smb_unlink *unl)
+static NTSTATUS print_unlink(struct smbsrv_request *req, struct smb_unlink *unl)
 {
        return NT_STATUS_ACCESS_DENIED;
 }
@@ -54,7 +54,7 @@ static NTSTATUS print_unlink(struct request_context *req, struct smb_unlink *unl
 /*
   ioctl - used for job query
 */
-static NTSTATUS print_ioctl(struct request_context *req, union smb_ioctl *io)
+static NTSTATUS print_ioctl(struct smbsrv_request *req, union smb_ioctl *io)
 {
        char *p;
 
index 75f3ac494813a2d8fb557b51fad3249c6d485c4c..e2210869501b4f96d9a0aa168f372185123b273c 100644 (file)
@@ -29,7 +29,7 @@
 /*
   convert a windows path to a unix path - don't do any manging or case sensitive handling
 */
-char *svfs_unix_path(struct request_context *req, const char *name)
+char *svfs_unix_path(struct smbsrv_request *req, const char *name)
 {
        struct svfs_private *private = req->conn->ntvfs_private;
        char *ret;
@@ -52,7 +52,7 @@ char *svfs_unix_path(struct request_context *req, const char *name)
   returned names are separate unix and DOS names. The returned names
   are relative to the directory
 */
-struct svfs_dir *svfs_list(TALLOC_CTX *mem_ctx, struct request_context *req, const char *pattern)
+struct svfs_dir *svfs_list(TALLOC_CTX *mem_ctx, struct smbsrv_request *req, const char *pattern)
 {
        char *unix_path;
        char *p, *mask;
index 13b4eb5fbc53bf4c19caa948c18f32a5171b5368..7a85afa4bbf0d00dd83d3d97ffdab364b2aa7449 100644 (file)
@@ -35,7 +35,7 @@
   directory exists (tho it doesn't need to be accessible by the user,
   that comes later)
 */
-static NTSTATUS svfs_connect(struct request_context *req, const char *sharename)
+static NTSTATUS svfs_connect(struct smbsrv_request *req, const char *sharename)
 {
        struct stat st;
        struct tcon_context *conn = req->conn;
@@ -63,7 +63,7 @@ static NTSTATUS svfs_connect(struct request_context *req, const char *sharename)
 /*
   disconnect from a share
 */
-static NTSTATUS svfs_disconnect(struct request_context *req)
+static NTSTATUS svfs_disconnect(struct smbsrv_request *req)
 {
        return NT_STATUS_OK;
 }
@@ -72,7 +72,7 @@ static NTSTATUS svfs_disconnect(struct request_context *req)
   delete a file - the dirtype specifies the file types to include in the search. 
   The name can contain CIFS wildcards, but rarely does (except with OS/2 clients)
 */
-static NTSTATUS svfs_unlink(struct request_context *req, struct smb_unlink *unl)
+static NTSTATUS svfs_unlink(struct smbsrv_request *req, struct smb_unlink *unl)
 {
        char *unix_path;
 
@@ -90,7 +90,7 @@ static NTSTATUS svfs_unlink(struct request_context *req, struct smb_unlink *unl)
 /*
   ioctl interface - we don't do any
 */
-static NTSTATUS svfs_ioctl(struct request_context *req, struct smb_ioctl *io)
+static NTSTATUS svfs_ioctl(struct smbsrv_request *req, struct smb_ioctl *io)
 {
        return NT_STATUS_INVALID_PARAMETER;
 }
@@ -98,7 +98,7 @@ static NTSTATUS svfs_ioctl(struct request_context *req, struct smb_ioctl *io)
 /*
   check if a directory exists
 */
-static NTSTATUS svfs_chkpath(struct request_context *req, struct smb_chkpath *cp)
+static NTSTATUS svfs_chkpath(struct smbsrv_request *req, struct smb_chkpath *cp)
 {
        char *unix_path;
        struct stat st;
@@ -119,7 +119,7 @@ static NTSTATUS svfs_chkpath(struct request_context *req, struct smb_chkpath *cp
 /*
   approximately map a struct stat to a fileinfo struct
 */
-static NTSTATUS map_fileinfo(struct request_context *req, union smb_fileinfo *info, struct stat *st)
+static NTSTATUS map_fileinfo(struct smbsrv_request *req, union smb_fileinfo *info, struct stat *st)
 {
        switch (info->generic.level) {
        case SMB_FILEINFO_NETWORK_OPEN_INFORMATION:
@@ -222,7 +222,7 @@ static NTSTATUS map_fileinfo(struct request_context *req, union smb_fileinfo *in
 /*
   return info on a pathname
 */
-static NTSTATUS svfs_qpathinfo(struct request_context *req, union smb_fileinfo *info)
+static NTSTATUS svfs_qpathinfo(struct smbsrv_request *req, union smb_fileinfo *info)
 {
        char *unix_path;
        struct stat st;
@@ -239,7 +239,7 @@ static NTSTATUS svfs_qpathinfo(struct request_context *req, union smb_fileinfo *
 /*
   query info on a open file
 */
-static NTSTATUS svfs_qfileinfo(struct request_context *req, union smb_fileinfo *info)
+static NTSTATUS svfs_qfileinfo(struct smbsrv_request *req, union smb_fileinfo *info)
 {
        struct stat st;
 
@@ -254,7 +254,7 @@ static NTSTATUS svfs_qfileinfo(struct request_context *req, union smb_fileinfo *
 /*
   set info on a pathname
 */
-static NTSTATUS svfs_setpathinfo(struct request_context *req, union smb_setfileinfo *st)
+static NTSTATUS svfs_setpathinfo(struct smbsrv_request *req, union smb_setfileinfo *st)
 {
        return NT_STATUS_NOT_SUPPORTED;
 }
@@ -262,7 +262,7 @@ static NTSTATUS svfs_setpathinfo(struct request_context *req, union smb_setfilei
 /*
   open a file
 */
-static NTSTATUS svfs_open(struct request_context *req, union smb_open *io)
+static NTSTATUS svfs_open(struct smbsrv_request *req, union smb_open *io)
 {
        char *unix_path;
        struct stat st;
@@ -342,7 +342,7 @@ static NTSTATUS svfs_open(struct request_context *req, union smb_open *io)
 /*
   create a directory
 */
-static NTSTATUS svfs_mkdir(struct request_context *req, union smb_mkdir *md)
+static NTSTATUS svfs_mkdir(struct smbsrv_request *req, union smb_mkdir *md)
 {
        char *unix_path;
 
@@ -362,7 +362,7 @@ static NTSTATUS svfs_mkdir(struct request_context *req, union smb_mkdir *md)
 /*
   remove a directory
 */
-static NTSTATUS svfs_rmdir(struct request_context *req, struct smb_rmdir *rd)
+static NTSTATUS svfs_rmdir(struct smbsrv_request *req, struct smb_rmdir *rd)
 {
        char *unix_path;
 
@@ -378,7 +378,7 @@ static NTSTATUS svfs_rmdir(struct request_context *req, struct smb_rmdir *rd)
 /*
   rename a set of files
 */
-static NTSTATUS svfs_rename(struct request_context *req, union smb_rename *ren)
+static NTSTATUS svfs_rename(struct smbsrv_request *req, union smb_rename *ren)
 {
        char *unix_path1, *unix_path2;
 
@@ -395,7 +395,7 @@ static NTSTATUS svfs_rename(struct request_context *req, union smb_rename *ren)
 /*
   copy a set of files
 */
-static NTSTATUS svfs_copy(struct request_context *req, struct smb_copy *cp)
+static NTSTATUS svfs_copy(struct smbsrv_request *req, struct smb_copy *cp)
 {
        return NT_STATUS_NOT_SUPPORTED;
 }
@@ -403,7 +403,7 @@ static NTSTATUS svfs_copy(struct request_context *req, struct smb_copy *cp)
 /*
   read from a file
 */
-static NTSTATUS svfs_read(struct request_context *req, union smb_read *rd)
+static NTSTATUS svfs_read(struct smbsrv_request *req, union smb_read *rd)
 {
        ssize_t ret;
 
@@ -428,7 +428,7 @@ static NTSTATUS svfs_read(struct request_context *req, union smb_read *rd)
 /*
   write to a file
 */
-static NTSTATUS svfs_write(struct request_context *req, union smb_write *wr)
+static NTSTATUS svfs_write(struct smbsrv_request *req, union smb_write *wr)
 {
        ssize_t ret;
 
@@ -472,7 +472,7 @@ static NTSTATUS svfs_write(struct request_context *req, union smb_write *wr)
 /*
   seek in a file
 */
-static NTSTATUS svfs_seek(struct request_context *req, struct smb_seek *io)
+static NTSTATUS svfs_seek(struct smbsrv_request *req, struct smb_seek *io)
 {
        return NT_STATUS_NOT_SUPPORTED;
 }
@@ -480,7 +480,7 @@ static NTSTATUS svfs_seek(struct request_context *req, struct smb_seek *io)
 /*
   flush a file
 */
-static NTSTATUS svfs_flush(struct request_context *req, struct smb_flush *io)
+static NTSTATUS svfs_flush(struct smbsrv_request *req, struct smb_flush *io)
 {
        fsync(io->in.fnum);
        return NT_STATUS_OK;
@@ -489,7 +489,7 @@ static NTSTATUS svfs_flush(struct request_context *req, struct smb_flush *io)
 /*
   close a file
 */
-static NTSTATUS svfs_close(struct request_context *req, union smb_close *io)
+static NTSTATUS svfs_close(struct smbsrv_request *req, union smb_close *io)
 {
        if (io->generic.level != SMB_CLOSE_CLOSE) {
                /* we need a mapping function */
@@ -506,7 +506,7 @@ static NTSTATUS svfs_close(struct request_context *req, union smb_close *io)
 /*
   exit - closing files?
 */
-static NTSTATUS svfs_exit(struct request_context *req)
+static NTSTATUS svfs_exit(struct smbsrv_request *req)
 {
        return NT_STATUS_NOT_SUPPORTED;
 }
@@ -514,7 +514,7 @@ static NTSTATUS svfs_exit(struct request_context *req)
 /*
   lock a byte range
 */
-static NTSTATUS svfs_lock(struct request_context *req, union smb_lock *lck)
+static NTSTATUS svfs_lock(struct smbsrv_request *req, union smb_lock *lck)
 {
        DEBUG(0,("REWRITE: not doing byte range locking!\n"));
        return NT_STATUS_OK;
@@ -523,7 +523,7 @@ static NTSTATUS svfs_lock(struct request_context *req, union smb_lock *lck)
 /*
   set info on a open file
 */
-static NTSTATUS svfs_setfileinfo(struct request_context *req, 
+static NTSTATUS svfs_setfileinfo(struct smbsrv_request *req, 
                                 union smb_setfileinfo *info)
 {
        DEBUG(0,("REWRITE: svfs_setfileinfo: not doing setfileinfo level %d\n", 
@@ -549,7 +549,7 @@ static NTSTATUS svfs_setfileinfo(struct request_context *req,
 /*
   return filesystem space info
 */
-static NTSTATUS svfs_fsinfo(struct request_context *req, union smb_fsinfo *fs)
+static NTSTATUS svfs_fsinfo(struct smbsrv_request *req, union smb_fsinfo *fs)
 {
        struct svfs_private *private = req->conn->ntvfs_private;
 
@@ -571,7 +571,7 @@ static NTSTATUS svfs_fsinfo(struct request_context *req, union smb_fsinfo *fs)
 /*
   return filesystem attribute info
 */
-static NTSTATUS svfs_fsattr(struct request_context *req, union smb_fsattr *fs)
+static NTSTATUS svfs_fsattr(struct smbsrv_request *req, union smb_fsattr *fs)
 {
        struct stat st;
        struct svfs_private *private = req->conn->ntvfs_private;
@@ -601,7 +601,7 @@ static NTSTATUS svfs_fsattr(struct request_context *req, union smb_fsattr *fs)
 /*
   return print queue info
 */
-static NTSTATUS svfs_lpq(struct request_context *req, union smb_lpq *lpq)
+static NTSTATUS svfs_lpq(struct smbsrv_request *req, union smb_lpq *lpq)
 {
        return NT_STATUS_NOT_SUPPORTED;
 }
@@ -609,7 +609,7 @@ static NTSTATUS svfs_lpq(struct request_context *req, union smb_lpq *lpq)
 /* 
    list files in a directory matching a wildcard pattern
 */
-NTSTATUS svfs_search_first(struct request_context *req, union smb_search_first *io, 
+NTSTATUS svfs_search_first(struct smbsrv_request *req, union smb_search_first *io, 
                           void *search_private, 
                           BOOL (*callback)(void *, union smb_search_data *))
 {
@@ -683,7 +683,7 @@ NTSTATUS svfs_search_first(struct request_context *req, union smb_search_first *
 }
 
 /* continue a search */
-NTSTATUS svfs_search_next(struct request_context *req, union smb_search_next *io, 
+NTSTATUS svfs_search_next(struct smbsrv_request *req, union smb_search_next *io, 
                           void *search_private, 
                           BOOL (*callback)(void *, union smb_search_data *))
 {
@@ -770,7 +770,7 @@ found:
 }
 
 /* close a search */
-NTSTATUS svfs_search_close(struct request_context *req, union smb_search_close *io)
+NTSTATUS svfs_search_close(struct smbsrv_request *req, union smb_search_close *io)
 {
        struct svfs_private *private = req->conn->ntvfs_private;
        struct search_state *search;
index 0f0555ac18b62666680d47412194e11ace183867..7da9667e3c8e211de403cf7602c5736426afe297 100644 (file)
@@ -29,7 +29,7 @@
 /*
   convert a windows path to a unix path - don't do any manging or case sensitive handling
 */
-char *svfs_unix_path(struct request_context *req, const char *name)
+char *svfs_unix_path(struct smbsrv_request *req, const char *name)
 {
        struct svfs_private *private = req->tcon->ntvfs_private;
        char *ret;
@@ -52,7 +52,7 @@ char *svfs_unix_path(struct request_context *req, const char *name)
   returned names are separate unix and DOS names. The returned names
   are relative to the directory
 */
-struct svfs_dir *svfs_list_unix(TALLOC_CTX *mem_ctx, struct request_context *req, const char *unix_path)
+struct svfs_dir *svfs_list_unix(TALLOC_CTX *mem_ctx, struct smbsrv_request *req, const char *unix_path)
 {
        char *p, *mask;
        struct svfs_dir *dir;
@@ -135,7 +135,7 @@ struct svfs_dir *svfs_list_unix(TALLOC_CTX *mem_ctx, struct request_context *req
   returned names are separate unix and DOS names. The returned names
   are relative to the directory
 */
-struct svfs_dir *svfs_list(TALLOC_CTX *mem_ctx, struct request_context *req, const char *pattern)
+struct svfs_dir *svfs_list(TALLOC_CTX *mem_ctx, struct smbsrv_request *req, const char *pattern)
 {
        char *unix_path;
 
index 013419e4eea357a92bd4135b4e3eb8fbe646639f..ad889daf36d4f4ac0eb229a69db92af978af706c 100644 (file)
@@ -61,7 +61,7 @@ static ssize_t pwrite(int __fd, const void *__buf, size_t __nbytes, off_t __offs
   directory exists (tho it doesn't need to be accessible by the user,
   that comes later)
 */
-static NTSTATUS svfs_connect(struct request_context *req, const char *sharename)
+static NTSTATUS svfs_connect(struct smbsrv_request *req, const char *sharename)
 {
        struct stat st;
        struct smbsrv_tcon *tcon = req->tcon;
@@ -116,7 +116,7 @@ static struct svfs_file *find_fd(struct svfs_private *private, int fd)
   delete a file - the dirtype specifies the file types to include in the search. 
   The name can contain CIFS wildcards, but rarely does (except with OS/2 clients)
 */
-static NTSTATUS svfs_unlink(struct request_context *req, struct smb_unlink *unl)
+static NTSTATUS svfs_unlink(struct smbsrv_request *req, struct smb_unlink *unl)
 {
        char *unix_path;
 
@@ -136,7 +136,7 @@ static NTSTATUS svfs_unlink(struct request_context *req, struct smb_unlink *unl)
 /*
   ioctl interface - we don't do any
 */
-static NTSTATUS svfs_ioctl(struct request_context *req, union smb_ioctl *io)
+static NTSTATUS svfs_ioctl(struct smbsrv_request *req, union smb_ioctl *io)
 {
        return NT_STATUS_INVALID_PARAMETER;
 }
@@ -144,7 +144,7 @@ static NTSTATUS svfs_ioctl(struct request_context *req, union smb_ioctl *io)
 /*
   check if a directory exists
 */
-static NTSTATUS svfs_chkpath(struct request_context *req, struct smb_chkpath *cp)
+static NTSTATUS svfs_chkpath(struct smbsrv_request *req, struct smb_chkpath *cp)
 {
        char *unix_path;
        struct stat st;
@@ -165,7 +165,7 @@ static NTSTATUS svfs_chkpath(struct request_context *req, struct smb_chkpath *cp
 /*
   approximately map a struct stat to a generic fileinfo struct
 */
-static NTSTATUS svfs_map_fileinfo(struct request_context *req, union smb_fileinfo *info, 
+static NTSTATUS svfs_map_fileinfo(struct smbsrv_request *req, union smb_fileinfo *info, 
                                  struct stat *st, const char *unix_path)
 {
        struct svfs_dir *dir = NULL;
@@ -241,7 +241,7 @@ static NTSTATUS svfs_map_fileinfo(struct request_context *req, union smb_fileinf
 /*
   return info on a pathname
 */
-static NTSTATUS svfs_qpathinfo(struct request_context *req, union smb_fileinfo *info)
+static NTSTATUS svfs_qpathinfo(struct smbsrv_request *req, union smb_fileinfo *info)
 {
        char *unix_path;
        struct stat st;
@@ -266,7 +266,7 @@ static NTSTATUS svfs_qpathinfo(struct request_context *req, union smb_fileinfo *
 /*
   query info on a open file
 */
-static NTSTATUS svfs_qfileinfo(struct request_context *req, union smb_fileinfo *info)
+static NTSTATUS svfs_qfileinfo(struct smbsrv_request *req, union smb_fileinfo *info)
 {
        struct svfs_private *private = req->tcon->ntvfs_private;
        struct svfs_file *f;
@@ -294,7 +294,7 @@ static NTSTATUS svfs_qfileinfo(struct request_context *req, union smb_fileinfo *
 /*
   open a file
 */
-static NTSTATUS svfs_open(struct request_context *req, union smb_open *io)
+static NTSTATUS svfs_open(struct smbsrv_request *req, union smb_open *io)
 {
        struct svfs_private *private = req->tcon->ntvfs_private;
        char *unix_path;
@@ -400,7 +400,7 @@ do_open:
 /*
   create a directory
 */
-static NTSTATUS svfs_mkdir(struct request_context *req, union smb_mkdir *md)
+static NTSTATUS svfs_mkdir(struct smbsrv_request *req, union smb_mkdir *md)
 {
        char *unix_path;
 
@@ -422,7 +422,7 @@ static NTSTATUS svfs_mkdir(struct request_context *req, union smb_mkdir *md)
 /*
   remove a directory
 */
-static NTSTATUS svfs_rmdir(struct request_context *req, struct smb_rmdir *rd)
+static NTSTATUS svfs_rmdir(struct smbsrv_request *req, struct smb_rmdir *rd)
 {
        char *unix_path;
 
@@ -440,7 +440,7 @@ static NTSTATUS svfs_rmdir(struct request_context *req, struct smb_rmdir *rd)
 /*
   rename a set of files
 */
-static NTSTATUS svfs_rename(struct request_context *req, union smb_rename *ren)
+static NTSTATUS svfs_rename(struct smbsrv_request *req, union smb_rename *ren)
 {
        char *unix_path1, *unix_path2;
 
@@ -463,7 +463,7 @@ static NTSTATUS svfs_rename(struct request_context *req, union smb_rename *ren)
 /*
   copy a set of files
 */
-static NTSTATUS svfs_copy(struct request_context *req, struct smb_copy *cp)
+static NTSTATUS svfs_copy(struct smbsrv_request *req, struct smb_copy *cp)
 {
        return NT_STATUS_NOT_SUPPORTED;
 }
@@ -471,7 +471,7 @@ static NTSTATUS svfs_copy(struct request_context *req, struct smb_copy *cp)
 /*
   read from a file
 */
-static NTSTATUS svfs_read(struct request_context *req, union smb_read *rd)
+static NTSTATUS svfs_read(struct smbsrv_request *req, union smb_read *rd)
 {
        ssize_t ret;
 
@@ -497,7 +497,7 @@ static NTSTATUS svfs_read(struct request_context *req, union smb_read *rd)
 /*
   write to a file
 */
-static NTSTATUS svfs_write(struct request_context *req, union smb_write *wr)
+static NTSTATUS svfs_write(struct smbsrv_request *req, union smb_write *wr)
 {
        ssize_t ret;
 
@@ -543,7 +543,7 @@ static NTSTATUS svfs_write(struct request_context *req, union smb_write *wr)
 /*
   seek in a file
 */
-static NTSTATUS svfs_seek(struct request_context *req, struct smb_seek *io)
+static NTSTATUS svfs_seek(struct smbsrv_request *req, struct smb_seek *io)
 {
        return NT_STATUS_NOT_SUPPORTED;
 }
@@ -551,7 +551,7 @@ static NTSTATUS svfs_seek(struct request_context *req, struct smb_seek *io)
 /*
   flush a file
 */
-static NTSTATUS svfs_flush(struct request_context *req, struct smb_flush *io)
+static NTSTATUS svfs_flush(struct smbsrv_request *req, struct smb_flush *io)
 {
        fsync(io->in.fnum);
        return NT_STATUS_OK;
@@ -560,7 +560,7 @@ static NTSTATUS svfs_flush(struct request_context *req, struct smb_flush *io)
 /*
   close a file
 */
-static NTSTATUS svfs_close(struct request_context *req, union smb_close *io)
+static NTSTATUS svfs_close(struct smbsrv_request *req, union smb_close *io)
 {
        struct svfs_private *private = req->tcon->ntvfs_private;
        struct svfs_file *f;
@@ -589,7 +589,7 @@ static NTSTATUS svfs_close(struct request_context *req, union smb_close *io)
 /*
   exit - closing files?
 */
-static NTSTATUS svfs_exit(struct request_context *req)
+static NTSTATUS svfs_exit(struct smbsrv_request *req)
 {
        return NT_STATUS_NOT_SUPPORTED;
 }
@@ -597,7 +597,7 @@ static NTSTATUS svfs_exit(struct request_context *req)
 /*
   lock a byte range
 */
-static NTSTATUS svfs_lock(struct request_context *req, union smb_lock *lck)
+static NTSTATUS svfs_lock(struct smbsrv_request *req, union smb_lock *lck)
 {
        DEBUG(0,("REWRITE: not doing byte range locking!\n"));
        return NT_STATUS_OK;
@@ -606,7 +606,7 @@ static NTSTATUS svfs_lock(struct request_context *req, union smb_lock *lck)
 /*
   set info on a pathname
 */
-static NTSTATUS svfs_setpathinfo(struct request_context *req, union smb_setfileinfo *st)
+static NTSTATUS svfs_setpathinfo(struct smbsrv_request *req, union smb_setfileinfo *st)
 {
        CHECK_READ_ONLY(req);
 
@@ -616,7 +616,7 @@ static NTSTATUS svfs_setpathinfo(struct request_context *req, union smb_setfilei
 /*
   set info on a open file
 */
-static NTSTATUS svfs_setfileinfo(struct request_context *req, 
+static NTSTATUS svfs_setfileinfo(struct smbsrv_request *req, 
                                 union smb_setfileinfo *info)
 {
        struct utimbuf unix_times;
@@ -659,7 +659,7 @@ static NTSTATUS svfs_setfileinfo(struct request_context *req,
 /*
   return filesystem space info
 */
-static NTSTATUS svfs_fsinfo(struct request_context *req, union smb_fsinfo *fs)
+static NTSTATUS svfs_fsinfo(struct smbsrv_request *req, union smb_fsinfo *fs)
 {
        struct svfs_private *private = req->tcon->ntvfs_private;
        struct stat st;
@@ -700,7 +700,7 @@ static NTSTATUS svfs_fsinfo(struct request_context *req, union smb_fsinfo *fs)
 /*
   return filesystem attribute info
 */
-static NTSTATUS svfs_fsattr(struct request_context *req, union smb_fsattr *fs)
+static NTSTATUS svfs_fsattr(struct smbsrv_request *req, union smb_fsattr *fs)
 {
        struct stat st;
        struct svfs_private *private = req->tcon->ntvfs_private;
@@ -731,7 +731,7 @@ static NTSTATUS svfs_fsattr(struct request_context *req, union smb_fsattr *fs)
 /*
   return print queue info
 */
-static NTSTATUS svfs_lpq(struct request_context *req, union smb_lpq *lpq)
+static NTSTATUS svfs_lpq(struct smbsrv_request *req, union smb_lpq *lpq)
 {
        return NT_STATUS_NOT_SUPPORTED;
 }
@@ -739,7 +739,7 @@ static NTSTATUS svfs_lpq(struct request_context *req, union smb_lpq *lpq)
 /* 
    list files in a directory matching a wildcard pattern
 */
-static NTSTATUS svfs_search_first(struct request_context *req, union smb_search_first *io, 
+static NTSTATUS svfs_search_first(struct smbsrv_request *req, union smb_search_first *io, 
                                  void *search_private, 
                                  BOOL (*callback)(void *, union smb_search_data *))
 {
@@ -813,7 +813,7 @@ static NTSTATUS svfs_search_first(struct request_context *req, union smb_search_
 }
 
 /* continue a search */
-static NTSTATUS svfs_search_next(struct request_context *req, union smb_search_next *io, 
+static NTSTATUS svfs_search_next(struct smbsrv_request *req, union smb_search_next *io, 
                                 void *search_private, 
                                 BOOL (*callback)(void *, union smb_search_data *))
 {
@@ -900,7 +900,7 @@ found:
 }
 
 /* close a search */
-static NTSTATUS svfs_search_close(struct request_context *req, union smb_search_close *io)
+static NTSTATUS svfs_search_close(struct smbsrv_request *req, union smb_search_close *io)
 {
        struct svfs_private *private = req->tcon->ntvfs_private;
        struct search_state *search;
@@ -921,7 +921,7 @@ static NTSTATUS svfs_search_close(struct request_context *req, union smb_search_
 }
 
 /* SMBtrans - not used on file shares */
-static NTSTATUS svfs_trans(struct request_context *req, struct smb_trans2 *trans2)
+static NTSTATUS svfs_trans(struct smbsrv_request *req, struct smb_trans2 *trans2)
 {
        return NT_STATUS_ACCESS_DENIED;
 }
index dfeb9ef4579a42788996506008b0e47f6d44fb75..83b3cd75e9b4a1b4924dc3917b2738c6aec4f298 100644 (file)
@@ -49,7 +49,7 @@ static void get_challenge(struct smbsrv_context *smb_ctx, char buff[8])
 /****************************************************************************
  Reply for the core protocol.
 ****************************************************************************/
-static void reply_corep(struct request_context *req, uint16_t choice)
+static void reply_corep(struct smbsrv_request *req, uint16_t choice)
 {
        req_setup_reply(req, 1, 0);
 
@@ -65,7 +65,7 @@ static void reply_corep(struct request_context *req, uint16_t choice)
 this is quite incomplete - we only fill in a small part of the reply, but as nobody uses
 this any more it probably doesn't matter
 ****************************************************************************/
-static void reply_coreplus(struct request_context *req, uint16_t choice)
+static void reply_coreplus(struct smbsrv_request *req, uint16_t choice)
 {
        uint16_t raw = (lp_readraw()?1:0) | (lp_writeraw()?2:0);
 
@@ -90,7 +90,7 @@ static void reply_coreplus(struct request_context *req, uint16_t choice)
 /****************************************************************************
  Reply for the lanman 1.0 protocol.
 ****************************************************************************/
-static void reply_lanman1(struct request_context *req, uint16_t choice)
+static void reply_lanman1(struct smbsrv_request *req, uint16_t choice)
 {
        int raw = (lp_readraw()?1:0) | (lp_writeraw()?2:0);
        int secword=0;
@@ -134,7 +134,7 @@ static void reply_lanman1(struct request_context *req, uint16_t choice)
 /****************************************************************************
  Reply for the lanman 2.0 protocol.
 ****************************************************************************/
-static void reply_lanman2(struct request_context *req, uint16_t choice)
+static void reply_lanman2(struct smbsrv_request *req, uint16_t choice)
 {
        int raw = (lp_readraw()?1:0) | (lp_writeraw()?2:0);
        int secword=0;
@@ -223,7 +223,7 @@ static DATA_BLOB negprot_spnego(struct smbsrv_context *smb_ctx)
 /****************************************************************************
  Reply for the nt protocol.
 ****************************************************************************/
-static void reply_nt1(struct request_context *req, uint16_t choice)
+static void reply_nt1(struct smbsrv_request *req, uint16_t choice)
 {
        /* dual names + lock_and_read + nt SMBs + remote API calls */
        int capabilities;
@@ -422,7 +422,7 @@ protocol [LANMAN2.1]
 static const struct {
        const char *proto_name;
        const char *short_name;
-       void (*proto_reply_fn)(struct request_context *req, uint16_t choice);
+       void (*proto_reply_fn)(struct smbsrv_request *req, uint16_t choice);
        int protocol_level;
 } supported_protocols[] = {
        {"NT LANMAN 1.0",           "NT1",      reply_nt1,      PROTOCOL_NT1},
@@ -441,7 +441,7 @@ static const struct {
  Reply to a negprot.
 ****************************************************************************/
 
-void reply_negprot(struct request_context *req)
+void reply_negprot(struct smbsrv_request *req)
 {
        int Index=0;
        int choice = -1;
index 14977f9bd219858253b812b40fd2ffd5b24f74a1..ddae725c4ba5697f56a1311519907d41366ae985 100644 (file)
@@ -32,7 +32,7 @@
 
 
 /* setup a nttrans reply, given the data and params sizes */
-static void nttrans_setup_reply(struct request_context *req, 
+static void nttrans_setup_reply(struct smbsrv_request *req, 
                               struct smb_nttrans *trans,
                               uint16_t param_size, uint16_t data_size,
                               uint16_t setup_count)
@@ -48,7 +48,7 @@ static void nttrans_setup_reply(struct request_context *req,
 
 /* parse NTTRANS_CREATE request
  */
-static NTSTATUS nttrans_create(struct request_context *req, 
+static NTSTATUS nttrans_create(struct smbsrv_request *req, 
                struct smb_nttrans *trans)
 {
        return NT_STATUS_FOOBAR;
@@ -56,14 +56,14 @@ static NTSTATUS nttrans_create(struct request_context *req,
 
 /* parse NTTRANS_RENAME request
  */
-static NTSTATUS nttrans_rename(struct request_context *req, 
+static NTSTATUS nttrans_rename(struct smbsrv_request *req, 
                struct smb_nttrans *trans)
 {
        return NT_STATUS_FOOBAR;
 }
 /* parse NTTRANS_IOCTL request
  */
-static NTSTATUS nttrans_ioctl(struct request_context *req, 
+static NTSTATUS nttrans_ioctl(struct smbsrv_request *req, 
                struct smb_nttrans *trans)
 {
        union smb_ioctl nt;
@@ -100,7 +100,7 @@ static NTSTATUS nttrans_ioctl(struct request_context *req,
 /*
   backend for nttrans requests
 */
-static NTSTATUS nttrans_backend(struct request_context *req, 
+static NTSTATUS nttrans_backend(struct smbsrv_request *req, 
                struct smb_nttrans *trans)
 {
        DEBUG(9,("nttrans_backend: setup_count=%d function=%d\n",
@@ -128,7 +128,7 @@ static NTSTATUS nttrans_backend(struct request_context *req,
 /****************************************************************************
  Reply to an SMBnttrans request
 ****************************************************************************/
-void reply_nttrans(struct request_context *req)
+void reply_nttrans(struct smbsrv_request *req)
 {
        struct smb_nttrans trans;
        int i;
@@ -267,7 +267,7 @@ void reply_nttrans(struct request_context *req)
 /****************************************************************************
  Reply to an SMBnttranss request
 ****************************************************************************/
-void reply_nttranss(struct request_context *req)
+void reply_nttranss(struct smbsrv_request *req)
 {
        req_reply_error(req, NT_STATUS_FOOBAR);
 }
index 3356ce9925cc7b803e2a396b68913cb0e0894e64..0715dc4075a95accaf31616c8010dcec166d1948 100644 (file)
@@ -65,7 +65,7 @@
 /****************************************************************************
  Reply to a simple request (async send)
 ****************************************************************************/
-static void reply_simple_send(struct request_context *req)
+static void reply_simple_send(struct smbsrv_request *req)
 {
        CHECK_ASYNC_STATUS;
 
@@ -77,7 +77,7 @@ static void reply_simple_send(struct request_context *req)
 /****************************************************************************
  Reply to a tcon.
 ****************************************************************************/
-void reply_tcon(struct request_context *req)
+void reply_tcon(struct smbsrv_request *req)
 {
        union smb_tcon con;
        NTSTATUS status;
@@ -120,7 +120,7 @@ void reply_tcon(struct request_context *req)
 /****************************************************************************
  Reply to a tcon and X.
 ****************************************************************************/
-void reply_tcon_and_X(struct request_context *req)
+void reply_tcon_and_X(struct smbsrv_request *req)
 {
        NTSTATUS status;
        union smb_tcon con;
@@ -189,7 +189,7 @@ void reply_tcon_and_X(struct request_context *req)
 /****************************************************************************
  Reply to an unknown request
 ****************************************************************************/
-void reply_unknown(struct request_context *req)
+void reply_unknown(struct smbsrv_request *req)
 {
        int type;
 
@@ -204,7 +204,7 @@ void reply_unknown(struct request_context *req)
 /****************************************************************************
  Reply to an ioctl (async reply)
 ****************************************************************************/
-static void reply_ioctl_send(struct request_context *req)
+static void reply_ioctl_send(struct smbsrv_request *req)
 {
        union smb_ioctl *io = req->async.private;
 
@@ -224,7 +224,7 @@ static void reply_ioctl_send(struct request_context *req)
 /****************************************************************************
  Reply to an ioctl.
 ****************************************************************************/
-void reply_ioctl(struct request_context *req)
+void reply_ioctl(struct smbsrv_request *req)
 {
        union smb_ioctl *io;
 
@@ -249,7 +249,7 @@ void reply_ioctl(struct request_context *req)
 /****************************************************************************
  Reply to a chkpth.
 ****************************************************************************/
-void reply_chkpth(struct request_context *req)
+void reply_chkpth(struct smbsrv_request *req)
 {
        struct smb_chkpath *io;
 
@@ -267,7 +267,7 @@ void reply_chkpth(struct request_context *req)
 /****************************************************************************
  Reply to a getatr (async reply)
 ****************************************************************************/
-static void reply_getatr_send(struct request_context *req)
+static void reply_getatr_send(struct smbsrv_request *req)
 {
        union smb_fileinfo *st = req->async.private;
 
@@ -289,7 +289,7 @@ static void reply_getatr_send(struct request_context *req)
 /****************************************************************************
  Reply to a getatr.
 ****************************************************************************/
-void reply_getatr(struct request_context *req)
+void reply_getatr(struct smbsrv_request *req)
 {
        union smb_fileinfo *st;
 
@@ -317,7 +317,7 @@ void reply_getatr(struct request_context *req)
 /****************************************************************************
  Reply to a setatr.
 ****************************************************************************/
-void reply_setatr(struct request_context *req)
+void reply_setatr(struct smbsrv_request *req)
 {
        union smb_setfileinfo *st;
 
@@ -348,7 +348,7 @@ void reply_setatr(struct request_context *req)
 /****************************************************************************
  Reply to a dskattr (async reply)
 ****************************************************************************/
-static void reply_dskattr_send(struct request_context *req)
+static void reply_dskattr_send(struct smbsrv_request *req)
 {
        union smb_fsinfo *fs = req->async.private;
 
@@ -371,7 +371,7 @@ static void reply_dskattr_send(struct request_context *req)
 /****************************************************************************
  Reply to a dskattr.
 ****************************************************************************/
-void reply_dskattr(struct request_context *req)
+void reply_dskattr(struct smbsrv_request *req)
 {
        union smb_fsinfo *fs;
 
@@ -393,7 +393,7 @@ void reply_dskattr(struct request_context *req)
 /****************************************************************************
  Reply to an open (async reply)
 ****************************************************************************/
-static void reply_open_send(struct request_context *req)
+static void reply_open_send(struct smbsrv_request *req)
 {
        union smb_open *oi = req->async.private;
 
@@ -414,7 +414,7 @@ static void reply_open_send(struct request_context *req)
 /****************************************************************************
  Reply to an open.
 ****************************************************************************/
-void reply_open(struct request_context *req)
+void reply_open(struct smbsrv_request *req)
 {
        union smb_open *oi;
 
@@ -446,7 +446,7 @@ void reply_open(struct request_context *req)
 /****************************************************************************
  Reply to an open and X (async reply)
 ****************************************************************************/
-static void reply_open_and_X_send(struct request_context *req)
+static void reply_open_and_X_send(struct smbsrv_request *req)
 {
        union smb_open *oi = req->async.private;
 
@@ -483,7 +483,7 @@ static void reply_open_and_X_send(struct request_context *req)
 /****************************************************************************
  Reply to an open and X.
 ****************************************************************************/
-void reply_open_and_X(struct request_context *req)
+void reply_open_and_X(struct smbsrv_request *req)
 {
        union smb_open *oi;
 
@@ -521,7 +521,7 @@ void reply_open_and_X(struct request_context *req)
 /****************************************************************************
  Reply to a mknew or a create.
 ****************************************************************************/
-static void reply_mknew_send(struct request_context *req)
+static void reply_mknew_send(struct smbsrv_request *req)
 {
        union smb_open *oi = req->async.private;
 
@@ -539,7 +539,7 @@ static void reply_mknew_send(struct request_context *req)
 /****************************************************************************
  Reply to a mknew or a create.
 ****************************************************************************/
-void reply_mknew(struct request_context *req)
+void reply_mknew(struct smbsrv_request *req)
 {
        union smb_open *oi;
 
@@ -570,7 +570,7 @@ void reply_mknew(struct request_context *req)
 /****************************************************************************
  Reply to a create temporary file (async reply)
 ****************************************************************************/
-static void reply_ctemp_send(struct request_context *req)
+static void reply_ctemp_send(struct smbsrv_request *req)
 {
        union smb_open *oi = req->async.private;
 
@@ -590,7 +590,7 @@ static void reply_ctemp_send(struct request_context *req)
 /****************************************************************************
  Reply to a create temporary file.
 ****************************************************************************/
-void reply_ctemp(struct request_context *req)
+void reply_ctemp(struct smbsrv_request *req)
 {
        union smb_open *oi;
 
@@ -624,7 +624,7 @@ void reply_ctemp(struct request_context *req)
 /****************************************************************************
  Reply to a unlink
 ****************************************************************************/
-void reply_unlink(struct request_context *req)
+void reply_unlink(struct smbsrv_request *req)
 {
        struct smb_unlink *unl;
 
@@ -651,7 +651,7 @@ void reply_unlink(struct request_context *req)
  only the 4 byte NBT header
  This command must be replied to synchronously
 ****************************************************************************/
-void reply_readbraw(struct request_context *req)
+void reply_readbraw(struct smbsrv_request *req)
 {
        NTSTATUS status;
        union smb_read io;
@@ -712,7 +712,7 @@ failed:
 /****************************************************************************
  Reply to a lockread (async reply)
 ****************************************************************************/
-static void reply_lockread_send(struct request_context *req)
+static void reply_lockread_send(struct smbsrv_request *req)
 {
        union smb_read *io = req->async.private;
 
@@ -738,7 +738,7 @@ static void reply_lockread_send(struct request_context *req)
  Reply to a lockread (core+ protocol).
  note that the lock is a write lock, not a read lock!
 ****************************************************************************/
-void reply_lockread(struct request_context *req)
+void reply_lockread(struct smbsrv_request *req)
 {
        union smb_read *io;
        
@@ -772,7 +772,7 @@ void reply_lockread(struct request_context *req)
 /****************************************************************************
  Reply to a read (async reply)
 ****************************************************************************/
-static void reply_read_send(struct request_context *req)
+static void reply_read_send(struct smbsrv_request *req)
 {
        union smb_read *io = req->async.private;
 
@@ -796,7 +796,7 @@ static void reply_read_send(struct request_context *req)
 /****************************************************************************
  Reply to a read.
 ****************************************************************************/
-void reply_read(struct request_context *req)
+void reply_read(struct smbsrv_request *req)
 {
        union smb_read *io;
 
@@ -830,7 +830,7 @@ void reply_read(struct request_context *req)
 /****************************************************************************
  Reply to a read and X (async reply)
 ****************************************************************************/
-static void reply_read_and_X_send(struct request_context *req)
+static void reply_read_and_X_send(struct smbsrv_request *req)
 {
        union smb_read *io = req->async.private;
 
@@ -857,7 +857,7 @@ static void reply_read_and_X_send(struct request_context *req)
 /****************************************************************************
  Reply to a read and X.
 ****************************************************************************/
-void reply_read_and_X(struct request_context *req)
+void reply_read_and_X(struct smbsrv_request *req)
 {
        union smb_read *io;
 
@@ -900,7 +900,7 @@ void reply_read_and_X(struct request_context *req)
 /****************************************************************************
  Reply to a writebraw (core+ or LANMAN1.0 protocol).
 ****************************************************************************/
-void reply_writebraw(struct request_context *req)
+void reply_writebraw(struct smbsrv_request *req)
 {
        /* this one is damn complex - put it off for now */
        req_reply_error(req, NT_STATUS_FOOBAR);
@@ -910,7 +910,7 @@ void reply_writebraw(struct request_context *req)
 /****************************************************************************
  Reply to a writeunlock (async reply)
 ****************************************************************************/
-static void reply_writeunlock_send(struct request_context *req)
+static void reply_writeunlock_send(struct smbsrv_request *req)
 {
        union smb_write *io = req->async.private;
 
@@ -927,7 +927,7 @@ static void reply_writeunlock_send(struct request_context *req)
 /****************************************************************************
  Reply to a writeunlock (core+).
 ****************************************************************************/
-void reply_writeunlock(struct request_context *req)
+void reply_writeunlock(struct smbsrv_request *req)
 {
        union smb_write *io;
 
@@ -967,7 +967,7 @@ void reply_writeunlock(struct request_context *req)
 /****************************************************************************
  Reply to a write (async reply)
 ****************************************************************************/
-static void reply_write_send(struct request_context *req)
+static void reply_write_send(struct smbsrv_request *req)
 {
        union smb_write *io = req->async.private;
        
@@ -984,7 +984,7 @@ static void reply_write_send(struct request_context *req)
 /****************************************************************************
  Reply to a write
 ****************************************************************************/
-void reply_write(struct request_context *req)
+void reply_write(struct smbsrv_request *req)
 {
        union smb_write *io;
 
@@ -1023,7 +1023,7 @@ void reply_write(struct request_context *req)
 /****************************************************************************
  Reply to a write and X (async reply)
 ****************************************************************************/
-static void reply_write_and_X_send(struct request_context *req)
+static void reply_write_and_X_send(struct smbsrv_request *req)
 {
        union smb_write *io = req->async.private;
 
@@ -1045,7 +1045,7 @@ static void reply_write_and_X_send(struct request_context *req)
 /****************************************************************************
  Reply to a write and X.
 ****************************************************************************/
-void reply_write_and_X(struct request_context *req)
+void reply_write_and_X(struct smbsrv_request *req)
 {
        union smb_write *io;
        
@@ -1089,7 +1089,7 @@ void reply_write_and_X(struct request_context *req)
 /****************************************************************************
  Reply to a lseek (async reply)
 ****************************************************************************/
-static void reply_lseek_send(struct request_context *req)
+static void reply_lseek_send(struct smbsrv_request *req)
 {
        struct smb_seek *io = req->async.private;
 
@@ -1106,7 +1106,7 @@ static void reply_lseek_send(struct request_context *req)
 /****************************************************************************
  Reply to a lseek.
 ****************************************************************************/
-void reply_lseek(struct request_context *req)
+void reply_lseek(struct smbsrv_request *req)
 {
        struct smb_seek *io;
 
@@ -1129,7 +1129,7 @@ void reply_lseek(struct request_context *req)
 /****************************************************************************
  Reply to a flush.
 ****************************************************************************/
-void reply_flush(struct request_context *req)
+void reply_flush(struct smbsrv_request *req)
 {
        struct smb_flush *io;
 
@@ -1151,7 +1151,7 @@ void reply_flush(struct request_context *req)
 /****************************************************************************
  Reply to a exit.
 ****************************************************************************/
-void reply_exit(struct request_context *req)
+void reply_exit(struct smbsrv_request *req)
 {
        REQ_CHECK_WCT(req, 0);
 
@@ -1174,7 +1174,7 @@ void reply_exit(struct request_context *req)
 
  Note that this has to deal with closing a directory opened by NT SMB's.
 ****************************************************************************/
-void reply_close(struct request_context *req)
+void reply_close(struct smbsrv_request *req)
 {
        union smb_close *io;
 
@@ -1199,7 +1199,7 @@ void reply_close(struct request_context *req)
 /****************************************************************************
  Reply to a writeclose (async reply)
 ****************************************************************************/
-static void reply_writeclose_send(struct request_context *req)
+static void reply_writeclose_send(struct smbsrv_request *req)
 {
        union smb_write *io = req->async.private;
 
@@ -1216,7 +1216,7 @@ static void reply_writeclose_send(struct request_context *req)
 /****************************************************************************
  Reply to a writeclose (Core+ protocol).
 ****************************************************************************/
-void reply_writeclose(struct request_context *req)
+void reply_writeclose(struct smbsrv_request *req)
 {
        union smb_write *io;
 
@@ -1252,7 +1252,7 @@ void reply_writeclose(struct request_context *req)
 /****************************************************************************
  Reply to a lock.
 ****************************************************************************/
-void reply_lock(struct request_context *req)
+void reply_lock(struct smbsrv_request *req)
 {
        union smb_lock *lck;
 
@@ -1277,7 +1277,7 @@ void reply_lock(struct request_context *req)
 /****************************************************************************
  Reply to a unlock.
 ****************************************************************************/
-void reply_unlock(struct request_context *req)
+void reply_unlock(struct smbsrv_request *req)
 {
        union smb_lock *lck;
 
@@ -1302,7 +1302,7 @@ void reply_unlock(struct request_context *req)
 /****************************************************************************
  Reply to a tdis.
 ****************************************************************************/
-void reply_tdis(struct request_context *req)
+void reply_tdis(struct smbsrv_request *req)
 {
        REQ_CHECK_WCT(req, 0);
 
@@ -1319,7 +1319,7 @@ void reply_tdis(struct request_context *req)
  Reply to a echo. This is one of the few calls that is handled directly (the
  backends don't see it at all)
 ****************************************************************************/
-void reply_echo(struct request_context *req)
+void reply_echo(struct smbsrv_request *req)
 {
        uint16_t count;
        int i;
@@ -1351,7 +1351,7 @@ void reply_echo(struct request_context *req)
 /****************************************************************************
  Reply to a printopen (async reply)
 ****************************************************************************/
-static void reply_printopen_send(struct request_context *req)
+static void reply_printopen_send(struct smbsrv_request *req)
 {
        union smb_open *oi = req->async.private;
 
@@ -1368,7 +1368,7 @@ static void reply_printopen_send(struct request_context *req)
 /****************************************************************************
  Reply to a printopen.
 ****************************************************************************/
-void reply_printopen(struct request_context *req)
+void reply_printopen(struct smbsrv_request *req)
 {
        union smb_open *oi;
 
@@ -1394,7 +1394,7 @@ void reply_printopen(struct request_context *req)
 /****************************************************************************
  Reply to a printclose.
 ****************************************************************************/
-void reply_printclose(struct request_context *req)
+void reply_printclose(struct smbsrv_request *req)
 {
        union smb_close *io;
 
@@ -1416,7 +1416,7 @@ void reply_printclose(struct request_context *req)
 /****************************************************************************
  Reply to a printqueue.
 ****************************************************************************/
-void reply_printqueue_send(struct request_context *req)
+void reply_printqueue_send(struct smbsrv_request *req)
 {
        union smb_lpq *lpq = req->async.private;
        int i, maxcount;
@@ -1461,7 +1461,7 @@ void reply_printqueue_send(struct request_context *req)
 /****************************************************************************
  Reply to a printqueue.
 ****************************************************************************/
-void reply_printqueue(struct request_context *req)
+void reply_printqueue(struct smbsrv_request *req)
 {
        union smb_lpq *lpq;
 
@@ -1486,7 +1486,7 @@ void reply_printqueue(struct request_context *req)
 /****************************************************************************
  Reply to a printwrite.
 ****************************************************************************/
-void reply_printwrite(struct request_context *req)
+void reply_printwrite(struct smbsrv_request *req)
 {
        union smb_write *io;
 
@@ -1523,7 +1523,7 @@ void reply_printwrite(struct request_context *req)
 /****************************************************************************
  Reply to a mkdir.
 ****************************************************************************/
-void reply_mkdir(struct request_context *req)
+void reply_mkdir(struct smbsrv_request *req)
 {
        union smb_mkdir *io;
 
@@ -1546,7 +1546,7 @@ void reply_mkdir(struct request_context *req)
 /****************************************************************************
  Reply to a rmdir.
 ****************************************************************************/
-void reply_rmdir(struct request_context *req)
+void reply_rmdir(struct smbsrv_request *req)
 {
        struct smb_rmdir *io;
  
@@ -1568,7 +1568,7 @@ void reply_rmdir(struct request_context *req)
 /****************************************************************************
  Reply to a mv.
 ****************************************************************************/
-void reply_mv(struct request_context *req)
+void reply_mv(struct smbsrv_request *req)
 {
        union smb_rename *io;
        char *p;
@@ -1601,7 +1601,7 @@ void reply_mv(struct request_context *req)
 /****************************************************************************
  Reply to an NT rename.
 ****************************************************************************/
-void reply_ntrename(struct request_context *req)
+void reply_ntrename(struct smbsrv_request *req)
 {
        union smb_rename *io;
        char *p;
@@ -1635,7 +1635,7 @@ void reply_ntrename(struct request_context *req)
 /****************************************************************************
  Reply to a file copy (async reply)
 ****************************************************************************/
-static void reply_copy_send(struct request_context *req)
+static void reply_copy_send(struct smbsrv_request *req)
 {
        struct smb_copy *cp = req->async.private;
 
@@ -1652,7 +1652,7 @@ static void reply_copy_send(struct request_context *req)
 /****************************************************************************
  Reply to a file copy.
 ****************************************************************************/
-void reply_copy(struct request_context *req)
+void reply_copy(struct smbsrv_request *req)
 {
        struct smb_copy *cp;
        char *p;
@@ -1686,7 +1686,7 @@ void reply_copy(struct request_context *req)
 /****************************************************************************
  Reply to a lockingX request (async send)
 ****************************************************************************/
-static void reply_lockingX_send(struct request_context *req)
+static void reply_lockingX_send(struct smbsrv_request *req)
 {
        union smb_lock *lck = req->async.private;
 
@@ -1712,7 +1712,7 @@ static void reply_lockingX_send(struct request_context *req)
 /****************************************************************************
  Reply to a lockingX request.
 ****************************************************************************/
-void reply_lockingX(struct request_context *req)
+void reply_lockingX(struct smbsrv_request *req)
 {
        union smb_lock *lck;
        uint_t total_locks, i;
@@ -1786,7 +1786,7 @@ void reply_lockingX(struct request_context *req)
 /****************************************************************************
  Reply to a SMBreadbmpx (read block multiplex) request.
 ****************************************************************************/
-void reply_readbmpx(struct request_context *req)
+void reply_readbmpx(struct smbsrv_request *req)
 {
        /* tell the client to not use a multiplexed read - its too broken to use */
        req_reply_dos_error(req, ERRSRV, ERRuseSTD);
@@ -1796,7 +1796,7 @@ void reply_readbmpx(struct request_context *req)
 /****************************************************************************
  Reply to a SMBsetattrE.
 ****************************************************************************/
-void reply_setattrE(struct request_context *req)
+void reply_setattrE(struct smbsrv_request *req)
 {
        union smb_setfileinfo *info;
 
@@ -1822,7 +1822,7 @@ void reply_setattrE(struct request_context *req)
 /****************************************************************************
  Reply to a SMBwritebmpx (write block multiplex primary) request.
 ****************************************************************************/
-void reply_writebmpx(struct request_context *req)
+void reply_writebmpx(struct smbsrv_request *req)
 {
        /* we will need to implement this one for OS/2, but right now I can't be bothered */
        req_reply_error(req, NT_STATUS_FOOBAR);
@@ -1832,7 +1832,7 @@ void reply_writebmpx(struct request_context *req)
 /****************************************************************************
  Reply to a SMBwritebs (write block multiplex secondary) request.
 ****************************************************************************/
-void reply_writebs(struct request_context *req)
+void reply_writebs(struct smbsrv_request *req)
 {
        /* see reply_writebmpx */
        req_reply_error(req, NT_STATUS_FOOBAR);
@@ -1843,7 +1843,7 @@ void reply_writebs(struct request_context *req)
 /****************************************************************************
  Reply to a SMBgetattrE (async reply)
 ****************************************************************************/
-static void reply_getattrE_send(struct request_context *req)
+static void reply_getattrE_send(struct smbsrv_request *req)
 {
        union smb_fileinfo *info = req->async.private;
 
@@ -1865,7 +1865,7 @@ static void reply_getattrE_send(struct request_context *req)
 /****************************************************************************
  Reply to a SMBgetattrE.
 ****************************************************************************/
-void reply_getattrE(struct request_context *req)
+void reply_getattrE(struct smbsrv_request *req)
 {
        union smb_fileinfo *info;
 
@@ -1889,7 +1889,7 @@ void reply_getattrE(struct request_context *req)
 /****************************************************************************
 reply to an old style session setup command
 ****************************************************************************/
-static void reply_sesssetup_old(struct request_context *req)
+static void reply_sesssetup_old(struct smbsrv_request *req)
 {
        NTSTATUS status;
        union smb_sesssetup sess;
@@ -1947,7 +1947,7 @@ static void reply_sesssetup_old(struct request_context *req)
 /****************************************************************************
 reply to an NT1 style session setup command
 ****************************************************************************/
-static void reply_sesssetup_nt1(struct request_context *req)
+static void reply_sesssetup_nt1(struct smbsrv_request *req)
 {
        NTSTATUS status;
        union smb_sesssetup sess;
@@ -2017,7 +2017,7 @@ static void reply_sesssetup_nt1(struct request_context *req)
 /****************************************************************************
 reply to an SPNEGO style session setup command
 ****************************************************************************/
-static void reply_sesssetup_spnego(struct request_context *req)
+static void reply_sesssetup_spnego(struct smbsrv_request *req)
 {
        NTSTATUS status;
        union smb_sesssetup sess;
@@ -2074,7 +2074,7 @@ static void reply_sesssetup_spnego(struct request_context *req)
 /****************************************************************************
 reply to a session setup command
 ****************************************************************************/
-void reply_sesssetup(struct request_context *req)
+void reply_sesssetup(struct smbsrv_request *req)
 {
        switch (req->in.wct) {
        case 10:
@@ -2099,7 +2099,7 @@ void reply_sesssetup(struct request_context *req)
 /****************************************************************************
  Reply to a SMBulogoffX.
 ****************************************************************************/
-void reply_ulogoffX(struct request_context *req)
+void reply_ulogoffX(struct smbsrv_request *req)
 {
        uint16_t vuid;
 
@@ -2125,7 +2125,7 @@ void reply_ulogoffX(struct request_context *req)
 /****************************************************************************
  Reply to an SMBfindclose request
 ****************************************************************************/
-void reply_findclose(struct request_context *req)
+void reply_findclose(struct smbsrv_request *req)
 {
        NTSTATUS status;
        union smb_search_close io;
@@ -2154,7 +2154,7 @@ void reply_findclose(struct request_context *req)
 /****************************************************************************
  Reply to an SMBfindnclose request
 ****************************************************************************/
-void reply_findnclose(struct request_context *req)
+void reply_findnclose(struct smbsrv_request *req)
 {
        req_reply_error(req, NT_STATUS_FOOBAR);
 }
@@ -2163,7 +2163,7 @@ void reply_findnclose(struct request_context *req)
 /****************************************************************************
  Reply to an SMBntcreateX request (async send)
 ****************************************************************************/
-static void reply_ntcreate_and_X_send(struct request_context *req)
+static void reply_ntcreate_and_X_send(struct smbsrv_request *req)
 {
        union smb_open *io = req->async.private;
 
@@ -2196,7 +2196,7 @@ static void reply_ntcreate_and_X_send(struct request_context *req)
 /****************************************************************************
  Reply to an SMBntcreateX request
 ****************************************************************************/
-void reply_ntcreate_and_X(struct request_context *req)
+void reply_ntcreate_and_X(struct smbsrv_request *req)
 {
        union smb_open *io;
        uint16_t fname_len;
@@ -2245,7 +2245,7 @@ void reply_ntcreate_and_X(struct request_context *req)
 /****************************************************************************
  Reply to an SMBntcancel request
 ****************************************************************************/
-void reply_ntcancel(struct request_context *req)
+void reply_ntcancel(struct smbsrv_request *req)
 {
        req_reply_error(req, NT_STATUS_FOOBAR);
 }
@@ -2253,7 +2253,7 @@ void reply_ntcancel(struct request_context *req)
 /****************************************************************************
  Reply to an SMBsends request
 ****************************************************************************/
-void reply_sends(struct request_context *req)
+void reply_sends(struct smbsrv_request *req)
 {
        req_reply_error(req, NT_STATUS_FOOBAR);
 }
@@ -2261,7 +2261,7 @@ void reply_sends(struct request_context *req)
 /****************************************************************************
  Reply to an SMBsendstrt request
 ****************************************************************************/
-void reply_sendstrt(struct request_context *req)
+void reply_sendstrt(struct smbsrv_request *req)
 {
        req_reply_error(req, NT_STATUS_FOOBAR);
 }
@@ -2269,7 +2269,7 @@ void reply_sendstrt(struct request_context *req)
 /****************************************************************************
  Reply to an SMBsendend request
 ****************************************************************************/
-void reply_sendend(struct request_context *req)
+void reply_sendend(struct smbsrv_request *req)
 {
        req_reply_error(req, NT_STATUS_FOOBAR);
 }
@@ -2277,7 +2277,7 @@ void reply_sendend(struct request_context *req)
 /****************************************************************************
  Reply to an SMBsendtxt request
 ****************************************************************************/
-void reply_sendtxt(struct request_context *req)
+void reply_sendtxt(struct smbsrv_request *req)
 {
        req_reply_error(req, NT_STATUS_FOOBAR);
 }
@@ -2287,7 +2287,7 @@ void reply_sendtxt(struct request_context *req)
 /****************************************************************************
  Reply to a special message - a SMB packet with non zero NBT message type
 ****************************************************************************/
-void reply_special(struct request_context *req)
+void reply_special(struct smbsrv_request *req)
 {
        uint8_t msg_type;
        char buf[4];
index 6361325f220436518a7443b6c2f344259ef8b98d..d845a78c0da9de7a5a411bf9cef05920f56034f1 100644 (file)
@@ -19,7 +19,7 @@
 */
 
 /*
-  this file implements functions for manipulating the 'struct request_context' structure in smbd
+  this file implements functions for manipulating the 'struct smbsrv_request' structure in smbd
 */
 
 #include "includes.h"
@@ -28,7 +28,7 @@
 #define REQ_OVER_ALLOCATION 256
 
 /* destroy a request structure */
-void req_destroy(struct request_context *req)
+void req_destroy(struct smbsrv_request *req)
 {
        /* the request might be marked protected. This is done by the
         * SMBecho code for example */
@@ -45,9 +45,9 @@ void req_destroy(struct request_context *req)
 construct a basic request packet, mostly used to construct async packets
 such as change notify and oplock break requests
 ****************************************************************************/
-struct request_context *init_smb_request(struct smbsrv_context *smb_ctx)
+struct smbsrv_request *init_smb_request(struct smbsrv_context *smb_ctx)
 {
-       struct request_context *req;
+       struct smbsrv_request *req;
        TALLOC_CTX *mem_ctx;
 
        /* each request gets its own talloc context. The request
@@ -79,7 +79,7 @@ struct request_context *init_smb_request(struct smbsrv_context *smb_ctx)
 /*
   setup a chained reply in req->out with the given word count and initial data buffer size. 
 */
-static void req_setup_chain_reply(struct request_context *req, uint_t wct, uint_t buflen)
+static void req_setup_chain_reply(struct smbsrv_request *req, uint_t wct, uint_t buflen)
 {
        uint32_t chain_base_size = req->out.size;
 
@@ -111,7 +111,7 @@ static void req_setup_chain_reply(struct request_context *req, uint_t wct, uint_
   the caller will then fill in the command words and data before calling req_send_reply() to 
   send the reply on its way
 */
-void req_setup_reply(struct request_context *req, uint_t wct, uint_t buflen)
+void req_setup_reply(struct smbsrv_request *req, uint_t wct, uint_t buflen)
 {
        if (req->chain_count != 0) {
                req_setup_chain_reply(req, wct, buflen);
@@ -172,7 +172,7 @@ void req_setup_reply(struct request_context *req, uint_t wct, uint_t buflen)
 
   note that this is deliberately a signed integer reply
 */
-int req_max_data(struct request_context *req)
+int req_max_data(struct smbsrv_request *req)
 {
        int ret;
        ret = req->smb_ctx->negotiate.max_send;
@@ -190,7 +190,7 @@ int req_max_data(struct request_context *req)
   To cope with this req->out.ptr is supplied. This will be updated to
   point at the same offset into the packet as before this call
 */
-static void req_grow_allocation(struct request_context *req, uint_t new_size)
+static void req_grow_allocation(struct smbsrv_request *req, uint_t new_size)
 {
        int delta;
        char *buf2;
@@ -231,7 +231,7 @@ static void req_grow_allocation(struct request_context *req, uint_t new_size)
   To cope with this req->out.ptr is supplied. This will be updated to
   point at the same offset into the packet as before this call
 */
-void req_grow_data(struct request_context *req, uint_t new_size)
+void req_grow_data(struct smbsrv_request *req, uint_t new_size)
 {
        int delta;
 
@@ -256,7 +256,7 @@ void req_grow_data(struct request_context *req, uint_t new_size)
   note that this only looks at req->out.buffer and req->out.size, allowing manually 
   constructed packets to be sent
 */
-void req_send_reply_nosign(struct request_context *req)
+void req_send_reply_nosign(struct smbsrv_request *req)
 {
        if (req->out.size > NBT_HDR_SIZE) {
                _smb_setlen(req->out.buffer, req->out.size - NBT_HDR_SIZE);
@@ -275,7 +275,7 @@ void req_send_reply_nosign(struct request_context *req)
   note that this only looks at req->out.buffer and req->out.size, allowing manually 
   constructed packets to be sent
 */
-void req_send_reply(struct request_context *req)
+void req_send_reply(struct smbsrv_request *req)
 {
        req_sign_packet(req);
 
@@ -288,7 +288,7 @@ void req_send_reply(struct request_context *req)
    construct and send an error packet with a forced DOS error code
    this is needed to match win2000 behaviour for some parts of the protocol
 */
-void req_reply_dos_error(struct request_context *req, uint8_t eclass, uint16_t ecode)
+void req_reply_dos_error(struct smbsrv_request *req, uint8_t eclass, uint16_t ecode)
 {
        /* if the basic packet hasn't been setup yet then do it now */
        if (req->out.buffer == NULL) {
@@ -304,7 +304,7 @@ void req_reply_dos_error(struct request_context *req, uint8_t eclass, uint16_t e
 /* 
    setup the header of a reply to include an NTSTATUS code
 */
-void req_setup_error(struct request_context *req, NTSTATUS status)
+void req_setup_error(struct smbsrv_request *req, NTSTATUS status)
 {
        if (!lp_nt_status_support() || !(req->smb_ctx->negotiate.client_caps & CAP_STATUS32)) {
                /* convert to DOS error codes */
@@ -332,7 +332,7 @@ void req_setup_error(struct request_context *req, NTSTATUS status)
    construct and send an error packet, then destroy the request 
    auto-converts to DOS error format when appropriate
 */
-void req_reply_error(struct request_context *req, NTSTATUS status)
+void req_reply_error(struct smbsrv_request *req, NTSTATUS status)
 {
        req_setup_reply(req, 0, 0);
 
@@ -352,7 +352,7 @@ void req_reply_error(struct request_context *req, NTSTATUS status)
 
   if dest_len is -1 then no limit applies
 */
-size_t req_push_str(struct request_context *req, char *dest, const char *str, int dest_len, uint_t flags)
+size_t req_push_str(struct smbsrv_request *req, char *dest, const char *str, int dest_len, uint_t flags)
 {
        size_t len;
        uint_t grow_size;
@@ -397,7 +397,7 @@ size_t req_push_str(struct request_context *req, char *dest, const char *str, in
   append raw bytes into the data portion of the request packet
   return the number of bytes added
 */
-size_t req_append_bytes(struct request_context *req, 
+size_t req_append_bytes(struct smbsrv_request *req, 
                const uint8_t *bytes, size_t byte_len)
 {
        req_grow_allocation(req, byte_len + req->out.data_size);
@@ -409,7 +409,7 @@ size_t req_append_bytes(struct request_context *req,
   append variable block (type 5 buffer) into the data portion of the request packet
   return the number of bytes added
 */
-size_t req_append_var_block(struct request_context *req, 
+size_t req_append_var_block(struct smbsrv_request *req, 
                const uint8_t *bytes, uint16_t byte_len)
 {
        req_grow_allocation(req, byte_len + 3 + req->out.data_size);
@@ -434,7 +434,7 @@ size_t req_append_var_block(struct request_context *req,
   on failure zero is returned and *dest is set to NULL, otherwise the number
   of bytes consumed in the packet is returned
 */
-static size_t req_pull_ucs2(struct request_context *req, const char **dest, const char *src, int byte_len, uint_t flags)
+static size_t req_pull_ucs2(struct smbsrv_request *req, const char **dest, const char *src, int byte_len, uint_t flags)
 {
        int src_len, src_len2, alignment=0;
        ssize_t ret;
@@ -491,7 +491,7 @@ static size_t req_pull_ucs2(struct request_context *req, const char **dest, cons
   on failure zero is returned and *dest is set to NULL, otherwise the number
   of bytes consumed in the packet is returned
 */
-static size_t req_pull_ascii(struct request_context *req, const char **dest, const char *src, int byte_len, uint_t flags)
+static size_t req_pull_ascii(struct smbsrv_request *req, const char **dest, const char *src, int byte_len, uint_t flags)
 {
        int src_len, src_len2;
        ssize_t ret;
@@ -538,7 +538,7 @@ static size_t req_pull_ascii(struct request_context *req, const char **dest, con
   on failure zero is returned and *dest is set to NULL, otherwise the number
   of bytes consumed in the packet is returned
 */
-size_t req_pull_string(struct request_context *req, const char **dest, const char *src, int byte_len, uint_t flags)
+size_t req_pull_string(struct smbsrv_request *req, const char **dest, const char *src, int byte_len, uint_t flags)
 {
        if (!(flags & STR_ASCII) && 
            (((flags & STR_UNICODE) || (req->flags2 & FLAGS2_UNICODE_STRINGS)))) {
@@ -558,7 +558,7 @@ size_t req_pull_string(struct request_context *req, const char **dest, const cha
   on failure *dest is set to the zero length string. This seems to
   match win2000 behaviour
 */
-size_t req_pull_ascii4(struct request_context *req, const char **dest, const char *src, uint_t flags)
+size_t req_pull_ascii4(struct smbsrv_request *req, const char **dest, const char *src, uint_t flags)
 {
        ssize_t ret;
 
@@ -587,7 +587,7 @@ size_t req_pull_ascii4(struct request_context *req, const char **dest, const cha
 
   return False if any part is outside the data portion of the packet
 */
-BOOL req_pull_blob(struct request_context *req, const char *src, int len, DATA_BLOB *blob)
+BOOL req_pull_blob(struct smbsrv_request *req, const char *src, int len, DATA_BLOB *blob)
 {
        if (len != 0 && req_data_oob(req, src, len)) {
                return False;
@@ -600,7 +600,7 @@ BOOL req_pull_blob(struct request_context *req, const char *src, int len, DATA_B
 
 /* check that a lump of data in a request is within the bounds of the data section of
    the packet */
-BOOL req_data_oob(struct request_context *req, const char *ptr, uint32_t count)
+BOOL req_data_oob(struct smbsrv_request *req, const char *ptr, uint32_t count)
 {
        if (count == 0) {
                return False;
@@ -620,7 +620,7 @@ BOOL req_data_oob(struct request_context *req, const char *ptr, uint32_t count)
 /* 
    pull an open file handle from a packet, taking account of the chained_fnum
 */
-uint16_t req_fnum(struct request_context *req, const char *base, uint_t offset)
+uint16_t req_fnum(struct smbsrv_request *req, const char *base, uint_t offset)
 {
        if (req->chained_fnum != -1) {
                return req->chained_fnum;
index 40ea53c2354fc6a75f7442e3370900314d8ff3a3..282f4bd1a31e55f13f8539bbfd5aac54a6979006 100644 (file)
@@ -57,7 +57,7 @@
 /* a structure to encapsulate the state information about 
  * an in-progress search first/next operation */
 struct search_state {
-       struct request_context *req;
+       struct smbsrv_request *req;
        union smb_search_data *file;
        uint16_t last_entry_offset;
 };
@@ -65,7 +65,7 @@ struct search_state {
 /*
   fill a single entry in a search find reply 
 */
-static void find_fill_info(struct request_context *req,
+static void find_fill_info(struct smbsrv_request *req,
                           union smb_search_data *file)
 {
        char *p = req->out.data + req->out.data_size;
@@ -100,7 +100,7 @@ static BOOL find_callback(void *private, union smb_search_data *file)
 /****************************************************************************
  Reply to a search.
 ****************************************************************************/
-void reply_search(struct request_context *req)
+void reply_search(struct smbsrv_request *req)
 {
        union smb_search_first *sf;
        union smb_search_next *sn;
@@ -176,7 +176,7 @@ void reply_search(struct request_context *req)
 /****************************************************************************
  Reply to a fclose (async reply)
 ****************************************************************************/
-static void reply_fclose_send(struct request_context *req)
+static void reply_fclose_send(struct smbsrv_request *req)
 {
        CHECK_ASYNC_STATUS;
        
@@ -190,7 +190,7 @@ static void reply_fclose_send(struct request_context *req)
 /****************************************************************************
  Reply to fclose (stop directory search).
 ****************************************************************************/
-void reply_fclose(struct request_context *req)
+void reply_fclose(struct smbsrv_request *req)
 {
        union smb_search_next *sn;
        DATA_BLOB resume_key;
index 61cc8c718dd9bdbd9f19b638a311428ab633a9ba..082a7d02da4ea8a7ec25a3eb845dd6559a8f61d1 100644 (file)
@@ -135,7 +135,7 @@ static int find_service(const char *service)
   Make a connection, given the snum to connect to, and the vuser of the
   connecting user if appropriate.
 ****************************************************************************/
-static NTSTATUS make_connection_snum(struct request_context *req,
+static NTSTATUS make_connection_snum(struct smbsrv_request *req,
                                     int snum, enum ntvfs_type type,
                                     DATA_BLOB password, 
                                     const char *dev)
@@ -208,7 +208,7 @@ static NTSTATUS make_connection_snum(struct request_context *req,
  *
  * @param service 
 ****************************************************************************/
-static NTSTATUS make_connection(struct request_context *req,
+static NTSTATUS make_connection(struct smbsrv_request *req,
                                const char *service, DATA_BLOB password, 
                                const char *dev, uint16_t vuid)
 {
@@ -274,7 +274,7 @@ void close_cnum(struct smbsrv_tcon *tcon)
 /*
   backend for tree connect call
 */
-NTSTATUS tcon_backend(struct request_context *req, union smb_tcon *con)
+NTSTATUS tcon_backend(struct smbsrv_request *req, union smb_tcon *con)
 {
        NTSTATUS status;
 
index f438f847127a9b0d3b9b83b4ec23f5a3abcec8ce..f766d9bd0f48c323b7735222b940020e0c423a9f 100644 (file)
@@ -26,7 +26,7 @@
 /*
   setup the OS, Lanman and domain portions of a session setup reply
 */
-static void sesssetup_common_strings(struct request_context *req,
+static void sesssetup_common_strings(struct smbsrv_request *req,
                                     char **os, char **lanman, char **domain)
 {
        (*os) = talloc_asprintf(req->mem_ctx, "Unix");
@@ -38,7 +38,7 @@ static void sesssetup_common_strings(struct request_context *req,
 /*
   handler for old style session setup
 */
-static NTSTATUS sesssetup_old(struct request_context *req, union smb_sesssetup *sess)
+static NTSTATUS sesssetup_old(struct smbsrv_request *req, union smb_sesssetup *sess)
 {
        NTSTATUS status;
        struct auth_usersupplied_info *user_info = NULL;
@@ -86,7 +86,7 @@ static NTSTATUS sesssetup_old(struct request_context *req, union smb_sesssetup *
 /*
   handler for NT1 style session setup
 */
-static NTSTATUS sesssetup_nt1(struct request_context *req, union smb_sesssetup *sess)
+static NTSTATUS sesssetup_nt1(struct smbsrv_request *req, union smb_sesssetup *sess)
 {
        NTSTATUS status;
        struct auth_usersupplied_info *user_info = NULL;
@@ -136,7 +136,7 @@ static NTSTATUS sesssetup_nt1(struct request_context *req, union smb_sesssetup *
 /*
   handler for SPNEGO style session setup
 */
-static NTSTATUS sesssetup_spnego(struct request_context *req, union smb_sesssetup *sess)
+static NTSTATUS sesssetup_spnego(struct smbsrv_request *req, union smb_sesssetup *sess)
 {
        /* defer this one for now */
        return NT_STATUS_INVALID_LEVEL;
@@ -145,7 +145,7 @@ static NTSTATUS sesssetup_spnego(struct request_context *req, union smb_sesssetu
 /*
   backend for sessionsetup call - this takes all 3 variants of the call
 */
-NTSTATUS sesssetup_backend(struct request_context *req, 
+NTSTATUS sesssetup_backend(struct smbsrv_request *req, 
                           union smb_sesssetup *sess)
 {
        switch (sess->generic.level) {
index 9fcd875e39ed33455f708a165c9f390f410e99f7..4765d9d6c3a5effa68f48da59f6569a1604b4a07 100644 (file)
@@ -23,7 +23,7 @@
 /*
   mark the flags2 field in a packet as signed
 */
-static void mark_packet_signed(struct request_context *req) 
+static void mark_packet_signed(struct smbsrv_request *req) 
 {
        uint16_t flags2;
        flags2 = SVAL(req->out.hdr, HDR_FLG2);
@@ -51,7 +51,7 @@ static void calc_signature(uint8_t *buffer, size_t length,
 /*
   sign an outgoing packet
 */
-void req_sign_packet(struct request_context *req)
+void req_sign_packet(struct smbsrv_request *req)
 {
        /* check if we are doing signing on this connection */
        if (req->smb_ctx->signing.signing_state != SMB_SIGNING_REQUIRED) {
@@ -90,7 +90,7 @@ void srv_setup_signing(struct smbsrv_context *smb_ctx,
 /*
   allocate a sequence number to a request
 */
-static void req_signing_alloc_seq_num(struct request_context *req)
+static void req_signing_alloc_seq_num(struct smbsrv_request *req)
 {
        req->seq_num = req->smb_ctx->signing.next_seq_num;
 
@@ -104,7 +104,7 @@ static void req_signing_alloc_seq_num(struct request_context *req)
 /*
   check the signature of an incoming packet
 */
-BOOL req_signing_check_incoming(struct request_context *req)
+BOOL req_signing_check_incoming(struct smbsrv_request *req)
 {
        uint8_t client_md5_mac[8], signature[8];
 
index 6fdfdb6097a68c2bb4a5450b52c4f1dc5bc501c2..b32cf5b7afc960b0909989a618784b786f8ef1ba 100644 (file)
@@ -27,7 +27,7 @@
 */
 BOOL req_send_oplock_break(struct smbsrv_tcon *tcon, uint16_t fnum, uint8_t level)
 {
-       struct request_context *req;
+       struct smbsrv_request *req;
 
        req = init_smb_request(tcon->smb_ctx);
 
@@ -57,11 +57,11 @@ BOOL req_send_oplock_break(struct smbsrv_tcon *tcon, uint16_t fnum, uint8_t leve
 /****************************************************************************
 receive a SMB request from the wire, forming a request_context from the result
 ****************************************************************************/
-static struct request_context *receive_smb_request(struct smbsrv_context *smb_ctx)
+static struct smbsrv_request *receive_smb_request(struct smbsrv_context *smb_ctx)
 {
        ssize_t len, len2;
        char header[4];
-       struct request_context *req;
+       struct smbsrv_request *req;
 
        len = read_data(smb_ctx->socket.fd, header, 4);
        if (len != 4) {
@@ -116,7 +116,7 @@ static struct request_context *receive_smb_request(struct smbsrv_context *smb_ct
 /*
   setup the user_ctx element of a request
 */
-static void setup_user_context(struct request_context *req)
+static void setup_user_context(struct smbsrv_request *req)
 {
        struct smbsrv_user *user_ctx;
 
@@ -150,7 +150,7 @@ force write permissions on print services.
 static const struct smb_message_struct
 {
        const char *name;
-       void (*fn)(struct request_context *);
+       void (*fn)(struct smbsrv_request *);
        int flags;
 }
  smb_messages[256] = {
@@ -433,7 +433,7 @@ for sending the reply themselves, rather than returning a size to this function
 The reply functions may also choose to delay the processing by pushing the message
 onto the message queue
 ****************************************************************************/
-static void switch_message(int type, struct request_context *req)
+static void switch_message(int type, struct smbsrv_request *req)
 {
        int flags;
        uint16_t session_tag;
@@ -548,7 +548,7 @@ static void switch_message(int type, struct request_context *req)
 /****************************************************************************
  Construct a reply to the incoming packet.
 ****************************************************************************/
-static void construct_reply(struct request_context *req)
+static void construct_reply(struct smbsrv_request *req)
 {
        uint8_t type = CVAL(req->in.hdr,HDR_COM);
 
@@ -596,7 +596,7 @@ static void construct_reply(struct request_context *req)
   we call this when first first part of a possibly chained request has been completed
   and we need to call the 2nd part, if any
 */
-void chain_reply(struct request_context *req)
+void chain_reply(struct smbsrv_request *req)
 {
        uint16_t chain_cmd, chain_offset;
        char *vwv, *data;
@@ -782,7 +782,7 @@ void open_sockets_smbd(struct event_context *events,
 void smbd_read_handler(struct event_context *ev, struct fd_event *fde, 
                       time_t t, uint16_t flags)
 {
-       struct request_context *req;
+       struct smbsrv_request *req;
        struct smbsrv_context *smb_ctx = fde->private;
        
        req = receive_smb_request(smb_ctx);
@@ -806,7 +806,7 @@ void smbd_read_handler(struct event_context *ev, struct fd_event *fde,
 */
 void smbd_process_async(struct smbsrv_context *smb_ctx)
 {
-       struct request_context *req;
+       struct smbsrv_request *req;
        
        req = receive_smb_request(smb_ctx);
        if (!req) {
index 738247b713635b7d6857d83d2dc41243b50243b1..0ab1ca0b7cbb374c3aa1b32c0a9410d8cfb57d8c 100644 (file)
@@ -32,7 +32,7 @@
 /* grow the data allocation size of a trans2 reply - this guarantees
    that requests to grow the data size later will not change the
    pointer */
-static void trans2_grow_data_allocation(struct request_context *req, 
+static void trans2_grow_data_allocation(struct smbsrv_request *req, 
                                        struct smb_trans2 *trans,
                                        uint16_t new_size)
 {
@@ -44,7 +44,7 @@ static void trans2_grow_data_allocation(struct request_context *req,
 
 
 /* grow the data size of a trans2 reply */
-static void trans2_grow_data(struct request_context *req, 
+static void trans2_grow_data(struct smbsrv_request *req, 
                             struct smb_trans2 *trans,
                             uint16_t new_size)
 {
@@ -53,7 +53,7 @@ static void trans2_grow_data(struct request_context *req,
 }
 
 /* grow the data, zero filling any new bytes */
-static void trans2_grow_data_fill(struct request_context *req, 
+static void trans2_grow_data_fill(struct smbsrv_request *req, 
                                  struct smb_trans2 *trans,
                                  uint16_t new_size)
 {
@@ -66,7 +66,7 @@ static void trans2_grow_data_fill(struct request_context *req,
 
 
 /* setup a trans2 reply, given the data and params sizes */
-static void trans2_setup_reply(struct request_context *req, 
+static void trans2_setup_reply(struct smbsrv_request *req, 
                               struct smb_trans2 *trans,
                               uint16_t param_size, uint16_t data_size,
                               uint16_t setup_count)
@@ -83,7 +83,7 @@ static void trans2_setup_reply(struct request_context *req,
 /*
   pull a string from a blob in a trans2 request
 */
-static size_t trans2_pull_blob_string(struct request_context *req, 
+static size_t trans2_pull_blob_string(struct smbsrv_request *req, 
                                      const DATA_BLOB *blob,
                                      uint16_t offset,
                                      const char **str,
@@ -107,7 +107,7 @@ static size_t trans2_pull_blob_string(struct request_context *req,
   push a string into the data section of a trans2 request
   return the number of bytes consumed in the output
 */
-static size_t trans2_push_data_string(struct request_context *req, 
+static size_t trans2_push_data_string(struct smbsrv_request *req, 
                                      struct smb_trans2 *trans,
                                      uint16_t len_offset,
                                      uint16_t offset,
@@ -176,7 +176,7 @@ static size_t trans2_push_data_string(struct request_context *req,
   len_offset points to the place in the packet where the length field
   should go
 */
-static void trans2_append_data_string(struct request_context *req, 
+static void trans2_append_data_string(struct smbsrv_request *req, 
                                        struct smb_trans2 *trans,
                                        const WIRE_STRING *str,
                                        uint_t len_offset,
@@ -196,7 +196,7 @@ static void trans2_append_data_string(struct request_context *req,
 /*
   trans2 qfsinfo implementation
 */
-static NTSTATUS trans2_qfsinfo(struct request_context *req, struct smb_trans2 *trans)
+static NTSTATUS trans2_qfsinfo(struct smbsrv_request *req, struct smb_trans2 *trans)
 {
        union smb_fsinfo fsinfo;
        NTSTATUS status;
@@ -391,7 +391,7 @@ static NTSTATUS trans2_qfsinfo(struct request_context *req, struct smb_trans2 *t
 /*
   fill in the reply from a qpathinfo or qfileinfo call
 */
-static NTSTATUS trans2_fileinfo_fill(struct request_context *req, struct smb_trans2 *trans,
+static NTSTATUS trans2_fileinfo_fill(struct smbsrv_request *req, struct smb_trans2 *trans,
                                     union smb_fileinfo *st)
 {
        uint_t i;
@@ -614,7 +614,7 @@ static NTSTATUS trans2_fileinfo_fill(struct request_context *req, struct smb_tra
 /*
   trans2 qpathinfo implementation
 */
-static NTSTATUS trans2_qpathinfo(struct request_context *req, struct smb_trans2 *trans)
+static NTSTATUS trans2_qpathinfo(struct smbsrv_request *req, struct smb_trans2 *trans)
 {
        union smb_fileinfo st;
        NTSTATUS status;
@@ -654,7 +654,7 @@ static NTSTATUS trans2_qpathinfo(struct request_context *req, struct smb_trans2
 /*
   trans2 qpathinfo implementation
 */
-static NTSTATUS trans2_qfileinfo(struct request_context *req, struct smb_trans2 *trans)
+static NTSTATUS trans2_qfileinfo(struct smbsrv_request *req, struct smb_trans2 *trans)
 {
        union smb_fileinfo st;
        NTSTATUS status;
@@ -690,7 +690,7 @@ static NTSTATUS trans2_qfileinfo(struct request_context *req, struct smb_trans2
 /*
   parse a trans2 setfileinfo/setpathinfo data blob
 */
-static NTSTATUS trans2_parse_sfileinfo(struct request_context *req,
+static NTSTATUS trans2_parse_sfileinfo(struct smbsrv_request *req,
                                       union smb_setfileinfo *st,
                                       const DATA_BLOB *blob)
 {
@@ -786,7 +786,7 @@ static NTSTATUS trans2_parse_sfileinfo(struct request_context *req,
 /*
   trans2 setfileinfo implementation
 */
-static NTSTATUS trans2_setfileinfo(struct request_context *req, struct smb_trans2 *trans)
+static NTSTATUS trans2_setfileinfo(struct smbsrv_request *req, struct smb_trans2 *trans)
 {
        union smb_setfileinfo st;
        NTSTATUS status;
@@ -824,7 +824,7 @@ static NTSTATUS trans2_setfileinfo(struct request_context *req, struct smb_trans
 /*
   trans2 setpathinfo implementation
 */
-static NTSTATUS trans2_setpathinfo(struct request_context *req, struct smb_trans2 *trans)
+static NTSTATUS trans2_setpathinfo(struct smbsrv_request *req, struct smb_trans2 *trans)
 {
        union smb_setfileinfo st;
        NTSTATUS status;
@@ -863,7 +863,7 @@ static NTSTATUS trans2_setpathinfo(struct request_context *req, struct smb_trans
 
 /* a structure to encapsulate the state information about an in-progress ffirst/fnext operation */
 struct find_state {
-       struct request_context *req;
+       struct smbsrv_request *req;
        struct smb_trans2 *trans;
        enum search_level level;
        uint16_t last_entry_offset;
@@ -873,7 +873,7 @@ struct find_state {
 /*
   fill a single entry in a trans2 find reply 
 */
-static void find_fill_info(struct request_context *req,
+static void find_fill_info(struct smbsrv_request *req,
                           struct smb_trans2 *trans, 
                           struct find_state *state,
                           union smb_search_data *file)
@@ -1069,7 +1069,7 @@ static BOOL find_callback(void *private, union smb_search_data *file)
 /*
   trans2 findfirst implementation
 */
-static NTSTATUS trans2_findfirst(struct request_context *req, struct smb_trans2 *trans)
+static NTSTATUS trans2_findfirst(struct smbsrv_request *req, struct smb_trans2 *trans)
 {
        union smb_search_first search;
        NTSTATUS status;
@@ -1129,7 +1129,7 @@ static NTSTATUS trans2_findfirst(struct request_context *req, struct smb_trans2
 /*
   trans2 findnext implementation
 */
-static NTSTATUS trans2_findnext(struct request_context *req, struct smb_trans2 *trans)
+static NTSTATUS trans2_findnext(struct smbsrv_request *req, struct smb_trans2 *trans)
 {
        union smb_search_next search;
        NTSTATUS status;
@@ -1188,7 +1188,7 @@ static NTSTATUS trans2_findnext(struct request_context *req, struct smb_trans2 *
 /*
   backend for trans2 requests
 */
-static NTSTATUS trans2_backend(struct request_context *req, struct smb_trans2 *trans)
+static NTSTATUS trans2_backend(struct smbsrv_request *req, struct smb_trans2 *trans)
 {
        if (req->tcon->ntvfs_ops->trans2 != NULL) {
                /* direct trans2 pass thru */
@@ -1226,7 +1226,7 @@ static NTSTATUS trans2_backend(struct request_context *req, struct smb_trans2 *t
 /*
   backend for trans requests
 */
-static NTSTATUS trans_backend(struct request_context *req, struct smb_trans2 *trans)
+static NTSTATUS trans_backend(struct smbsrv_request *req, struct smb_trans2 *trans)
 {
        if (!req->tcon->ntvfs_ops->trans) {
                return NT_STATUS_NOT_IMPLEMENTED;
@@ -1238,7 +1238,7 @@ static NTSTATUS trans_backend(struct request_context *req, struct smb_trans2 *tr
 /****************************************************************************
  Reply to an SMBtrans or SMBtrans2 request
 ****************************************************************************/
-void reply_trans_generic(struct request_context *req, uint8_t command)
+void reply_trans_generic(struct smbsrv_request *req, uint8_t command)
 {
        struct smb_trans2 trans;
        int i;
@@ -1391,7 +1391,7 @@ void reply_trans_generic(struct request_context *req, uint8_t command)
 /****************************************************************************
  Reply to an SMBtrans2
 ****************************************************************************/
-void reply_trans2(struct request_context *req)
+void reply_trans2(struct smbsrv_request *req)
 {
        reply_trans_generic(req, SMBtrans2);
 }
@@ -1399,7 +1399,7 @@ void reply_trans2(struct request_context *req)
 /****************************************************************************
  Reply to an SMBtrans
 ****************************************************************************/
-void reply_trans(struct request_context *req)
+void reply_trans(struct smbsrv_request *req)
 {
        reply_trans_generic(req, SMBtrans);
 }
@@ -1407,7 +1407,7 @@ void reply_trans(struct request_context *req)
 /****************************************************************************
  Reply to an SMBtranss2 request
 ****************************************************************************/
-void reply_transs2(struct request_context *req)
+void reply_transs2(struct smbsrv_request *req)
 {
        req_reply_error(req, NT_STATUS_FOOBAR);
 }
index b6058925987044294e7e0841729bc0181d1e28aa..8d6635205ce99e8659f3ea96a746130ed235bf05 100644 (file)
@@ -54,7 +54,7 @@ struct model_ops {
        void (*exit_server)(struct smbsrv_context *smb, const char *reason);
        
        /* returns process or thread id */
-       int (*get_id)(struct request_context *req);
+       int (*get_id)(struct smbsrv_request *req);
 };
 
 /* this structure is used by modules to determine the size of some critical types */
index 620c4363809ff776b77b21c8d1a61730ead6e5cc..ba4c7225e748f70fbb2f9614b138c8e599bfc0b8 100644 (file)
@@ -87,7 +87,7 @@ static void terminate_rpc_connection(void *r, const char *reason)
        rpc_server_terminate(r);
 }
 
-static int get_id(struct request_context *req)
+static int get_id(struct smbsrv_request *req)
 {
        return (int)req->smb_ctx->pid;
 }
index b3a69c72950f13eee01ac0d6aa090d5a4445965d..84166196d5d4b99233b980392d4a73f511a06fa7 100644 (file)
@@ -130,7 +130,7 @@ static void terminate_rpc_connection(void *r, const char *reason)
        exit(0);
 }
 
-static int get_id(struct request_context *req)
+static int get_id(struct smbsrv_request *req)
 {
        return (int)req->smb_ctx->pid;
 }
index bd63749f8ea5b4f5568625d5b0108101eb3ff95b..bccf132fe419964f326b394c8d556be347a5f41a 100644 (file)
@@ -37,7 +37,7 @@ static void *connection_thread(void *thread_parm)
        return NULL;
 }
 
-static int get_id(struct request_context *req)
+static int get_id(struct smbsrv_request *req)
 {
        return (int)pthread_self();
 }
index c24b2232fdd7d8c8aca814e27bec65a05dd12658..b0ef693497dcab710eda6722886155d3b530c14e 100644 (file)
@@ -35,7 +35,7 @@ BOOL init_change_notify(void)
 BOOL pcap_printername_ok(const char *service, const char *foo)
 { return True; }
 
-BOOL share_access_check(struct request_context *req, struct smbsrv_tcon *tcon, int snum, uint32_t desired_access)
+BOOL share_access_check(struct smbsrv_request *req, struct smbsrv_tcon *tcon, int snum, uint32_t desired_access)
 { return True; }
 
 BOOL init_names(void)