/* 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;
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;
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
/* a structure used to pass information to an async handler */
struct async_info {
- struct request_context *req;
+ struct smbsrv_request *req;
void *parms;
};
/*
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;
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;
}
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);
}
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;
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);
}
/*
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;
/*
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;
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);
}
/*
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;
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);
}
/*
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;
/*
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;
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);
}
/*
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;
/*
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;
/*
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;
/*
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;
/*
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;
}
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);
}
/*
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;
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);
}
/*
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;
/*
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;
}
/*
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;
}
/*
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;
/*
exit - closing files?
*/
-static NTSTATUS cvfs_exit(struct request_context *req)
+static NTSTATUS cvfs_exit(struct smbsrv_request *req)
{
return NT_STATUS_NOT_SUPPORTED;
}
/*
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;
/*
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;
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);
}
/*
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;
/*
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;
}
/*
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 *))
{
}
/* 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 *))
{
}
/* 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;
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;
/* 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;
}
/*
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;
/*
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;
}
/*
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;
}
/*
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;
}
/*
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;
}
/*
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;
}
/*
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;
/*
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;
/*
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;
/*
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;
/*
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;
}
/*
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;
}
/*
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;
}
/*
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;
}
/*
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;
/*
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;
/*
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;
}
/*
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;
}
/*
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;
/*
exit - closing files?
*/
-static NTSTATUS ipc_exit(struct request_context *req)
+static NTSTATUS ipc_exit(struct smbsrv_request *req)
{
return NT_STATUS_ACCESS_DENIED;
}
/*
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;
}
/*
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;
}
/*
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;
}
/*
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;
}
/*
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;
}
/*
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 *))
{
/*
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 *))
{
/*
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;
/* 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;
/* 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;
/*
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;
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;
/*
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;
/*
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;
/*
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;
/*
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;
/*
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;
/*
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;
/*
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;
/*
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;
/*
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;
/*
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;
/*
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;
/*
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;
/*
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;
/*
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;
/*
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;
/*
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;
/*
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;
/*
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;
/*
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;
/*
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;
/*
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 *))
{
}
/* 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 *))
{
}
/* 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;
}
/* 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;
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);
};
int sizeof_ntvfs_ops;
int sizeof_SMB_OFF_T;
int sizeof_smbsrv_tcon;
- int sizeof_request_context;
+ int sizeof_smbsrv_request;
};
sizeof(struct ntvfs_ops),
sizeof(SMB_OFF_T),
sizeof(struct smbsrv_tcon),
- sizeof(struct request_context),
+ sizeof(struct smbsrv_request),
};
return &critical_sizes;
/*
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);
/*
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;
/*
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;
/*
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 */
/*
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;
/*
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;
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"));
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;
}
/*
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;
}
/*
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;
/*
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;
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;
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;
/*
disconnect from a share
*/
-static NTSTATUS svfs_disconnect(struct request_context *req)
+static NTSTATUS svfs_disconnect(struct smbsrv_request *req)
{
return NT_STATUS_OK;
}
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;
/*
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;
}
/*
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;
/*
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:
/*
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;
/*
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;
/*
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;
}
/*
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;
/*
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;
/*
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;
/*
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;
/*
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;
}
/*
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;
/*
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;
/*
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;
}
/*
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;
/*
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 */
/*
exit - closing files?
*/
-static NTSTATUS svfs_exit(struct request_context *req)
+static NTSTATUS svfs_exit(struct smbsrv_request *req)
{
return NT_STATUS_NOT_SUPPORTED;
}
/*
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;
/*
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",
/*
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;
/*
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;
/*
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;
}
/*
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 *))
{
}
/* 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 *))
{
}
/* 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;
/*
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;
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;
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;
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;
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;
/*
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;
}
/*
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;
/*
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;
/*
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;
/*
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;
/*
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;
/*
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;
/*
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;
/*
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;
/*
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;
}
/*
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;
/*
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;
/*
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;
}
/*
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;
/*
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;
/*
exit - closing files?
*/
-static NTSTATUS svfs_exit(struct request_context *req)
+static NTSTATUS svfs_exit(struct smbsrv_request *req)
{
return NT_STATUS_NOT_SUPPORTED;
}
/*
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;
/*
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);
/*
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;
/*
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;
/*
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;
/*
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;
}
/*
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 *))
{
}
/* 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 *))
{
}
/* 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;
}
/* 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;
}
/****************************************************************************
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);
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);
/****************************************************************************
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;
/****************************************************************************
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;
/****************************************************************************
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;
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},
Reply to a negprot.
****************************************************************************/
-void reply_negprot(struct request_context *req)
+void reply_negprot(struct smbsrv_request *req)
{
int Index=0;
int choice = -1;
/* 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)
/* 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;
/* 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;
/*
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",
/****************************************************************************
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;
/****************************************************************************
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);
}
/****************************************************************************
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;
/****************************************************************************
Reply to a tcon.
****************************************************************************/
-void reply_tcon(struct request_context *req)
+void reply_tcon(struct smbsrv_request *req)
{
union smb_tcon con;
NTSTATUS status;
/****************************************************************************
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;
/****************************************************************************
Reply to an unknown request
****************************************************************************/
-void reply_unknown(struct request_context *req)
+void reply_unknown(struct smbsrv_request *req)
{
int type;
/****************************************************************************
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;
/****************************************************************************
Reply to an ioctl.
****************************************************************************/
-void reply_ioctl(struct request_context *req)
+void reply_ioctl(struct smbsrv_request *req)
{
union smb_ioctl *io;
/****************************************************************************
Reply to a chkpth.
****************************************************************************/
-void reply_chkpth(struct request_context *req)
+void reply_chkpth(struct smbsrv_request *req)
{
struct smb_chkpath *io;
/****************************************************************************
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;
/****************************************************************************
Reply to a getatr.
****************************************************************************/
-void reply_getatr(struct request_context *req)
+void reply_getatr(struct smbsrv_request *req)
{
union smb_fileinfo *st;
/****************************************************************************
Reply to a setatr.
****************************************************************************/
-void reply_setatr(struct request_context *req)
+void reply_setatr(struct smbsrv_request *req)
{
union smb_setfileinfo *st;
/****************************************************************************
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;
/****************************************************************************
Reply to a dskattr.
****************************************************************************/
-void reply_dskattr(struct request_context *req)
+void reply_dskattr(struct smbsrv_request *req)
{
union smb_fsinfo *fs;
/****************************************************************************
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;
/****************************************************************************
Reply to an open.
****************************************************************************/
-void reply_open(struct request_context *req)
+void reply_open(struct smbsrv_request *req)
{
union smb_open *oi;
/****************************************************************************
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;
/****************************************************************************
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;
/****************************************************************************
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;
/****************************************************************************
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;
/****************************************************************************
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;
/****************************************************************************
Reply to a create temporary file.
****************************************************************************/
-void reply_ctemp(struct request_context *req)
+void reply_ctemp(struct smbsrv_request *req)
{
union smb_open *oi;
/****************************************************************************
Reply to a unlink
****************************************************************************/
-void reply_unlink(struct request_context *req)
+void reply_unlink(struct smbsrv_request *req)
{
struct smb_unlink *unl;
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;
/****************************************************************************
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;
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;
/****************************************************************************
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;
/****************************************************************************
Reply to a read.
****************************************************************************/
-void reply_read(struct request_context *req)
+void reply_read(struct smbsrv_request *req)
{
union smb_read *io;
/****************************************************************************
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;
/****************************************************************************
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;
/****************************************************************************
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);
/****************************************************************************
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;
/****************************************************************************
Reply to a writeunlock (core+).
****************************************************************************/
-void reply_writeunlock(struct request_context *req)
+void reply_writeunlock(struct smbsrv_request *req)
{
union smb_write *io;
/****************************************************************************
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;
/****************************************************************************
Reply to a write
****************************************************************************/
-void reply_write(struct request_context *req)
+void reply_write(struct smbsrv_request *req)
{
union smb_write *io;
/****************************************************************************
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;
/****************************************************************************
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;
/****************************************************************************
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;
/****************************************************************************
Reply to a lseek.
****************************************************************************/
-void reply_lseek(struct request_context *req)
+void reply_lseek(struct smbsrv_request *req)
{
struct smb_seek *io;
/****************************************************************************
Reply to a flush.
****************************************************************************/
-void reply_flush(struct request_context *req)
+void reply_flush(struct smbsrv_request *req)
{
struct smb_flush *io;
/****************************************************************************
Reply to a exit.
****************************************************************************/
-void reply_exit(struct request_context *req)
+void reply_exit(struct smbsrv_request *req)
{
REQ_CHECK_WCT(req, 0);
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;
/****************************************************************************
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;
/****************************************************************************
Reply to a writeclose (Core+ protocol).
****************************************************************************/
-void reply_writeclose(struct request_context *req)
+void reply_writeclose(struct smbsrv_request *req)
{
union smb_write *io;
/****************************************************************************
Reply to a lock.
****************************************************************************/
-void reply_lock(struct request_context *req)
+void reply_lock(struct smbsrv_request *req)
{
union smb_lock *lck;
/****************************************************************************
Reply to a unlock.
****************************************************************************/
-void reply_unlock(struct request_context *req)
+void reply_unlock(struct smbsrv_request *req)
{
union smb_lock *lck;
/****************************************************************************
Reply to a tdis.
****************************************************************************/
-void reply_tdis(struct request_context *req)
+void reply_tdis(struct smbsrv_request *req)
{
REQ_CHECK_WCT(req, 0);
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;
/****************************************************************************
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;
/****************************************************************************
Reply to a printopen.
****************************************************************************/
-void reply_printopen(struct request_context *req)
+void reply_printopen(struct smbsrv_request *req)
{
union smb_open *oi;
/****************************************************************************
Reply to a printclose.
****************************************************************************/
-void reply_printclose(struct request_context *req)
+void reply_printclose(struct smbsrv_request *req)
{
union smb_close *io;
/****************************************************************************
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;
/****************************************************************************
Reply to a printqueue.
****************************************************************************/
-void reply_printqueue(struct request_context *req)
+void reply_printqueue(struct smbsrv_request *req)
{
union smb_lpq *lpq;
/****************************************************************************
Reply to a printwrite.
****************************************************************************/
-void reply_printwrite(struct request_context *req)
+void reply_printwrite(struct smbsrv_request *req)
{
union smb_write *io;
/****************************************************************************
Reply to a mkdir.
****************************************************************************/
-void reply_mkdir(struct request_context *req)
+void reply_mkdir(struct smbsrv_request *req)
{
union smb_mkdir *io;
/****************************************************************************
Reply to a rmdir.
****************************************************************************/
-void reply_rmdir(struct request_context *req)
+void reply_rmdir(struct smbsrv_request *req)
{
struct smb_rmdir *io;
/****************************************************************************
Reply to a mv.
****************************************************************************/
-void reply_mv(struct request_context *req)
+void reply_mv(struct smbsrv_request *req)
{
union smb_rename *io;
char *p;
/****************************************************************************
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;
/****************************************************************************
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;
/****************************************************************************
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;
/****************************************************************************
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;
/****************************************************************************
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;
/****************************************************************************
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);
/****************************************************************************
Reply to a SMBsetattrE.
****************************************************************************/
-void reply_setattrE(struct request_context *req)
+void reply_setattrE(struct smbsrv_request *req)
{
union smb_setfileinfo *info;
/****************************************************************************
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);
/****************************************************************************
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);
/****************************************************************************
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;
/****************************************************************************
Reply to a SMBgetattrE.
****************************************************************************/
-void reply_getattrE(struct request_context *req)
+void reply_getattrE(struct smbsrv_request *req)
{
union smb_fileinfo *info;
/****************************************************************************
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;
/****************************************************************************
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;
/****************************************************************************
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;
/****************************************************************************
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:
/****************************************************************************
Reply to a SMBulogoffX.
****************************************************************************/
-void reply_ulogoffX(struct request_context *req)
+void reply_ulogoffX(struct smbsrv_request *req)
{
uint16_t vuid;
/****************************************************************************
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;
/****************************************************************************
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);
}
/****************************************************************************
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;
/****************************************************************************
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;
/****************************************************************************
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);
}
/****************************************************************************
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);
}
/****************************************************************************
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);
}
/****************************************************************************
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);
}
/****************************************************************************
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);
}
/****************************************************************************
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];
*/
/*
- 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"
#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 */
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
/*
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;
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);
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;
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;
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;
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);
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);
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) {
/*
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 */
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);
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;
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);
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);
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;
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;
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)))) {
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;
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;
/* 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;
/*
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;
/* 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;
};
/*
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;
/****************************************************************************
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;
/****************************************************************************
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;
/****************************************************************************
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;
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)
*
* @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)
{
/*
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;
/*
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");
/*
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;
/*
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;
/*
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;
/*
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) {
/*
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);
/*
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) {
/*
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;
/*
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];
*/
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);
/****************************************************************************
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) {
/*
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;
static const struct smb_message_struct
{
const char *name;
- void (*fn)(struct request_context *);
+ void (*fn)(struct smbsrv_request *);
int flags;
}
smb_messages[256] = {
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;
/****************************************************************************
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);
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;
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);
*/
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) {
/* 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)
{
/* 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)
{
}
/* 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)
{
/* 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)
/*
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,
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,
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,
/*
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;
/*
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;
/*
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;
/*
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;
/*
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)
{
/*
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;
/*
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;
/* 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;
/*
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)
/*
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;
/*
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;
/*
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 */
/*
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;
/****************************************************************************
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;
/****************************************************************************
Reply to an SMBtrans2
****************************************************************************/
-void reply_trans2(struct request_context *req)
+void reply_trans2(struct smbsrv_request *req)
{
reply_trans_generic(req, SMBtrans2);
}
/****************************************************************************
Reply to an SMBtrans
****************************************************************************/
-void reply_trans(struct request_context *req)
+void reply_trans(struct smbsrv_request *req)
{
reply_trans_generic(req, SMBtrans);
}
/****************************************************************************
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);
}
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 */
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;
}
exit(0);
}
-static int get_id(struct request_context *req)
+static int get_id(struct smbsrv_request *req)
{
return (int)req->smb_ctx->pid;
}
return NULL;
}
-static int get_id(struct request_context *req)
+static int get_id(struct smbsrv_request *req)
{
return (int)pthread_self();
}
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)