summaryrefslogtreecommitdiffstats
path: root/source4/ntvfs
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-03-10 14:31:17 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:56:55 -0500
commit86497db6113c4ec3210d671c3fcf957d1026098c (patch)
treeea7aaa040264907802688b8154873603f4f4635c /source4/ntvfs
parentb86c1b744b48a2b664c9075335eb48098e4462fd (diff)
downloadsamba-86497db6113c4ec3210d671c3fcf957d1026098c.tar.gz
samba-86497db6113c4ec3210d671c3fcf957d1026098c.tar.xz
samba-86497db6113c4ec3210d671c3fcf957d1026098c.zip
r14157: - pass a struct ntvfs_request to the ntvfs layer
(for now we just do #define ntvfs_request smbsrv_request, but it's the first step...) - rename ntvfs_openfile() -> ntvfs_open() - fix the talloc hierachie in some places in the ntvfs_map_*() code metze (This used to be commit ed9ed1f48f602354810937c0b0de850b44322191)
Diffstat (limited to 'source4/ntvfs')
-rw-r--r--source4/ntvfs/cifs/vfs_cifs.c101
-rw-r--r--source4/ntvfs/ipc/ipc_rap.c29
-rw-r--r--source4/ntvfs/ipc/rap_server.c20
-rw-r--r--source4/ntvfs/ipc/vfs_ipc.c79
-rw-r--r--source4/ntvfs/nbench/vfs_nbench.c131
-rw-r--r--source4/ntvfs/ntvfs.h184
-rw-r--r--source4/ntvfs/ntvfs_base.c23
-rw-r--r--source4/ntvfs/ntvfs_generic.c122
-rw-r--r--source4/ntvfs/ntvfs_interface.c373
-rw-r--r--source4/ntvfs/ntvfs_util.c8
-rw-r--r--source4/ntvfs/posix/pvfs_acl.c18
-rw-r--r--source4/ntvfs/posix/pvfs_flush.c2
-rw-r--r--source4/ntvfs/posix/pvfs_fsinfo.c2
-rw-r--r--source4/ntvfs/posix/pvfs_ioctl.c6
-rw-r--r--source4/ntvfs/posix/pvfs_lock.c12
-rw-r--r--source4/ntvfs/posix/pvfs_mkdir.c6
-rw-r--r--source4/ntvfs/posix/pvfs_open.c36
-rw-r--r--source4/ntvfs/posix/pvfs_qfileinfo.c6
-rw-r--r--source4/ntvfs/posix/pvfs_read.c4
-rw-r--r--source4/ntvfs/posix/pvfs_rename.c10
-rw-r--r--source4/ntvfs/posix/pvfs_search.c10
-rw-r--r--source4/ntvfs/posix/pvfs_seek.c2
-rw-r--r--source4/ntvfs/posix/pvfs_setfileinfo.c6
-rw-r--r--source4/ntvfs/posix/pvfs_unlink.c6
-rw-r--r--source4/ntvfs/posix/pvfs_wait.c14
-rw-r--r--source4/ntvfs/posix/pvfs_write.c4
-rw-r--r--source4/ntvfs/posix/vfs_posix.c15
-rw-r--r--source4/ntvfs/posix/vfs_posix.h10
-rw-r--r--source4/ntvfs/print/vfs_print.c9
-rw-r--r--source4/ntvfs/simple/svfs_util.c6
-rw-r--r--source4/ntvfs/simple/vfs_simple.c79
-rw-r--r--source4/ntvfs/unixuid/vfs_unixuid.c73
32 files changed, 726 insertions, 680 deletions
diff --git a/source4/ntvfs/cifs/vfs_cifs.c b/source4/ntvfs/cifs/vfs_cifs.c
index 5bac39f3a77..f6a8da14e71 100644
--- a/source4/ntvfs/cifs/vfs_cifs.c
+++ b/source4/ntvfs/cifs/vfs_cifs.c
@@ -48,7 +48,7 @@ struct cvfs_private {
struct async_info {
struct async_info *next, *prev;
struct cvfs_private *cvfs;
- struct smbsrv_request *req;
+ struct ntvfs_request *req;
struct smbcli_request *c_req;
void *parms;
};
@@ -71,7 +71,7 @@ static BOOL oplock_handler(struct smbcli_transport *transport, uint16_t tid, uin
connect to a share - used when a tree_connect operation comes in.
*/
static NTSTATUS cvfs_connect(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, const char *sharename)
+ struct ntvfs_request *req, const char *sharename)
{
struct smbsrv_tcon *tcon = req->tcon;
NTSTATUS status;
@@ -176,8 +176,7 @@ static NTSTATUS cvfs_connect(struct ntvfs_module_context *ntvfs,
/*
disconnect from a share
*/
-static NTSTATUS cvfs_disconnect(struct ntvfs_module_context *ntvfs,
- struct smbsrv_tcon *tcon)
+static NTSTATUS cvfs_disconnect(struct ntvfs_module_context *ntvfs)
{
struct cvfs_private *private = ntvfs->private_data;
@@ -205,7 +204,7 @@ static int async_info_destructor(void *p)
static void async_simple(struct smbcli_request *c_req)
{
struct async_info *async = c_req->async.private;
- struct smbsrv_request *req = async->req;
+ struct ntvfs_request *req = async->req;
req->async_states->status = smbcli_request_simple_recv(c_req);
req->async_states->send_fn(req);
}
@@ -238,7 +237,7 @@ static void async_simple(struct smbcli_request *c_req)
The name can contain CIFS wildcards, but rarely does (except with OS/2 clients)
*/
static NTSTATUS cvfs_unlink(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_unlink *unl)
+ struct ntvfs_request *req, struct smb_unlink *unl)
{
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
@@ -262,7 +261,7 @@ static NTSTATUS cvfs_unlink(struct ntvfs_module_context *ntvfs,
static void async_ioctl(struct smbcli_request *c_req)
{
struct async_info *async = c_req->async.private;
- struct smbsrv_request *req = async->req;
+ struct ntvfs_request *req = async->req;
req->async_states->status = smb_raw_ioctl_recv(c_req, req, async->parms);
req->async_states->send_fn(req);
}
@@ -271,7 +270,7 @@ static void async_ioctl(struct smbcli_request *c_req)
ioctl interface
*/
static NTSTATUS cvfs_ioctl(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_ioctl *io)
+ struct ntvfs_request *req, union smb_ioctl *io)
{
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
@@ -293,7 +292,7 @@ static NTSTATUS cvfs_ioctl(struct ntvfs_module_context *ntvfs,
check if a directory exists
*/
static NTSTATUS cvfs_chkpath(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_chkpath *cp)
+ struct ntvfs_request *req, struct smb_chkpath *cp)
{
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
@@ -315,7 +314,7 @@ static NTSTATUS cvfs_chkpath(struct ntvfs_module_context *ntvfs,
static void async_qpathinfo(struct smbcli_request *c_req)
{
struct async_info *async = c_req->async.private;
- struct smbsrv_request *req = async->req;
+ struct ntvfs_request *req = async->req;
req->async_states->status = smb_raw_pathinfo_recv(c_req, req, async->parms);
req->async_states->send_fn(req);
}
@@ -324,7 +323,7 @@ static void async_qpathinfo(struct smbcli_request *c_req)
return info on a pathname
*/
static NTSTATUS cvfs_qpathinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_fileinfo *info)
+ struct ntvfs_request *req, union smb_fileinfo *info)
{
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
@@ -346,7 +345,7 @@ static NTSTATUS cvfs_qpathinfo(struct ntvfs_module_context *ntvfs,
static void async_qfileinfo(struct smbcli_request *c_req)
{
struct async_info *async = c_req->async.private;
- struct smbsrv_request *req = async->req;
+ struct ntvfs_request *req = async->req;
req->async_states->status = smb_raw_fileinfo_recv(c_req, req, async->parms);
req->async_states->send_fn(req);
}
@@ -355,7 +354,7 @@ static void async_qfileinfo(struct smbcli_request *c_req)
query info on a open file
*/
static NTSTATUS cvfs_qfileinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_fileinfo *info)
+ struct ntvfs_request *req, union smb_fileinfo *info)
{
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
@@ -376,7 +375,7 @@ static NTSTATUS cvfs_qfileinfo(struct ntvfs_module_context *ntvfs,
set info on a pathname
*/
static NTSTATUS cvfs_setpathinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_setfileinfo *st)
+ struct ntvfs_request *req, union smb_setfileinfo *st)
{
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
@@ -399,7 +398,7 @@ static NTSTATUS cvfs_setpathinfo(struct ntvfs_module_context *ntvfs,
static void async_open(struct smbcli_request *c_req)
{
struct async_info *async = c_req->async.private;
- struct smbsrv_request *req = async->req;
+ struct ntvfs_request *req = async->req;
req->async_states->status = smb_raw_open_recv(c_req, req, async->parms);
req->async_states->send_fn(req);
}
@@ -408,7 +407,7 @@ static void async_open(struct smbcli_request *c_req)
open a file
*/
static NTSTATUS cvfs_open(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_open *io)
+ struct ntvfs_request *req, union smb_open *io)
{
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
@@ -417,7 +416,7 @@ static NTSTATUS cvfs_open(struct ntvfs_module_context *ntvfs,
if (io->generic.level != RAW_OPEN_GENERIC &&
private->map_generic) {
- return ntvfs_map_open(req, io, ntvfs);
+ return ntvfs_map_open(ntvfs, req, io);
}
if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
@@ -433,7 +432,7 @@ static NTSTATUS cvfs_open(struct ntvfs_module_context *ntvfs,
create a directory
*/
static NTSTATUS cvfs_mkdir(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_mkdir *md)
+ struct ntvfs_request *req, union smb_mkdir *md)
{
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
@@ -453,7 +452,7 @@ static NTSTATUS cvfs_mkdir(struct ntvfs_module_context *ntvfs,
remove a directory
*/
static NTSTATUS cvfs_rmdir(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_rmdir *rd)
+ struct ntvfs_request *req, struct smb_rmdir *rd)
{
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
@@ -472,7 +471,7 @@ static NTSTATUS cvfs_rmdir(struct ntvfs_module_context *ntvfs,
rename a set of files
*/
static NTSTATUS cvfs_rename(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_rename *ren)
+ struct ntvfs_request *req, union smb_rename *ren)
{
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
@@ -492,7 +491,7 @@ static NTSTATUS cvfs_rename(struct ntvfs_module_context *ntvfs,
copy a set of files
*/
static NTSTATUS cvfs_copy(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_copy *cp)
+ struct ntvfs_request *req, struct smb_copy *cp)
{
return NT_STATUS_NOT_SUPPORTED;
}
@@ -503,7 +502,7 @@ static NTSTATUS cvfs_copy(struct ntvfs_module_context *ntvfs,
static void async_read(struct smbcli_request *c_req)
{
struct async_info *async = c_req->async.private;
- struct smbsrv_request *req = async->req;
+ struct ntvfs_request *req = async->req;
req->async_states->status = smb_raw_read_recv(c_req, async->parms);
req->async_states->send_fn(req);
}
@@ -512,7 +511,7 @@ static void async_read(struct smbcli_request *c_req)
read from a file
*/
static NTSTATUS cvfs_read(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_read *rd)
+ struct ntvfs_request *req, union smb_read *rd)
{
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
@@ -521,7 +520,7 @@ static NTSTATUS cvfs_read(struct ntvfs_module_context *ntvfs,
if (rd->generic.level != RAW_READ_GENERIC &&
private->map_generic) {
- return ntvfs_map_read(req, rd, ntvfs);
+ return ntvfs_map_read(ntvfs, req, rd);
}
if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
@@ -539,7 +538,7 @@ static NTSTATUS cvfs_read(struct ntvfs_module_context *ntvfs,
static void async_write(struct smbcli_request *c_req)
{
struct async_info *async = c_req->async.private;
- struct smbsrv_request *req = async->req;
+ struct ntvfs_request *req = async->req;
req->async_states->status = smb_raw_write_recv(c_req, async->parms);
req->async_states->send_fn(req);
}
@@ -548,7 +547,7 @@ static void async_write(struct smbcli_request *c_req)
write to a file
*/
static NTSTATUS cvfs_write(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_write *wr)
+ struct ntvfs_request *req, union smb_write *wr)
{
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
@@ -557,7 +556,7 @@ static NTSTATUS cvfs_write(struct ntvfs_module_context *ntvfs,
if (wr->generic.level != RAW_WRITE_GENERIC &&
private->map_generic) {
- return ntvfs_map_write(req, wr, ntvfs);
+ return ntvfs_map_write(ntvfs, req, wr);
}
if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
@@ -575,7 +574,7 @@ static NTSTATUS cvfs_write(struct ntvfs_module_context *ntvfs,
static void async_seek(struct smbcli_request *c_req)
{
struct async_info *async = c_req->async.private;
- struct smbsrv_request *req = async->req;
+ struct ntvfs_request *req = async->req;
req->async_states->status = smb_raw_seek_recv(c_req, async->parms);
req->async_states->send_fn(req);
}
@@ -584,7 +583,7 @@ static void async_seek(struct smbcli_request *c_req)
seek in a file
*/
static NTSTATUS cvfs_seek(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_seek *io)
+ struct ntvfs_request *req, struct smb_seek *io)
{
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
@@ -604,7 +603,7 @@ static NTSTATUS cvfs_seek(struct ntvfs_module_context *ntvfs,
flush a file
*/
static NTSTATUS cvfs_flush(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_flush *io)
+ struct ntvfs_request *req, struct smb_flush *io)
{
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
@@ -624,7 +623,7 @@ static NTSTATUS cvfs_flush(struct ntvfs_module_context *ntvfs,
close a file
*/
static NTSTATUS cvfs_close(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_close *io)
+ struct ntvfs_request *req, union smb_close *io)
{
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
@@ -633,7 +632,7 @@ static NTSTATUS cvfs_close(struct ntvfs_module_context *ntvfs,
if (io->generic.level != RAW_CLOSE_GENERIC &&
private->map_generic) {
- return ntvfs_map_close(req, io, ntvfs);
+ return ntvfs_map_close(ntvfs, req, io);
}
if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
@@ -649,7 +648,7 @@ static NTSTATUS cvfs_close(struct ntvfs_module_context *ntvfs,
exit - closing files open by the pid
*/
static NTSTATUS cvfs_exit(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req)
+ struct ntvfs_request *req)
{
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
@@ -669,7 +668,7 @@ static NTSTATUS cvfs_exit(struct ntvfs_module_context *ntvfs,
logoff - closing files open by the user
*/
static NTSTATUS cvfs_logoff(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req)
+ struct ntvfs_request *req)
{
/* we can't do this right in the cifs backend .... */
return NT_STATUS_OK;
@@ -679,7 +678,7 @@ static NTSTATUS cvfs_logoff(struct ntvfs_module_context *ntvfs,
setup for an async call - nothing to do yet
*/
static NTSTATUS cvfs_async_setup(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
void *private)
{
return NT_STATUS_OK;
@@ -689,7 +688,7 @@ static NTSTATUS cvfs_async_setup(struct ntvfs_module_context *ntvfs,
cancel an async call
*/
static NTSTATUS cvfs_cancel(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req)
+ struct ntvfs_request *req)
{
struct cvfs_private *private = ntvfs->private_data;
@@ -712,7 +711,7 @@ static NTSTATUS cvfs_cancel(struct ntvfs_module_context *ntvfs,
lock a byte range
*/
static NTSTATUS cvfs_lock(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_lock *lck)
+ struct ntvfs_request *req, union smb_lock *lck)
{
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
@@ -721,7 +720,7 @@ static NTSTATUS cvfs_lock(struct ntvfs_module_context *ntvfs,
if (lck->generic.level != RAW_LOCK_GENERIC &&
private->map_generic) {
- return ntvfs_map_lock(req, lck, ntvfs);
+ return ntvfs_map_lock(ntvfs, req, lck);
}
if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
@@ -736,7 +735,7 @@ static NTSTATUS cvfs_lock(struct ntvfs_module_context *ntvfs,
set info on a open file
*/
static NTSTATUS cvfs_setfileinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
union smb_setfileinfo *info)
{
struct cvfs_private *private = ntvfs->private_data;
@@ -759,7 +758,7 @@ static NTSTATUS cvfs_setfileinfo(struct ntvfs_module_context *ntvfs,
static void async_fsinfo(struct smbcli_request *c_req)
{
struct async_info *async = c_req->async.private;
- struct smbsrv_request *req = async->req;
+ struct ntvfs_request *req = async->req;
req->async_states->status = smb_raw_fsinfo_recv(c_req, req, async->parms);
req->async_states->send_fn(req);
}
@@ -768,7 +767,7 @@ static void async_fsinfo(struct smbcli_request *c_req)
return filesystem space info
*/
static NTSTATUS cvfs_fsinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_fsinfo *fs)
+ struct ntvfs_request *req, union smb_fsinfo *fs)
{
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
@@ -788,7 +787,7 @@ static NTSTATUS cvfs_fsinfo(struct ntvfs_module_context *ntvfs,
return print queue info
*/
static NTSTATUS cvfs_lpq(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_lpq *lpq)
+ struct ntvfs_request *req, union smb_lpq *lpq)
{
return NT_STATUS_NOT_SUPPORTED;
}
@@ -797,7 +796,7 @@ static NTSTATUS cvfs_lpq(struct ntvfs_module_context *ntvfs,
list files in a directory matching a wildcard pattern
*/
static NTSTATUS cvfs_search_first(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_search_first *io,
+ struct ntvfs_request *req, union smb_search_first *io,
void *search_private,
BOOL (*callback)(void *, union smb_search_data *))
{
@@ -810,7 +809,7 @@ static NTSTATUS cvfs_search_first(struct ntvfs_module_context *ntvfs,
/* continue a search */
static NTSTATUS cvfs_search_next(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_search_next *io,
+ struct ntvfs_request *req, union smb_search_next *io,
void *search_private,
BOOL (*callback)(void *, union smb_search_data *))
{
@@ -823,7 +822,7 @@ static NTSTATUS cvfs_search_next(struct ntvfs_module_context *ntvfs,
/* close a search */
static NTSTATUS cvfs_search_close(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_search_close *io)
+ struct ntvfs_request *req, union smb_search_close *io)
{
struct cvfs_private *private = ntvfs->private_data;
@@ -838,14 +837,14 @@ static NTSTATUS cvfs_search_close(struct ntvfs_module_context *ntvfs,
static void async_trans2(struct smbcli_request *c_req)
{
struct async_info *async = c_req->async.private;
- struct smbsrv_request *req = async->req;
+ struct ntvfs_request *req = async->req;
req->async_states->status = smb_raw_trans2_recv(c_req, req, async->parms);
req->async_states->send_fn(req);
}
/* raw trans2 */
static NTSTATUS cvfs_trans2(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_trans2 *trans2)
+ struct ntvfs_request *req, struct smb_trans2 *trans2)
{
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
@@ -864,7 +863,7 @@ static NTSTATUS cvfs_trans2(struct ntvfs_module_context *ntvfs,
/* SMBtrans - not used on file shares */
static NTSTATUS cvfs_trans(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_trans2 *trans2)
+ struct ntvfs_request *req, struct smb_trans2 *trans2)
{
return NT_STATUS_ACCESS_DENIED;
}
@@ -875,14 +874,14 @@ static NTSTATUS cvfs_trans(struct ntvfs_module_context *ntvfs,
static void async_changenotify(struct smbcli_request *c_req)
{
struct async_info *async = c_req->async.private;
- struct smbsrv_request *req = async->req;
+ struct ntvfs_request *req = async->req;
req->async_states->status = smb_raw_changenotify_recv(c_req, req, async->parms);
req->async_states->send_fn(req);
}
/* change notify request - always async */
static NTSTATUS cvfs_notify(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_notify *info)
+ struct ntvfs_request *req, struct smb_notify *info)
{
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
@@ -920,7 +919,7 @@ NTSTATUS ntvfs_cifs_init(void)
ops.chkpath = cvfs_chkpath;
ops.qpathinfo = cvfs_qpathinfo;
ops.setpathinfo = cvfs_setpathinfo;
- ops.openfile = cvfs_open;
+ ops.open = cvfs_open;
ops.mkdir = cvfs_mkdir;
ops.rmdir = cvfs_rmdir;
ops.rename = cvfs_rename;
diff --git a/source4/ntvfs/ipc/ipc_rap.c b/source4/ntvfs/ipc/ipc_rap.c
index 5656a966212..bc9bc6f31e5 100644
--- a/source4/ntvfs/ipc/ipc_rap.c
+++ b/source4/ntvfs/ipc/ipc_rap.c
@@ -201,8 +201,7 @@ static NTSTATUS rap_push_string(struct ndr_push *data_push,
goto done; \
} while (0)
-static NTSTATUS _rap_netshareenum(struct smbsrv_request *req,
- struct rap_call *call)
+static NTSTATUS _rap_netshareenum(struct rap_call *call)
{
struct rap_NetShareEnum r;
NTSTATUS result;
@@ -225,7 +224,7 @@ static NTSTATUS _rap_netshareenum(struct smbsrv_request *req,
break;
}
- result = rap_netshareenum(req, &r);
+ result = rap_netshareenum(call, &r);
if (!NT_STATUS_IS_OK(result))
return result;
@@ -282,8 +281,7 @@ static NTSTATUS _rap_netshareenum(struct smbsrv_request *req,
return result;
}
-static NTSTATUS _rap_netserverenum2(struct smbsrv_request *req,
- struct rap_call *call)
+static NTSTATUS _rap_netserverenum2(struct rap_call *call)
{
struct rap_NetServerEnum2 r;
NTSTATUS result;
@@ -308,7 +306,7 @@ static NTSTATUS _rap_netserverenum2(struct smbsrv_request *req,
break;
}
- result = rap_netserverenum2(req, &r);
+ result = rap_netserverenum2(call, &r);
if (!NT_STATUS_IS_OK(result))
return result;
@@ -367,8 +365,7 @@ static NTSTATUS _rap_netserverenum2(struct smbsrv_request *req,
return result;
}
-static NTSTATUS api_Unsupported(struct smbsrv_request *req,
- struct rap_call *call)
+static NTSTATUS api_Unsupported(struct rap_call *call)
{
call->status = NERR_notsupported;
call->convert = 0;
@@ -379,14 +376,14 @@ static const struct
{
const char *name;
int id;
- NTSTATUS (*fn)(struct smbsrv_request *req, struct rap_call *call);
+ NTSTATUS (*fn)(struct rap_call *call);
} api_commands[] = {
{"NetShareEnum", RAP_WshareEnum, _rap_netshareenum },
{"NetServerEnum2", RAP_NetServerEnum2, _rap_netserverenum2 },
{NULL, -1, api_Unsupported}
};
-NTSTATUS ipc_rap_call(struct smbsrv_request *req, struct smb_trans2 *trans)
+NTSTATUS ipc_rap_call(TALLOC_CTX *mem_ctx, struct smb_trans2 *trans)
{
int i;
NTSTATUS result;
@@ -395,7 +392,7 @@ NTSTATUS ipc_rap_call(struct smbsrv_request *req, struct smb_trans2 *trans)
struct ndr_push *final_param;
struct ndr_push *final_data;
- call = new_rap_srv_call(req, trans);
+ call = new_rap_srv_call(mem_ctx, trans);
if (call == NULL)
return NT_STATUS_NO_MEMORY;
@@ -406,8 +403,8 @@ NTSTATUS ipc_rap_call(struct smbsrv_request *req, struct smb_trans2 *trans)
NDR_CHECK(ndr_pull_string(call->ndr_pull_param, NDR_SCALARS,
&call->datadesc));
- call->ndr_push_param = ndr_push_init_ctx(req);
- call->ndr_push_data = ndr_push_init_ctx(req);
+ call->ndr_push_param = ndr_push_init_ctx(call);
+ call->ndr_push_data = ndr_push_init_ctx(call);
if ((call->ndr_push_param == NULL) || (call->ndr_push_data == NULL))
return NT_STATUS_NO_MEMORY;
@@ -421,7 +418,7 @@ NTSTATUS ipc_rap_call(struct smbsrv_request *req, struct smb_trans2 *trans)
if (api_commands[i].id == call->callno) {
DEBUG(5, ("Running RAP call %s\n",
api_commands[i].name));
- result = api_commands[i].fn(req, call);
+ result = api_commands[i].fn(call);
break;
}
}
@@ -432,8 +429,8 @@ NTSTATUS ipc_rap_call(struct smbsrv_request *req, struct smb_trans2 *trans)
result_param = ndr_push_blob(call->ndr_push_param);
result_data = ndr_push_blob(call->ndr_push_data);
- final_param = ndr_push_init_ctx(req);
- final_data = ndr_push_init_ctx(req);
+ final_param = ndr_push_init_ctx(call);
+ final_data = ndr_push_init_ctx(call);
if ((final_param == NULL) || (final_data == NULL))
return NT_STATUS_NO_MEMORY;
diff --git a/source4/ntvfs/ipc/rap_server.c b/source4/ntvfs/ipc/rap_server.c
index 9fa831dd4f1..a5939996932 100644
--- a/source4/ntvfs/ipc/rap_server.c
+++ b/source4/ntvfs/ipc/rap_server.c
@@ -27,30 +27,30 @@
/* At this moment these are just dummy functions, but you might get the
* idea. */
-NTSTATUS rap_netshareenum(struct smbsrv_request *req,
+NTSTATUS rap_netshareenum(TALLOC_CTX *mem_ctx,
struct rap_NetShareEnum *r)
{
int i;
r->out.status = 0;
- r->out.available = dcesrv_common_get_count_of_shares(req, NULL);
- r->out.info = talloc_array(req,
- union rap_shareenum_info, r->out.available);
+ r->out.available = dcesrv_common_get_count_of_shares(mem_ctx, NULL);
+ r->out.info = talloc_array(mem_ctx,
+ union rap_shareenum_info, r->out.available);
for (i=0;i<r->out.available;i++) {
strncpy(r->out.info[i].info1.name,
- dcesrv_common_get_share_name(req, NULL, i),
+ dcesrv_common_get_share_name(mem_ctx, NULL, i),
sizeof(r->out.info[0].info1.name));
r->out.info[i].info1.pad = 0;
- r->out.info[i].info1.type = dcesrv_common_get_share_type(req, NULL, i);
- r->out.info[i].info1.comment = talloc_strdup(req,
- dcesrv_common_get_share_comment(req, NULL, i));
+ r->out.info[i].info1.type = dcesrv_common_get_share_type(mem_ctx, NULL, i);
+ r->out.info[i].info1.comment = talloc_strdup(mem_ctx,
+ dcesrv_common_get_share_comment(mem_ctx, NULL, i));
}
return NT_STATUS_OK;
}
-NTSTATUS rap_netserverenum2(struct smbsrv_request *req,
- struct rap_NetServerEnum2 *r)
+NTSTATUS rap_netserverenum2(TALLOC_CTX *mem_ctx,
+ struct rap_NetServerEnum2 *r)
{
r->out.status = 0;
r->out.available = 0;
diff --git a/source4/ntvfs/ipc/vfs_ipc.c b/source4/ntvfs/ipc/vfs_ipc.c
index ea4955d84e1..36f0c9b82ca 100644
--- a/source4/ntvfs/ipc/vfs_ipc.c
+++ b/source4/ntvfs/ipc/vfs_ipc.c
@@ -75,7 +75,7 @@ static struct pipe_state *pipe_state_find(struct ipc_private *private, uint16_t
connect to a share - always works
*/
static NTSTATUS ipc_connect(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, const char *sharename)
+ struct ntvfs_request *req, const char *sharename)
{
NTSTATUS status;
struct smbsrv_tcon *tcon = req->tcon;
@@ -108,8 +108,7 @@ static NTSTATUS ipc_connect(struct ntvfs_module_context *ntvfs,
/*
disconnect from a share
*/
-static NTSTATUS ipc_disconnect(struct ntvfs_module_context *ntvfs,
- struct smbsrv_tcon *tcon)
+static NTSTATUS ipc_disconnect(struct ntvfs_module_context *ntvfs)
{
return NT_STATUS_OK;
}
@@ -118,7 +117,7 @@ static NTSTATUS ipc_disconnect(struct ntvfs_module_context *ntvfs,
delete a file
*/
static NTSTATUS ipc_unlink(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_unlink *unl)
+ struct ntvfs_request *req, struct smb_unlink *unl)
{
return NT_STATUS_ACCESS_DENIED;
}
@@ -128,7 +127,7 @@ static NTSTATUS ipc_unlink(struct ntvfs_module_context *ntvfs,
ioctl interface - we don't do any
*/
static NTSTATUS ipc_ioctl(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_ioctl *io)
+ struct ntvfs_request *req, union smb_ioctl *io)
{
return NT_STATUS_ACCESS_DENIED;
}
@@ -137,7 +136,7 @@ static NTSTATUS ipc_ioctl(struct ntvfs_module_context *ntvfs,
check if a directory exists
*/
static NTSTATUS ipc_chkpath(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_chkpath *cp)
+ struct ntvfs_request *req, struct smb_chkpath *cp)
{
return NT_STATUS_ACCESS_DENIED;
}
@@ -146,7 +145,7 @@ static NTSTATUS ipc_chkpath(struct ntvfs_module_context *ntvfs,
return info on a pathname
*/
static NTSTATUS ipc_qpathinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_fileinfo *info)
+ struct ntvfs_request *req, union smb_fileinfo *info)
{
return NT_STATUS_ACCESS_DENIED;
}
@@ -155,7 +154,7 @@ static NTSTATUS ipc_qpathinfo(struct ntvfs_module_context *ntvfs,
set info on a pathname
*/
static NTSTATUS ipc_setpathinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_setfileinfo *st)
+ struct ntvfs_request *req, union smb_setfileinfo *st)
{
return NT_STATUS_ACCESS_DENIED;
}
@@ -177,7 +176,7 @@ static int ipc_fd_destructor(void *ptr)
open a file backend - used for MSRPC pipes
*/
static NTSTATUS ipc_open_generic(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, const char *fname,
+ struct ntvfs_request *req, const char *fname,
struct pipe_state **ps)
{
struct pipe_state *p;
@@ -253,7 +252,7 @@ static NTSTATUS ipc_open_generic(struct ntvfs_module_context *ntvfs,
open a file with ntcreatex - used for MSRPC pipes
*/
static NTSTATUS ipc_open_ntcreatex(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_open *oi)
+ struct ntvfs_request *req, union smb_open *oi)
{
struct pipe_state *p;
NTSTATUS status;
@@ -275,7 +274,7 @@ static NTSTATUS ipc_open_ntcreatex(struct ntvfs_module_context *ntvfs,
open a file with openx - used for MSRPC pipes
*/
static NTSTATUS ipc_open_openx(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_open *oi)
+ struct ntvfs_request *req, union smb_open *oi)
{
struct pipe_state *p;
NTSTATUS status;
@@ -298,7 +297,7 @@ static NTSTATUS ipc_open_openx(struct ntvfs_module_context *ntvfs,
open a file - used for MSRPC pipes
*/
static NTSTATUS ipc_open(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_open *oi)
+ struct ntvfs_request *req, union smb_open *oi)
{
NTSTATUS status;
@@ -321,7 +320,7 @@ static NTSTATUS ipc_open(struct ntvfs_module_context *ntvfs,
create a directory
*/
static NTSTATUS ipc_mkdir(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_mkdir *md)
+ struct ntvfs_request *req, union smb_mkdir *md)
{
return NT_STATUS_ACCESS_DENIED;
}
@@ -330,7 +329,7 @@ static NTSTATUS ipc_mkdir(struct ntvfs_module_context *ntvfs,
remove a directory
*/
static NTSTATUS ipc_rmdir(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_rmdir *rd)
+ struct ntvfs_request *req, struct smb_rmdir *rd)
{
return NT_STATUS_ACCESS_DENIED;
}
@@ -339,7 +338,7 @@ static NTSTATUS ipc_rmdir(struct ntvfs_module_context *ntvfs,
rename a set of files
*/
static NTSTATUS ipc_rename(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_rename *ren)
+ struct ntvfs_request *req, union smb_rename *ren)
{
return NT_STATUS_ACCESS_DENIED;
}
@@ -348,7 +347,7 @@ static NTSTATUS ipc_rename(struct ntvfs_module_context *ntvfs,
copy a set of files
*/
static NTSTATUS ipc_copy(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_copy *cp)
+ struct ntvfs_request *req, struct smb_copy *cp)
{
return NT_STATUS_ACCESS_DENIED;
}
@@ -369,7 +368,7 @@ static NTSTATUS ipc_readx_dcesrv_output(void *private_data, DATA_BLOB *out, size
read from a file
*/
static NTSTATUS ipc_read(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_read *rd)
+ struct ntvfs_request *req, union smb_read *rd)
{
struct ipc_private *private = ntvfs->private_data;
DATA_BLOB data;
@@ -378,7 +377,7 @@ static NTSTATUS ipc_read(struct ntvfs_module_context *ntvfs,
NTSTATUS status = NT_STATUS_OK;
if (rd->generic.level != RAW_READ_GENERIC) {
- return ntvfs_map_read(req, rd, ntvfs);
+ return ntvfs_map_read(ntvfs, req, rd);
}
fnum = rd->readx.in.fnum;
@@ -412,7 +411,7 @@ static NTSTATUS ipc_read(struct ntvfs_module_context *ntvfs,
write to a file
*/
static NTSTATUS ipc_write(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_write *wr)
+ struct ntvfs_request *req, union smb_write *wr)
{
struct ipc_private *private = ntvfs->private_data;
DATA_BLOB data;
@@ -421,7 +420,7 @@ static NTSTATUS ipc_write(struct ntvfs_module_context *ntvfs,
NTSTATUS status;
if (wr->generic.level != RAW_WRITE_GENERIC) {
- return ntvfs_map_write(req, wr, ntvfs);
+ return ntvfs_map_write(ntvfs, req, wr);
}
fnum = wr->writex.in.fnum;
@@ -448,7 +447,7 @@ static NTSTATUS ipc_write(struct ntvfs_module_context *ntvfs,
seek in a file
*/
static NTSTATUS ipc_seek(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_seek *io)
+ struct ntvfs_request *req, struct smb_seek *io)
{
return NT_STATUS_ACCESS_DENIED;
}
@@ -457,7 +456,7 @@ static NTSTATUS ipc_seek(struct ntvfs_module_context *ntvfs,
flush a file
*/
static NTSTATUS ipc_flush(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_flush *io)
+ struct ntvfs_request *req, struct smb_flush *io)
{
return NT_STATUS_ACCESS_DENIED;
}
@@ -466,13 +465,13 @@ static NTSTATUS ipc_flush(struct ntvfs_module_context *ntvfs,
close a file
*/
static NTSTATUS ipc_close(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_close *io)
+ struct ntvfs_request *req, union smb_close *io)
{
struct ipc_private *private = ntvfs->private_data;
struct pipe_state *p;
if (io->generic.level != RAW_CLOSE_CLOSE) {
- return ntvfs_map_close(req, io, ntvfs);
+ return ntvfs_map_close(ntvfs, req, io);
}
p = pipe_state_find(private, io->close.in.fnum);
@@ -489,7 +488,7 @@ static NTSTATUS ipc_close(struct ntvfs_module_context *ntvfs,
exit - closing files
*/
static NTSTATUS ipc_exit(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req)
+ struct ntvfs_request *req)
{
struct ipc_private *private = ntvfs->private_data;
struct pipe_state *p, *next;
@@ -508,7 +507,7 @@ static NTSTATUS ipc_exit(struct ntvfs_module_context *ntvfs,
logoff - closing files open by the user
*/
static NTSTATUS ipc_logoff(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req)
+ struct ntvfs_request *req)
{
struct ipc_private *private = ntvfs->private_data;
struct pipe_state *p, *next;
@@ -527,7 +526,7 @@ static NTSTATUS ipc_logoff(struct ntvfs_module_context *ntvfs,
setup for an async call
*/
static NTSTATUS ipc_async_setup(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
void *private)
{
return NT_STATUS_OK;
@@ -537,7 +536,7 @@ static NTSTATUS ipc_async_setup(struct ntvfs_module_context *ntvfs,
cancel an async call
*/
static NTSTATUS ipc_cancel(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req)
+ struct ntvfs_request *req)
{
return NT_STATUS_UNSUCCESSFUL;
}
@@ -546,7 +545,7 @@ static NTSTATUS ipc_cancel(struct ntvfs_module_context *ntvfs,
lock a byte range
*/
static NTSTATUS ipc_lock(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_lock *lck)
+ struct ntvfs_request *req, union smb_lock *lck)
{
return NT_STATUS_ACCESS_DENIED;
}
@@ -555,7 +554,7 @@ static NTSTATUS ipc_lock(struct ntvfs_module_context *ntvfs,
set info on a open file
*/
static NTSTATUS ipc_setfileinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_setfileinfo *info)
+ struct ntvfs_request *req, union smb_setfileinfo *info)
{
return NT_STATUS_ACCESS_DENIED;
}
@@ -564,7 +563,7 @@ static NTSTATUS ipc_setfileinfo(struct ntvfs_module_context *ntvfs,
query info on a open file
*/
static NTSTATUS ipc_qfileinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_fileinfo *info)
+ struct ntvfs_request *req, union smb_fileinfo *info)
{
return NT_STATUS_ACCESS_DENIED;
}
@@ -574,7 +573,7 @@ static NTSTATUS ipc_qfileinfo(struct ntvfs_module_context *ntvfs,
return filesystem info
*/
static NTSTATUS ipc_fsinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_fsinfo *fs)
+ struct ntvfs_request *req, union smb_fsinfo *fs)
{
return NT_STATUS_ACCESS_DENIED;
}
@@ -583,7 +582,7 @@ static NTSTATUS ipc_fsinfo(struct ntvfs_module_context *ntvfs,
return print queue info
*/
static NTSTATUS ipc_lpq(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_lpq *lpq)
+ struct ntvfs_request *req, union smb_lpq *lpq)
{
return NT_STATUS_ACCESS_DENIED;
}
@@ -592,7 +591,7 @@ static NTSTATUS ipc_lpq(struct ntvfs_module_context *ntvfs,
list files in a directory matching a wildcard pattern
*/
static NTSTATUS ipc_search_first(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_search_first *io,
+ struct ntvfs_request *req, union smb_search_first *io,
void *search_private,
BOOL (*callback)(void *, union smb_search_data *))
{
@@ -603,7 +602,7 @@ static NTSTATUS ipc_search_first(struct ntvfs_module_context *ntvfs,
continue listing files in a directory
*/
static NTSTATUS ipc_search_next(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_search_next *io,
+ struct ntvfs_request *req, union smb_search_next *io,
void *search_private,
BOOL (*callback)(void *, union smb_search_data *))
{
@@ -614,7 +613,7 @@ static NTSTATUS ipc_search_next(struct ntvfs_module_context *ntvfs,
end listing files in a directory
*/
static NTSTATUS ipc_search_close(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_search_close *io)
+ struct ntvfs_request *req, union smb_search_close *io)
{
return NT_STATUS_ACCESS_DENIED;
}
@@ -638,7 +637,7 @@ static NTSTATUS ipc_trans_dcesrv_output(void *private_data, DATA_BLOB *out, size
/* SMBtrans - handle a DCERPC command */
static NTSTATUS ipc_dcerpc_cmd(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_trans2 *trans)
+ struct ntvfs_request *req, struct smb_trans2 *trans)
{
struct pipe_state *p;
struct ipc_private *private = ntvfs->private_data;
@@ -684,7 +683,7 @@ static NTSTATUS ipc_dcerpc_cmd(struct ntvfs_module_context *ntvfs,
/* SMBtrans - set named pipe state */
static NTSTATUS ipc_set_nm_pipe_state(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_trans2 *trans)
+ struct ntvfs_request *req, struct smb_trans2 *trans)
{
struct ipc_private *private = ntvfs->private_data;
struct pipe_state *p;
@@ -711,7 +710,7 @@ static NTSTATUS ipc_set_nm_pipe_state(struct ntvfs_module_context *ntvfs,
/* SMBtrans - used to provide access to SMB pipes */
static NTSTATUS ipc_trans(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_trans2 *trans)
+ struct ntvfs_request *req, struct smb_trans2 *trans)
{
NTSTATUS status;
@@ -760,7 +759,7 @@ NTSTATUS ntvfs_ipc_init(void)
ops.chkpath = ipc_chkpath;
ops.qpathinfo = ipc_qpathinfo;
ops.setpathinfo = ipc_setpathinfo;
- ops.openfile = ipc_open;
+ ops.open = ipc_open;
ops.mkdir = ipc_mkdir;
ops.rmdir = ipc_rmdir;
ops.rename = ipc_rename;
diff --git a/source4/ntvfs/nbench/vfs_nbench.c b/source4/ntvfs/nbench/vfs_nbench.c
index e88adbafcc6..9647666360c 100644
--- a/source4/ntvfs/nbench/vfs_nbench.c
+++ b/source4/ntvfs/nbench/vfs_nbench.c
@@ -37,10 +37,10 @@ struct nbench_private {
/*
log one request to the nbench log
*/
-static void nbench_log(struct smbsrv_request *req,
+static void nbench_log(struct ntvfs_request *req,
const char *format, ...) PRINTF_ATTRIBUTE(2, 3);
-static void nbench_log(struct smbsrv_request *req,
+static void nbench_log(struct ntvfs_request *req,
const char *format, ...)
{
struct nbench_private *private = req->async_states->ntvfs->private_data;
@@ -63,7 +63,7 @@ static void nbench_log(struct smbsrv_request *req,
status code and any result parameters much harder.
*/
#define PASS_THRU_REQ_PRE_ASYNC(ntvfs, req, op, par1) do { \
- status = ntvfs_async_state_push(req, par1, nbench_##op##_send, ntvfs); \
+ status = ntvfs_async_state_push(ntvfs, req, par1, nbench_##op##_send); \
if (!NT_STATUS_IS_OK(status)) { \
return status; \
} \
@@ -93,7 +93,7 @@ static void nbench_log(struct smbsrv_request *req,
connect to a share - used when a tree_connect operation comes in.
*/
static NTSTATUS nbench_connect(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, const char *sharename)
+ struct ntvfs_request *req, const char *sharename)
{
struct nbench_private *nprivates;
NTSTATUS status;
@@ -123,15 +123,14 @@ static NTSTATUS nbench_connect(struct ntvfs_module_context *ntvfs,
/*
disconnect from a share
*/
-static NTSTATUS nbench_disconnect(struct ntvfs_module_context *ntvfs,
- struct smbsrv_tcon *tcon)
+static NTSTATUS nbench_disconnect(struct ntvfs_module_context *ntvfs)
{
struct nbench_private *nprivates = ntvfs->private_data;
NTSTATUS status;
close(nprivates->log_fd);
- status = ntvfs_next_disconnect(ntvfs, tcon);
+ status = ntvfs_next_disconnect(ntvfs);
return status;
}
@@ -140,7 +139,7 @@ static NTSTATUS nbench_disconnect(struct ntvfs_module_context *ntvfs,
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 void nbench_unlink_send(struct smbsrv_request *req)
+static void nbench_unlink_send(struct ntvfs_request *req)
{
struct smb_unlink *unl = req->async_states->private_data;
@@ -152,7 +151,7 @@ static void nbench_unlink_send(struct smbsrv_request *req)
}
static NTSTATUS nbench_unlink(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_unlink *unl)
+ struct ntvfs_request *req, struct smb_unlink *unl)
{
NTSTATUS status;
@@ -164,7 +163,7 @@ static NTSTATUS nbench_unlink(struct ntvfs_module_context *ntvfs,
/*
ioctl interface
*/
-static void nbench_ioctl_send(struct smbsrv_request *req)
+static void nbench_ioctl_send(struct ntvfs_request *req)
{
nbench_log(req, "Ioctl - NOT HANDLED\n");
@@ -172,7 +171,7 @@ static void nbench_ioctl_send(struct smbsrv_request *req)
}
static NTSTATUS nbench_ioctl(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_ioctl *io)
+ struct ntvfs_request *req, union smb_ioctl *io)
{
NTSTATUS status;
@@ -184,7 +183,7 @@ static NTSTATUS nbench_ioctl(struct ntvfs_module_context *ntvfs,
/*
check if a directory exists
*/
-static void nbench_chkpath_send(struct smbsrv_request *req)
+static void nbench_chkpath_send(struct ntvfs_request *req)
{
struct smb_chkpath *cp = req->async_states->private_data;
@@ -196,7 +195,7 @@ static void nbench_chkpath_send(struct smbsrv_request *req)
}
static NTSTATUS nbench_chkpath(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_chkpath *cp)
+ struct ntvfs_request *req, struct smb_chkpath *cp)
{
NTSTATUS status;
@@ -208,7 +207,7 @@ static NTSTATUS nbench_chkpath(struct ntvfs_module_context *ntvfs,
/*
return info on a pathname
*/
-static void nbench_qpathinfo_send(struct smbsrv_request *req)
+static void nbench_qpathinfo_send(struct ntvfs_request *req)
{
union smb_fileinfo *info = req->async_states->private_data;
@@ -221,7 +220,7 @@ static void nbench_qpathinfo_send(struct smbsrv_request *req)
}
static NTSTATUS nbench_qpathinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_fileinfo *info)
+ struct ntvfs_request *req, union smb_fileinfo *info)
{
NTSTATUS status;
@@ -233,7 +232,7 @@ static NTSTATUS nbench_qpathinfo(struct ntvfs_module_context *ntvfs,
/*
query info on a open file
*/
-static void nbench_qfileinfo_send(struct smbsrv_request *req)
+static void nbench_qfileinfo_send(struct ntvfs_request *req)
{
union smb_fileinfo *info = req->async_states->private_data;
@@ -246,7 +245,7 @@ static void nbench_qfileinfo_send(struct smbsrv_request *req)
}
static NTSTATUS nbench_qfileinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_fileinfo *info)
+ struct ntvfs_request *req, union smb_fileinfo *info)
{
NTSTATUS status;
@@ -258,7 +257,7 @@ static NTSTATUS nbench_qfileinfo(struct ntvfs_module_context *ntvfs,
/*
set info on a pathname
*/
-static void nbench_setpathinfo_send(struct smbsrv_request *req)
+static void nbench_setpathinfo_send(struct ntvfs_request *req)
{
union smb_setfileinfo *st = req->async_states->private_data;
@@ -271,7 +270,7 @@ static void nbench_setpathinfo_send(struct smbsrv_request *req)
}
static NTSTATUS nbench_setpathinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_setfileinfo *st)
+ struct ntvfs_request *req, union smb_setfileinfo *st)
{
NTSTATUS status;
@@ -283,7 +282,7 @@ static NTSTATUS nbench_setpathinfo(struct ntvfs_module_context *ntvfs,
/*
open a file
*/
-static void nbench_openfile_send(struct smbsrv_request *req)
+static void nbench_open_send(struct ntvfs_request *req)
{
union smb_open *io = req->async_states->private_data;
@@ -309,12 +308,12 @@ static void nbench_openfile_send(struct smbsrv_request *req)
PASS_THRU_REP_POST(req);
}
-static NTSTATUS nbench_openfile(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_open *io)
+static NTSTATUS nbench_open(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req, union smb_open *io)
{
NTSTATUS status;
- PASS_THRU_REQ(ntvfs, req, openfile, io, (ntvfs, req, io));
+ PASS_THRU_REQ(ntvfs, req, open, io, (ntvfs, req, io));
return status;
}
@@ -322,7 +321,7 @@ static NTSTATUS nbench_openfile(struct ntvfs_module_context *ntvfs,
/*
create a directory
*/
-static void nbench_mkdir_send(struct smbsrv_request *req)
+static void nbench_mkdir_send(struct ntvfs_request *req)
{
nbench_log(req, "Mkdir - NOT HANDLED\n");
@@ -330,7 +329,7 @@ static void nbench_mkdir_send(struct smbsrv_request *req)
}
static NTSTATUS nbench_mkdir(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_mkdir *md)
+ struct ntvfs_request *req, union smb_mkdir *md)
{
NTSTATUS status;
@@ -342,7 +341,7 @@ static NTSTATUS nbench_mkdir(struct ntvfs_module_context *ntvfs,
/*
remove a directory
*/
-static void nbench_rmdir_send(struct smbsrv_request *req)
+static void nbench_rmdir_send(struct ntvfs_request *req)
{
struct smb_rmdir *rd = req->async_states->private_data;
@@ -354,7 +353,7 @@ static void nbench_rmdir_send(struct smbsrv_request *req)
}
static NTSTATUS nbench_rmdir(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_rmdir *rd)
+ struct ntvfs_request *req, struct smb_rmdir *rd)
{
NTSTATUS status;
@@ -366,7 +365,7 @@ static NTSTATUS nbench_rmdir(struct ntvfs_module_context *ntvfs,
/*
rename a set of files
*/
-static void nbench_rename_send(struct smbsrv_request *req)
+static void nbench_rename_send(struct ntvfs_request *req)
{
union smb_rename *ren = req->async_states->private_data;
@@ -388,7 +387,7 @@ static void nbench_rename_send(struct smbsrv_request *req)
}
static NTSTATUS nbench_rename(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_rename *ren)
+ struct ntvfs_request *req, union smb_rename *ren)
{
NTSTATUS status;
@@ -400,7 +399,7 @@ static NTSTATUS nbench_rename(struct ntvfs_module_context *ntvfs,
/*
copy a set of files
*/
-static void nbench_copy_send(struct smbsrv_request *req)
+static void nbench_copy_send(struct ntvfs_request *req)
{
nbench_log(req, "Copy - NOT HANDLED\n");
@@ -408,7 +407,7 @@ static void nbench_copy_send(struct smbsrv_request *req)
}
static NTSTATUS nbench_copy(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_copy *cp)
+ struct ntvfs_request *req, struct smb_copy *cp)
{
NTSTATUS status;
@@ -420,7 +419,7 @@ static NTSTATUS nbench_copy(struct ntvfs_module_context *ntvfs,
/*
read from a file
*/
-static void nbench_read_send(struct smbsrv_request *req)
+static void nbench_read_send(struct ntvfs_request *req)
{
union smb_read *rd = req->async_states->private_data;
@@ -446,7 +445,7 @@ static void nbench_read_send(struct smbsrv_request *req)
}
static NTSTATUS nbench_read(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_read *rd)
+ struct ntvfs_request *req, union smb_read *rd)
{
NTSTATUS status;
@@ -458,7 +457,7 @@ static NTSTATUS nbench_read(struct ntvfs_module_context *ntvfs,
/*
write to a file
*/
-static void nbench_write_send(struct smbsrv_request *req)
+static void nbench_write_send(struct ntvfs_request *req)
{
union smb_write *wr = req->async_states->private_data;
@@ -497,7 +496,7 @@ static void nbench_write_send(struct smbsrv_request *req)
}
static NTSTATUS nbench_write(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_write *wr)
+ struct ntvfs_request *req, union smb_write *wr)
{
NTSTATUS status;
@@ -509,7 +508,7 @@ static NTSTATUS nbench_write(struct ntvfs_module_context *ntvfs,
/*
seek in a file
*/
-static void nbench_seek_send(struct smbsrv_request *req)
+static void nbench_seek_send(struct ntvfs_request *req)
{
nbench_log(req, "Seek - NOT HANDLED\n");
@@ -517,7 +516,7 @@ static void nbench_seek_send(struct smbsrv_request *req)
}
static NTSTATUS nbench_seek(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_seek *io)
+ struct ntvfs_request *req, struct smb_seek *io)
{
NTSTATUS status;
@@ -529,7 +528,7 @@ static NTSTATUS nbench_seek(struct ntvfs_module_context *ntvfs,
/*
flush a file
*/
-static void nbench_flush_send(struct smbsrv_request *req)
+static void nbench_flush_send(struct ntvfs_request *req)
{
struct smb_flush *io = req->async_states->private_data;
@@ -541,7 +540,7 @@ static void nbench_flush_send(struct smbsrv_request *req)
}
static NTSTATUS nbench_flush(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_flush *io)
+ struct ntvfs_request *req, struct smb_flush *io)
{
NTSTATUS status;
@@ -553,7 +552,7 @@ static NTSTATUS nbench_flush(struct ntvfs_module_context *ntvfs,
/*
close a file
*/
-static void nbench_close_send(struct smbsrv_request *req)
+static void nbench_close_send(struct ntvfs_request *req)
{
union smb_close *io = req->async_states->private_data;
@@ -574,7 +573,7 @@ static void nbench_close_send(struct smbsrv_request *req)
}
static NTSTATUS nbench_close(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_close *io)
+ struct ntvfs_request *req, union smb_close *io)
{
NTSTATUS status;
@@ -586,7 +585,7 @@ static NTSTATUS nbench_close(struct ntvfs_module_context *ntvfs,
/*
exit - closing files
*/
-static void nbench_exit_send(struct smbsrv_request *req)
+static void nbench_exit_send(struct ntvfs_request *req)
{
nbench_log(req, "Exit - NOT HANDLED\n");
@@ -594,7 +593,7 @@ static void nbench_exit_send(struct smbsrv_request *req)
}
static NTSTATUS nbench_exit(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req)
+ struct ntvfs_request *req)
{
NTSTATUS status;
@@ -606,7 +605,7 @@ static NTSTATUS nbench_exit(struct ntvfs_module_context *ntvfs,
/*
logoff - closing files
*/
-static void nbench_logoff_send(struct smbsrv_request *req)
+static void nbench_logoff_send(struct ntvfs_request *req)
{
nbench_log(req, "Logoff - NOT HANDLED\n");
@@ -614,7 +613,7 @@ static void nbench_logoff_send(struct smbsrv_request *req)
}
static NTSTATUS nbench_logoff(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req)
+ struct ntvfs_request *req)
{
NTSTATUS status;
@@ -626,7 +625,7 @@ static NTSTATUS nbench_logoff(struct ntvfs_module_context *ntvfs,
/*
async_setup - send fn
*/
-static void nbench_async_setup_send(struct smbsrv_request *req)
+static void nbench_async_setup_send(struct ntvfs_request *req)
{
PASS_THRU_REP_POST(req);
}
@@ -635,7 +634,7 @@ static void nbench_async_setup_send(struct smbsrv_request *req)
async setup
*/
static NTSTATUS nbench_async_setup(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
void *private)
{
NTSTATUS status;
@@ -646,7 +645,7 @@ static NTSTATUS nbench_async_setup(struct ntvfs_module_context *ntvfs,
}
-static void nbench_cancel_send(struct smbsrv_request *req)
+static void nbench_cancel_send(struct ntvfs_request *req)
{
PASS_THRU_REP_POST(req);
}
@@ -655,7 +654,7 @@ static void nbench_cancel_send(struct smbsrv_request *req)
cancel an existing async request
*/
static NTSTATUS nbench_cancel(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req)
+ struct ntvfs_request *req)
{
NTSTATUS status;
@@ -667,7 +666,7 @@ static NTSTATUS nbench_cancel(struct ntvfs_module_context *ntvfs,
/*
lock a byte range
*/
-static void nbench_lock_send(struct smbsrv_request *req)
+static void nbench_lock_send(struct ntvfs_request *req)
{
union smb_lock *lck = req->async_states->private_data;
@@ -694,7 +693,7 @@ static void nbench_lock_send(struct smbsrv_request *req)
}
static NTSTATUS nbench_lock(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_lock *lck)
+ struct ntvfs_request *req, union smb_lock *lck)
{
NTSTATUS status;
@@ -706,7 +705,7 @@ static NTSTATUS nbench_lock(struct ntvfs_module_context *ntvfs,
/*
set info on a open file
*/
-static void nbench_setfileinfo_send(struct smbsrv_request *req)
+static void nbench_setfileinfo_send(struct ntvfs_request *req)
{
union smb_setfileinfo *info = req->async_states->private_data;
@@ -719,7 +718,7 @@ static void nbench_setfileinfo_send(struct smbsrv_request *req)
}
static NTSTATUS nbench_setfileinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
union smb_setfileinfo *info)
{
NTSTATUS status;
@@ -732,7 +731,7 @@ static NTSTATUS nbench_setfileinfo(struct ntvfs_module_context *ntvfs,
/*
return filesystem space info
*/
-static void nbench_fsinfo_send(struct smbsrv_request *req)
+static void nbench_fsinfo_send(struct ntvfs_request *req)
{
union smb_fsinfo *fs = req->async_states->private_data;
@@ -744,7 +743,7 @@ static void nbench_fsinfo_send(struct smbsrv_request *req)
}
static NTSTATUS nbench_fsinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_fsinfo *fs)
+ struct ntvfs_request *req, union smb_fsinfo *fs)
{
NTSTATUS status;
@@ -756,7 +755,7 @@ static NTSTATUS nbench_fsinfo(struct ntvfs_module_context *ntvfs,
/*
return print queue info
*/
-static void nbench_lpq_send(struct smbsrv_request *req)
+static void nbench_lpq_send(struct ntvfs_request *req)
{
union smb_lpq *lpq = req->async_states->private_data;
@@ -766,7 +765,7 @@ static void nbench_lpq_send(struct smbsrv_request *req)
}
static NTSTATUS nbench_lpq(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_lpq *lpq)
+ struct ntvfs_request *req, union smb_lpq *lpq)
{
NTSTATUS status;
@@ -778,7 +777,7 @@ static NTSTATUS nbench_lpq(struct ntvfs_module_context *ntvfs,
/*
list files in a directory matching a wildcard pattern
*/
-static void nbench_search_first_send(struct smbsrv_request *req)
+static void nbench_search_first_send(struct ntvfs_request *req)
{
union smb_search_first *io = req->async_states->private_data;
@@ -804,7 +803,7 @@ static void nbench_search_first_send(struct smbsrv_request *req)
}
static NTSTATUS nbench_search_first(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_search_first *io,
+ struct ntvfs_request *req, union smb_search_first *io,
void *search_private,
BOOL (*callback)(void *, union smb_search_data *))
{
@@ -816,7 +815,7 @@ static NTSTATUS nbench_search_first(struct ntvfs_module_context *ntvfs,
}
/* continue a search */
-static void nbench_search_next_send(struct smbsrv_request *req)
+static void nbench_search_next_send(struct ntvfs_request *req)
{
union smb_search_next *io = req->async_states->private_data;
@@ -826,7 +825,7 @@ static void nbench_search_next_send(struct smbsrv_request *req)
}
static NTSTATUS nbench_search_next(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_search_next *io,
+ struct ntvfs_request *req, union smb_search_next *io,
void *search_private,
BOOL (*callback)(void *, union smb_search_data *))
{
@@ -838,7 +837,7 @@ static NTSTATUS nbench_search_next(struct ntvfs_module_context *ntvfs,
}
/* close a search */
-static void nbench_search_close_send(struct smbsrv_request *req)
+static void nbench_search_close_send(struct ntvfs_request *req)
{
union smb_search_close *io = req->async_states->private_data;
@@ -848,7 +847,7 @@ static void nbench_search_close_send(struct smbsrv_request *req)
}
static NTSTATUS nbench_search_close(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_search_close *io)
+ struct ntvfs_request *req, union smb_search_close *io)
{
NTSTATUS status;
@@ -858,7 +857,7 @@ static NTSTATUS nbench_search_close(struct ntvfs_module_context *ntvfs,
}
/* SMBtrans - not used on file shares */
-static void nbench_trans_send(struct smbsrv_request *req)
+static void nbench_trans_send(struct ntvfs_request *req)
{
nbench_log(req, "Trans - NOT HANDLED\n");
@@ -866,7 +865,7 @@ static void nbench_trans_send(struct smbsrv_request *req)
}
static NTSTATUS nbench_trans(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_trans2 *trans2)
+ struct ntvfs_request *req, struct smb_trans2 *trans2)
{
NTSTATUS status;
@@ -896,7 +895,7 @@ NTSTATUS ntvfs_nbench_init(void)
ops.chkpath = nbench_chkpath;
ops.qpathinfo = nbench_qpathinfo;
ops.setpathinfo = nbench_setpathinfo;
- ops.openfile = nbench_openfile;
+ ops.open = nbench_open;
ops.mkdir = nbench_mkdir;
ops.rmdir = nbench_rmdir;
ops.rename = nbench_rename;
diff --git a/source4/ntvfs/ntvfs.h b/source4/ntvfs/ntvfs.h
index 80f6e941257..46d288c8535 100644
--- a/source4/ntvfs/ntvfs.h
+++ b/source4/ntvfs/ntvfs.h
@@ -25,6 +25,8 @@
struct ntvfs_module_context;
+#define ntvfs_request smbsrv_request
+
/* each backend has to be one one of the following 3 basic types. In
* earlier versions of Samba backends needed to handle all types, now
* we implement them separately. */
@@ -35,96 +37,123 @@ enum ntvfs_type {NTVFS_DISK, NTVFS_PRINT, NTVFS_IPC};
struct ntvfs_ops {
const char *name;
enum ntvfs_type type;
-
+
/* initial setup */
- NTSTATUS (*connect)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, const char *sharename);
- NTSTATUS (*disconnect)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_tcon *tcon);
+ NTSTATUS (*connect)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ const char *sharename);
+ NTSTATUS (*disconnect)(struct ntvfs_module_context *ntvfs);
+
+ /* async_setup - called when a backend is processing a async request */
+ NTSTATUS (*async_setup)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ void *private);
+
+ /* filesystem operations */
+ NTSTATUS (*fsinfo)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_fsinfo *fs);
/* path operations */
- NTSTATUS (*unlink)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_unlink *unl);
- NTSTATUS (*chkpath)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_chkpath *cp);
- NTSTATUS (*qpathinfo)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_fileinfo *st);
- NTSTATUS (*setpathinfo)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_setfileinfo *st);
- NTSTATUS (*openfile)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_open *oi);
- NTSTATUS (*mkdir)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_mkdir *md);
- NTSTATUS (*rmdir)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_rmdir *rd);
- NTSTATUS (*rename)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_rename *ren);
- NTSTATUS (*copy)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_copy *cp);
+ NTSTATUS (*unlink)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ struct smb_unlink *unl);
+ NTSTATUS (*chkpath)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ struct smb_chkpath *cp);
+ NTSTATUS (*qpathinfo)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_fileinfo *st);
+ NTSTATUS (*setpathinfo)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_setfileinfo *st);
+ NTSTATUS (*mkdir)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_mkdir *md);
+ NTSTATUS (*rmdir)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ struct smb_rmdir *rd);
+ NTSTATUS (*rename)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_rename *ren);
+ NTSTATUS (*copy)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ struct smb_copy *cp);
+ NTSTATUS (*open)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_open *oi);
/* directory search */
- NTSTATUS (*search_first)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_search_first *io, void *private,
+ NTSTATUS (*search_first)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_search_first *io, void *private,
BOOL (*callback)(void *private, union smb_search_data *file));
- NTSTATUS (*search_next)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_search_next *io, void *private,
- BOOL (*callback)(void *private, union smb_search_data *file));
- NTSTATUS (*search_close)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_search_close *io);
+ NTSTATUS (*search_next)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_search_next *io, void *private,
+ BOOL (*callback)(void *private, union smb_search_data *file));
+ NTSTATUS (*search_close)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_search_close *io);
/* operations on open files */
- NTSTATUS (*ioctl)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_ioctl *io);
- NTSTATUS (*read)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_read *io);
- NTSTATUS (*write)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_write *io);
- NTSTATUS (*seek)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_seek *io);
- NTSTATUS (*flush)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_flush *flush);
- NTSTATUS (*close)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_close *io);
- NTSTATUS (*exit)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req);
- NTSTATUS (*lock)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_lock *lck);
- NTSTATUS (*setfileinfo)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_setfileinfo *info);
- NTSTATUS (*qfileinfo)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_fileinfo *info);
-
- /* filesystem operations */
- NTSTATUS (*fsinfo)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_fsinfo *fs);
-
- /* printing specific operations */
- NTSTATUS (*lpq)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_lpq *lpq);
-
- /* trans2 interface - only used by CIFS backend to prover complete passthru for testing */
- NTSTATUS (*trans2)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_trans2 *trans2);
+ NTSTATUS (*ioctl)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_ioctl *io);
+ NTSTATUS (*read)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_read *io);
+ NTSTATUS (*write)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_write *io);
+ NTSTATUS (*seek)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ struct smb_seek *io);
+ NTSTATUS (*flush)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ struct smb_flush *flush);
+ NTSTATUS (*lock)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_lock *lck);
+ NTSTATUS (*qfileinfo)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_fileinfo *info);
+ NTSTATUS (*setfileinfo)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_setfileinfo *info);
+ NTSTATUS (*close)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_close *io);
/* trans interface - used by IPC backend for pipes and RAP calls */
- NTSTATUS (*trans)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_trans2 *trans);
+ NTSTATUS (*trans)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ struct smb_trans2 *trans);
- /* logoff - called when a vuid is closed */
- NTSTATUS (*logoff)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req);
+ /* trans2 interface - only used by CIFS backend to prover complete passthru for testing */
+ NTSTATUS (*trans2)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ struct smb_trans2 *trans2);
- /* async_setup - called when a backend is processing a async request */
- NTSTATUS (*async_setup)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, void *private);
+ /* change notify request */
+ NTSTATUS (*notify)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ struct smb_notify *info);
/* cancel - cancels any pending async request */
- NTSTATUS (*cancel)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req);
+ NTSTATUS (*cancel)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req);
- /* change notify request */
- NTSTATUS (*notify)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_notify *info);
+ /* printing specific operations */
+ NTSTATUS (*lpq)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_lpq *lpq);
+
+ /* logoff - called when a vuid is closed */
+ NTSTATUS (*logoff)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req);
+ NTSTATUS (*exit)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req);
};
struct ntvfs_module_context {
@@ -166,7 +195,7 @@ struct ntvfs_async_state {
/* the async handling infos */
uint_t state;
void *private_data;
- void (*send_fn)(struct smbsrv_request *);
+ void (*send_fn)(struct ntvfs_request *);
NTSTATUS status;
/* the passthru module's per session private data */
@@ -181,8 +210,7 @@ struct ntvfs_critical_sizes {
int sizeof_ntvfs_module_context;
int sizeof_ntvfs_ops;
int sizeof_ntvfs_async_state;
- int sizeof_smbsrv_tcon;
- int sizeof_smbsrv_request;
+ int sizeof_ntvfs_request;
};
#include "ntvfs/ntvfs_proto.h"
diff --git a/source4/ntvfs/ntvfs_base.c b/source4/ntvfs/ntvfs_base.c
index 1201bdefbed..7351d6b2a66 100644
--- a/source4/ntvfs/ntvfs_base.c
+++ b/source4/ntvfs/ntvfs_base.c
@@ -99,19 +99,18 @@ _PUBLIC_ const struct ntvfs_ops *ntvfs_backend_byname(const char *name, enum ntv
This can be used by backends to either detect compilation errors, or provide
multiple implementations for different smbd compilation options in one module
*/
+static const struct ntvfs_critical_sizes critical_sizes = {
+ .interface_version = NTVFS_INTERFACE_VERSION,
+ .sizeof_ntvfs_critical_sizes = sizeof(struct ntvfs_critical_sizes),
+ .sizeof_ntvfs_context = sizeof(struct ntvfs_context),
+ .sizeof_ntvfs_module_context = sizeof(struct ntvfs_module_context),
+ .sizeof_ntvfs_ops = sizeof(struct ntvfs_ops),
+ .sizeof_ntvfs_async_state = sizeof(struct ntvfs_async_state),
+ .sizeof_ntvfs_request = sizeof(struct ntvfs_request),
+};
+
_PUBLIC_ const struct ntvfs_critical_sizes *ntvfs_interface_version(void)
{
- static const struct ntvfs_critical_sizes critical_sizes = {
- NTVFS_INTERFACE_VERSION,
- sizeof(struct ntvfs_critical_sizes),
- sizeof(struct ntvfs_context),
- sizeof(struct ntvfs_module_context),
- sizeof(struct ntvfs_ops),
- sizeof(struct ntvfs_async_state),
- sizeof(struct smbsrv_tcon),
- sizeof(struct smbsrv_request),
- };
-
return &critical_sizes;
}
@@ -119,7 +118,7 @@ _PUBLIC_ const struct ntvfs_critical_sizes *ntvfs_interface_version(void)
/*
initialise a connection structure to point at a NTVFS backend
*/
-NTSTATUS ntvfs_init_connection(struct smbsrv_request *req, enum ntvfs_type type)
+NTSTATUS ntvfs_init_connection(struct ntvfs_request *req, enum ntvfs_type type)
{
const char **handlers = lp_ntvfs_handler(req->tcon->service);
int i;
diff --git a/source4/ntvfs/ntvfs_generic.c b/source4/ntvfs/ntvfs_generic.c
index e5224aafcd2..5133f63268a 100644
--- a/source4/ntvfs/ntvfs_generic.c
+++ b/source4/ntvfs/ntvfs_generic.c
@@ -38,8 +38,8 @@
/* a second stage function converts from the out parameters of the generic
call onto the out parameters of the specific call made */
-typedef NTSTATUS (*second_stage_t)(struct smbsrv_request *,
- struct ntvfs_module_context *,
+typedef NTSTATUS (*second_stage_t)(struct ntvfs_module_context *,
+ struct ntvfs_request *,
void *, void *, NTSTATUS);
/*
@@ -55,14 +55,14 @@ struct ntvfs_map_async {
this is a async wrapper, called from the backend when it has completed
a function that it has decided to reply to in an async fashion
*/
-static void ntvfs_map_async_send(struct smbsrv_request *req)
+static void ntvfs_map_async_send(struct ntvfs_request *req)
{
struct ntvfs_map_async *m = req->async_states->private_data;
ntvfs_async_state_pop(req);
/* call the _finish function setup in ntvfs_map_async_setup() */
- req->async_states->status = m->fn(req, m->ntvfs, m->io, m->io2, req->async_states->status);
+ req->async_states->status = m->fn(m->ntvfs, req, m->io, m->io2, req->async_states->status);
/* call the send function from the next module up */
req->async_states->send_fn(req);
@@ -74,8 +74,8 @@ static void ntvfs_map_async_send(struct smbsrv_request *req)
io2 is the new call structure for the mapped call
fn is a second stage function for processing the out arguments
*/
-static NTSTATUS ntvfs_map_async_setup(struct smbsrv_request *req,
- struct ntvfs_module_context *ntvfs,
+static NTSTATUS ntvfs_map_async_setup(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
void *io, void *io2,
second_stage_t fn)
{
@@ -88,14 +88,13 @@ static NTSTATUS ntvfs_map_async_setup(struct smbsrv_request *req,
m->io = io;
m->io2 = io2;
m->fn = fn;
- return ntvfs_async_state_push(req, m, ntvfs_map_async_send, ntvfs);
+ return ntvfs_async_state_push(ntvfs, req, m, ntvfs_map_async_send);
}
-
/*
called when first stage processing is complete.
*/
-static NTSTATUS ntvfs_map_async_finish(struct smbsrv_request *req, NTSTATUS status)
+static NTSTATUS ntvfs_map_async_finish(struct ntvfs_request *req, NTSTATUS status)
{
struct ntvfs_map_async *m;
@@ -111,10 +110,9 @@ static NTSTATUS ntvfs_map_async_finish(struct smbsrv_request *req, NTSTATUS stat
ntvfs_async_state_pop(req);
- return m->fn(req, m->ntvfs, m->io, m->io2, status);
+ return m->fn(m->ntvfs, req, m->io, m->io2, status);
}
-
/*
see if a filename ends in EXE COM DLL or SYM. This is needed for the
DENY_DOS mapping for OpenX
@@ -140,8 +138,8 @@ BOOL is_exe_filename(const char *fname)
/*
NTVFS openx to ntcreatex mapper
*/
-static NTSTATUS ntvfs_map_open_finish(struct smbsrv_request *req,
- struct ntvfs_module_context *ntvfs,
+static NTSTATUS ntvfs_map_open_finish(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
union smb_open *io,
union smb_open *io2,
NTSTATUS status)
@@ -206,6 +204,7 @@ static NTSTATUS ntvfs_map_open_finish(struct smbsrv_request *req,
io->ctemp.out.fnum = io2->generic.out.fnum;
io->ctemp.out.name = talloc_strdup(req, io2->generic.in.fname +
strlen(io->ctemp.in.directory) + 1);
+ NT_STATUS_HAVE_NO_MEMORY(io->ctemp.out.name);
break;
default:
@@ -218,9 +217,10 @@ static NTSTATUS ntvfs_map_open_finish(struct smbsrv_request *req,
req->async_states->state &= ~NTVFS_ASYNC_STATE_MAY_ASYNC;
if (write_time != 0) {
- sf = talloc(req, union smb_setfileinfo);
- sf->generic.level = RAW_SFILEINFO_STANDARD;
- sf->generic.file.fnum = io2->generic.out.fnum;
+ sf = talloc(req, union smb_setfileinfo);
+ NT_STATUS_HAVE_NO_MEMORY(sf);
+ sf->generic.level = RAW_SFILEINFO_STANDARD;
+ sf->generic.file.fnum = io2->generic.out.fnum;
sf->standard.in.create_time = 0;
sf->standard.in.write_time = write_time;
sf->standard.in.access_time = 0;
@@ -229,6 +229,7 @@ static NTSTATUS ntvfs_map_open_finish(struct smbsrv_request *req,
if (set_size != 0) {
sf = talloc(req, union smb_setfileinfo);
+ NT_STATUS_HAVE_NO_MEMORY(sf);
sf->generic.level = RAW_SFILEINFO_END_OF_FILE_INFORMATION;
sf->generic.file.fnum = io2->generic.out.fnum;
sf->end_of_file_info.in.size = set_size;
@@ -346,8 +347,9 @@ static NTSTATUS map_openx_open(uint16_t flags, uint16_t open_mode,
/*
NTVFS open generic to any mapper
*/
-_PUBLIC_ NTSTATUS ntvfs_map_open(struct smbsrv_request *req, union smb_open *io,
- struct ntvfs_module_context *ntvfs)
+_PUBLIC_ NTSTATUS ntvfs_map_open(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_open *io)
{
NTSTATUS status;
union smb_open *io2;
@@ -357,7 +359,8 @@ _PUBLIC_ NTSTATUS ntvfs_map_open(struct smbsrv_request *req, union smb_open *io,
return NT_STATUS_NO_MEMORY;
}
- status = ntvfs_map_async_setup(req, ntvfs, io, io2,
+ status = ntvfs_map_async_setup(ntvfs, req,
+ io, io2,
(second_stage_t)ntvfs_map_open_finish);
if (!NT_STATUS_IS_OK(status)) {
return status;
@@ -379,7 +382,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_open(struct smbsrv_request *req, union smb_open *io,
io2->generic.in.file_attr = io->openx.in.file_attrs;
io2->generic.in.fname = io->openx.in.fname;
- status = ntvfs->ops->openfile(ntvfs, req, io2);
+ status = ntvfs->ops->open(ntvfs, req, io2);
break;
@@ -396,7 +399,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_open(struct smbsrv_request *req, union smb_open *io,
io2->generic.in.file_attr = io->openold.in.search_attrs;
io2->generic.in.fname = io->openold.in.fname;
- status = ntvfs->ops->openfile(ntvfs, req, io2);
+ status = ntvfs->ops->open(ntvfs, req, io2);
break;
case RAW_OPEN_T2OPEN:
@@ -422,7 +425,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_open(struct smbsrv_request *req, union smb_open *io,
io2->generic.in.ea_list->num_eas = io->t2open.in.num_eas;
io2->generic.in.ea_list->eas = io->t2open.in.eas;
- status = ntvfs->ops->openfile(ntvfs, req, io2);
+ status = ntvfs->ops->open(ntvfs, req, io2);
break;
case RAW_OPEN_MKNEW:
@@ -435,7 +438,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_open(struct smbsrv_request *req, union smb_open *io,
io2->generic.in.share_access =
NTCREATEX_SHARE_ACCESS_READ |
NTCREATEX_SHARE_ACCESS_WRITE;
- status = ntvfs->ops->openfile(ntvfs, req, io2);
+ status = ntvfs->ops->open(ntvfs, req, io2);
break;
case RAW_OPEN_CREATE:
@@ -448,7 +451,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_open(struct smbsrv_request *req, union smb_open *io,
io2->generic.in.share_access =
NTCREATEX_SHARE_ACCESS_READ |
NTCREATEX_SHARE_ACCESS_WRITE;
- status = ntvfs->ops->openfile(ntvfs, req, io2);
+ status = ntvfs->ops->open(ntvfs, req, io2);
break;
case RAW_OPEN_CTEMP:
@@ -465,7 +468,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_open(struct smbsrv_request *req, union smb_open *io,
io2->generic.in.share_access =
NTCREATEX_SHARE_ACCESS_READ |
NTCREATEX_SHARE_ACCESS_WRITE;
- status = ntvfs->ops->openfile(ntvfs, req, io2);
+ status = ntvfs->ops->open(ntvfs, req, io2);
break;
default:
@@ -480,8 +483,9 @@ done:
/*
NTVFS fsinfo generic to any mapper
*/
-_PUBLIC_ NTSTATUS ntvfs_map_fsinfo(struct smbsrv_request *req, union smb_fsinfo *fs,
- struct ntvfs_module_context *ntvfs)
+_PUBLIC_ NTSTATUS ntvfs_map_fsinfo(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_fsinfo *fs)
{
NTSTATUS status;
union smb_fsinfo *fs2;
@@ -608,7 +612,8 @@ _PUBLIC_ NTSTATUS ntvfs_map_fsinfo(struct smbsrv_request *req, union smb_fsinfo
/*
NTVFS fileinfo generic to any mapper
*/
-_PUBLIC_ NTSTATUS ntvfs_map_fileinfo(struct smbsrv_request *req, union smb_fileinfo *info,
+_PUBLIC_ NTSTATUS ntvfs_map_fileinfo(TALLOC_CTX *mem_ctx,
+ union smb_fileinfo *info,
union smb_fileinfo *info2)
{
int i;
@@ -714,7 +719,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_fileinfo(struct smbsrv_request *req, union smb_filei
info->stream_info.out.num_streams = info2->generic.out.num_streams;
if (info->stream_info.out.num_streams > 0) {
info->stream_info.out.streams =
- talloc_array(req,
+ talloc_array(mem_ctx,
struct stream_struct,
info->stream_info.out.num_streams);
if (!info->stream_info.out.streams) {
@@ -725,7 +730,8 @@ _PUBLIC_ NTSTATUS ntvfs_map_fileinfo(struct smbsrv_request *req, union smb_filei
for (i=0; i < info->stream_info.out.num_streams; i++) {
info->stream_info.out.streams[i] = info2->generic.out.streams[i];
info->stream_info.out.streams[i].stream_name.s =
- talloc_strdup(req, info2->generic.out.streams[i].stream_name.s);
+ talloc_strdup(info->stream_info.out.streams,
+ info2->generic.out.streams[i].stream_name.s);
if (!info->stream_info.out.streams[i].stream_name.s) {
DEBUG(2,("ntvfs_map_fileinfo: no memory for stream_name\n"));
return NT_STATUS_NO_MEMORY;
@@ -736,13 +742,15 @@ _PUBLIC_ NTSTATUS ntvfs_map_fileinfo(struct smbsrv_request *req, union smb_filei
case RAW_FILEINFO_NAME_INFO:
case RAW_FILEINFO_NAME_INFORMATION:
- info->name_info.out.fname.s = talloc_strdup(req, info2->generic.out.fname.s);
+ info->name_info.out.fname.s = talloc_strdup(mem_ctx, info2->generic.out.fname.s);
+ NT_STATUS_HAVE_NO_MEMORY(info->name_info.out.fname.s);
info->name_info.out.fname.private_length = info2->generic.out.fname.private_length;
return NT_STATUS_OK;
case RAW_FILEINFO_ALT_NAME_INFO:
case RAW_FILEINFO_ALT_NAME_INFORMATION:
- info->alt_name_info.out.fname.s = talloc_strdup(req, info2->generic.out.alt_fname.s);
+ info->alt_name_info.out.fname.s = talloc_strdup(mem_ctx, info2->generic.out.alt_fname.s);
+ NT_STATUS_HAVE_NO_MEMORY(info->alt_name_info.out.fname.s);
info->alt_name_info.out.fname.private_length = info2->generic.out.alt_fname.private_length;
return NT_STATUS_OK;
@@ -753,7 +761,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_fileinfo(struct smbsrv_request *req, union smb_filei
case RAW_FILEINFO_ALL_EAS:
info->all_eas.out.num_eas = info2->generic.out.num_eas;
if (info->all_eas.out.num_eas > 0) {
- info->all_eas.out.eas = talloc_array(req,
+ info->all_eas.out.eas = talloc_array(mem_ctx,
struct ea_struct,
info->all_eas.out.num_eas);
if (!info->all_eas.out.eas) {
@@ -764,13 +772,14 @@ _PUBLIC_ NTSTATUS ntvfs_map_fileinfo(struct smbsrv_request *req, union smb_filei
for (i = 0; i < info->all_eas.out.num_eas; i++) {
info->all_eas.out.eas[i] = info2->generic.out.eas[i];
info->all_eas.out.eas[i].name.s =
- talloc_strdup(req, info2->generic.out.eas[i].name.s);
+ talloc_strdup(info->all_eas.out.eas,
+ info2->generic.out.eas[i].name.s);
if (!info->all_eas.out.eas[i].name.s) {
DEBUG(2,("ntvfs_map_fileinfo: no memory for stream_name\n"));
return NT_STATUS_NO_MEMORY;
}
info->all_eas.out.eas[i].value.data =
- talloc_memdup(req,
+ talloc_memdup(info->all_eas.out.eas,
info2->generic.out.eas[i].value.data,
info2->generic.out.eas[i].value.length);
if (!info->all_eas.out.eas[i].value.data) {
@@ -834,8 +843,9 @@ _PUBLIC_ NTSTATUS ntvfs_map_fileinfo(struct smbsrv_request *req, union smb_filei
/*
NTVFS fileinfo generic to any mapper
*/
-_PUBLIC_ NTSTATUS ntvfs_map_qfileinfo(struct smbsrv_request *req, union smb_fileinfo *info,
- struct ntvfs_module_context *ntvfs)
+_PUBLIC_ NTSTATUS ntvfs_map_qfileinfo(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_fileinfo *info)
{
NTSTATUS status;
union smb_fileinfo *info2;
@@ -866,8 +876,9 @@ _PUBLIC_ NTSTATUS ntvfs_map_qfileinfo(struct smbsrv_request *req, union smb_file
/*
NTVFS pathinfo generic to any mapper
*/
-_PUBLIC_ NTSTATUS ntvfs_map_qpathinfo(struct smbsrv_request *req, union smb_fileinfo *info,
- struct ntvfs_module_context *ntvfs)
+_PUBLIC_ NTSTATUS ntvfs_map_qpathinfo(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_fileinfo *info)
{
NTSTATUS status;
union smb_fileinfo *info2;
@@ -899,8 +910,9 @@ _PUBLIC_ NTSTATUS ntvfs_map_qpathinfo(struct smbsrv_request *req, union smb_file
/*
NTVFS lock generic to any mapper
*/
-_PUBLIC_ NTSTATUS ntvfs_map_lock(struct smbsrv_request *req, union smb_lock *lck,
- struct ntvfs_module_context *ntvfs)
+_PUBLIC_ NTSTATUS ntvfs_map_lock(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_lock *lck)
{
union smb_lock *lck2;
struct smb_lock_entry *locks;
@@ -951,12 +963,11 @@ _PUBLIC_ NTSTATUS ntvfs_map_lock(struct smbsrv_request *req, union smb_lock *lck
/*
NTVFS write generic to any mapper
*/
-static NTSTATUS ntvfs_map_write_finish(struct smbsrv_request *req,
- struct ntvfs_module_context *ntvfs,
+static NTSTATUS ntvfs_map_write_finish(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
union smb_write *wr,
union smb_write *wr2,
NTSTATUS status)
-
{
union smb_lock *lck;
union smb_close *cl;
@@ -1027,8 +1038,9 @@ static NTSTATUS ntvfs_map_write_finish(struct smbsrv_request *req,
/*
NTVFS write generic to any mapper
*/
-_PUBLIC_ NTSTATUS ntvfs_map_write(struct smbsrv_request *req, union smb_write *wr,
- struct ntvfs_module_context *ntvfs)
+_PUBLIC_ NTSTATUS ntvfs_map_write(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_write *wr)
{
union smb_write *wr2;
NTSTATUS status;
@@ -1038,7 +1050,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_write(struct smbsrv_request *req, union smb_write *w
return NT_STATUS_NO_MEMORY;
}
- status = ntvfs_map_async_setup(req, ntvfs, wr, wr2,
+ status = ntvfs_map_async_setup(ntvfs, req, wr, wr2,
(second_stage_t)ntvfs_map_write_finish);
if (!NT_STATUS_IS_OK(status)) {
return status;
@@ -1099,8 +1111,8 @@ _PUBLIC_ NTSTATUS ntvfs_map_write(struct smbsrv_request *req, union smb_write *w
/*
NTVFS read generic to any mapper - finish the out mapping
*/
-static NTSTATUS ntvfs_map_read_finish(struct smbsrv_request *req,
- struct ntvfs_module_context *ntvfs,
+static NTSTATUS ntvfs_map_read_finish(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
union smb_read *rd,
union smb_read *rd2,
NTSTATUS status)
@@ -1125,8 +1137,9 @@ static NTSTATUS ntvfs_map_read_finish(struct smbsrv_request *req,
/*
NTVFS read* to readx mapper
*/
-_PUBLIC_ NTSTATUS ntvfs_map_read(struct smbsrv_request *req, union smb_read *rd,
- struct ntvfs_module_context *ntvfs)
+_PUBLIC_ NTSTATUS ntvfs_map_read(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_read *rd)
{
union smb_read *rd2;
union smb_lock *lck;
@@ -1138,7 +1151,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_read(struct smbsrv_request *req, union smb_read *rd,
return NT_STATUS_NO_MEMORY;
}
- status = ntvfs_map_async_setup(req, ntvfs, rd, rd2,
+ status = ntvfs_map_async_setup(ntvfs, req, rd, rd2,
(second_stage_t)ntvfs_map_read_finish);
if (!NT_STATUS_IS_OK(status)) {
return status;
@@ -1209,8 +1222,9 @@ done:
/*
NTVFS close generic to any mapper
*/
-_PUBLIC_ NTSTATUS ntvfs_map_close(struct smbsrv_request *req, union smb_close *cl,
- struct ntvfs_module_context *ntvfs)
+_PUBLIC_ NTSTATUS ntvfs_map_close(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_close *cl)
{
union smb_close *cl2;
diff --git a/source4/ntvfs/ntvfs_interface.c b/source4/ntvfs/ntvfs_interface.c
index a3a605c0c89..2be3170bd8d 100644
--- a/source4/ntvfs/ntvfs_interface.c
+++ b/source4/ntvfs/ntvfs_interface.c
@@ -24,7 +24,7 @@
#include "ntvfs/ntvfs.h"
/* connect/disconnect */
-_PUBLIC_ NTSTATUS ntvfs_connect(struct smbsrv_request *req, const char *sharename)
+_PUBLIC_ NTSTATUS ntvfs_connect(struct ntvfs_request *req, const char *sharename)
{
struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
if (!ntvfs->ops->connect) {
@@ -33,21 +33,42 @@ _PUBLIC_ NTSTATUS ntvfs_connect(struct smbsrv_request *req, const char *sharenam
return ntvfs->ops->connect(ntvfs, req, sharename);
}
-_PUBLIC_ NTSTATUS ntvfs_disconnect(struct smbsrv_tcon *tcon)
+_PUBLIC_ NTSTATUS ntvfs_disconnect(struct ntvfs_context *ntvfs_ctx)
{
struct ntvfs_module_context *ntvfs;
- if (tcon->ntvfs_ctx == NULL) {
+ if (ntvfs_ctx == NULL) {
return NT_STATUS_INVALID_CONNECTION;
}
- ntvfs = tcon->ntvfs_ctx->modules;
+ ntvfs = ntvfs_ctx->modules;
if (!ntvfs->ops->disconnect) {
return NT_STATUS_NOT_IMPLEMENTED;
}
- return ntvfs->ops->disconnect(ntvfs, tcon);
+ return ntvfs->ops->disconnect(ntvfs);
+}
+
+/* async setup - called by a backend that wants to setup any state for
+ a async request */
+_PUBLIC_ NTSTATUS ntvfs_async_setup(struct ntvfs_request *req, void *private)
+{
+ struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
+ if (!ntvfs->ops->async_setup) {
+ return NT_STATUS_NOT_IMPLEMENTED;
+ }
+ return ntvfs->ops->async_setup(ntvfs, req, private);
+}
+
+/* filesystem operations */
+_PUBLIC_ NTSTATUS ntvfs_fsinfo(struct ntvfs_request *req, union smb_fsinfo *fs)
+{
+ struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
+ if (!ntvfs->ops->fsinfo) {
+ return NT_STATUS_NOT_IMPLEMENTED;
+ }
+ return ntvfs->ops->fsinfo(ntvfs, req, fs);
}
/* path operations */
-_PUBLIC_ NTSTATUS ntvfs_unlink(struct smbsrv_request *req, struct smb_unlink *unl)
+_PUBLIC_ NTSTATUS ntvfs_unlink(struct ntvfs_request *req, struct smb_unlink *unl)
{
struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
if (!ntvfs->ops->unlink) {
@@ -56,7 +77,7 @@ _PUBLIC_ NTSTATUS ntvfs_unlink(struct smbsrv_request *req, struct smb_unlink *un
return ntvfs->ops->unlink(ntvfs, req, unl);
}
-_PUBLIC_ NTSTATUS ntvfs_chkpath(struct smbsrv_request *req, struct smb_chkpath *cp)
+_PUBLIC_ NTSTATUS ntvfs_chkpath(struct ntvfs_request *req, struct smb_chkpath *cp)
{
struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
if (!ntvfs->ops->chkpath) {
@@ -65,7 +86,7 @@ _PUBLIC_ NTSTATUS ntvfs_chkpath(struct smbsrv_request *req, struct smb_chkpath *
return ntvfs->ops->chkpath(ntvfs, req, cp);
}
-_PUBLIC_ NTSTATUS ntvfs_qpathinfo(struct smbsrv_request *req, union smb_fileinfo *st)
+_PUBLIC_ NTSTATUS ntvfs_qpathinfo(struct ntvfs_request *req, union smb_fileinfo *st)
{
struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
if (!ntvfs->ops->qpathinfo) {
@@ -74,7 +95,7 @@ _PUBLIC_ NTSTATUS ntvfs_qpathinfo(struct smbsrv_request *req, union smb_fileinfo
return ntvfs->ops->qpathinfo(ntvfs, req, st);
}
-_PUBLIC_ NTSTATUS ntvfs_setpathinfo(struct smbsrv_request *req, union smb_setfileinfo *st)
+_PUBLIC_ NTSTATUS ntvfs_setpathinfo(struct ntvfs_request *req, union smb_setfileinfo *st)
{
struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
if (!ntvfs->ops->setpathinfo) {
@@ -83,16 +104,16 @@ _PUBLIC_ NTSTATUS ntvfs_setpathinfo(struct smbsrv_request *req, union smb_setfil
return ntvfs->ops->setpathinfo(ntvfs, req, st);
}
-_PUBLIC_ NTSTATUS ntvfs_openfile(struct smbsrv_request *req, union smb_open *oi)
+_PUBLIC_ NTSTATUS ntvfs_open(struct ntvfs_request *req, union smb_open *oi)
{
struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
- if (!ntvfs->ops->openfile) {
+ if (!ntvfs->ops->open) {
return NT_STATUS_NOT_IMPLEMENTED;
}
- return ntvfs->ops->openfile(ntvfs, req, oi);
+ return ntvfs->ops->open(ntvfs, req, oi);
}
-_PUBLIC_ NTSTATUS ntvfs_mkdir(struct smbsrv_request *req, union smb_mkdir *md)
+_PUBLIC_ NTSTATUS ntvfs_mkdir(struct ntvfs_request *req, union smb_mkdir *md)
{
struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
if (!ntvfs->ops->mkdir) {
@@ -101,7 +122,7 @@ _PUBLIC_ NTSTATUS ntvfs_mkdir(struct smbsrv_request *req, union smb_mkdir *md)
return ntvfs->ops->mkdir(ntvfs, req, md);
}
-_PUBLIC_ NTSTATUS ntvfs_rmdir(struct smbsrv_request *req, struct smb_rmdir *rd)
+_PUBLIC_ NTSTATUS ntvfs_rmdir(struct ntvfs_request *req, struct smb_rmdir *rd)
{
struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
if (!ntvfs->ops->rmdir) {
@@ -110,7 +131,7 @@ _PUBLIC_ NTSTATUS ntvfs_rmdir(struct smbsrv_request *req, struct smb_rmdir *rd)
return ntvfs->ops->rmdir(ntvfs, req, rd);
}
-_PUBLIC_ NTSTATUS ntvfs_rename(struct smbsrv_request *req, union smb_rename *ren)
+_PUBLIC_ NTSTATUS ntvfs_rename(struct ntvfs_request *req, union smb_rename *ren)
{
struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
if (!ntvfs->ops->rename) {
@@ -119,7 +140,7 @@ _PUBLIC_ NTSTATUS ntvfs_rename(struct smbsrv_request *req, union smb_rename *ren
return ntvfs->ops->rename(ntvfs, req, ren);
}
-_PUBLIC_ NTSTATUS ntvfs_copy(struct smbsrv_request *req, struct smb_copy *cp)
+_PUBLIC_ NTSTATUS ntvfs_copy(struct ntvfs_request *req, struct smb_copy *cp)
{
struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
if (!ntvfs->ops->copy) {
@@ -129,7 +150,7 @@ _PUBLIC_ NTSTATUS ntvfs_copy(struct smbsrv_request *req, struct smb_copy *cp)
}
/* directory search */
-_PUBLIC_ NTSTATUS ntvfs_search_first(struct smbsrv_request *req, union smb_search_first *io, void *private,
+_PUBLIC_ NTSTATUS ntvfs_search_first(struct ntvfs_request *req, union smb_search_first *io, void *private,
BOOL ntvfs_callback(void *private, union smb_search_data *file))
{
struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
@@ -139,7 +160,7 @@ _PUBLIC_ NTSTATUS ntvfs_search_first(struct smbsrv_request *req, union smb_searc
return ntvfs->ops->search_first(ntvfs, req, io, private, ntvfs_callback);
}
-_PUBLIC_ NTSTATUS ntvfs_search_next(struct smbsrv_request *req, union smb_search_next *io, void *private,
+_PUBLIC_ NTSTATUS ntvfs_search_next(struct ntvfs_request *req, union smb_search_next *io, void *private,
BOOL ntvfs_callback(void *private, union smb_search_data *file))
{
struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
@@ -149,7 +170,7 @@ _PUBLIC_ NTSTATUS ntvfs_search_next(struct smbsrv_request *req, union smb_search
return ntvfs->ops->search_next(ntvfs, req, io, private, ntvfs_callback);
}
-_PUBLIC_ NTSTATUS ntvfs_search_close(struct smbsrv_request *req, union smb_search_close *io)
+_PUBLIC_ NTSTATUS ntvfs_search_close(struct ntvfs_request *req, union smb_search_close *io)
{
struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
if (!ntvfs->ops->search_close) {
@@ -159,7 +180,7 @@ _PUBLIC_ NTSTATUS ntvfs_search_close(struct smbsrv_request *req, union smb_searc
}
/* operations on open files */
-_PUBLIC_ NTSTATUS ntvfs_ioctl(struct smbsrv_request *req, union smb_ioctl *io)
+_PUBLIC_ NTSTATUS ntvfs_ioctl(struct ntvfs_request *req, union smb_ioctl *io)
{
struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
if (!ntvfs->ops->ioctl) {
@@ -168,7 +189,7 @@ _PUBLIC_ NTSTATUS ntvfs_ioctl(struct smbsrv_request *req, union smb_ioctl *io)
return ntvfs->ops->ioctl(ntvfs, req, io);
}
-_PUBLIC_ NTSTATUS ntvfs_read(struct smbsrv_request *req, union smb_read *io)
+_PUBLIC_ NTSTATUS ntvfs_read(struct ntvfs_request *req, union smb_read *io)
{
struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
if (!ntvfs->ops->read) {
@@ -177,7 +198,7 @@ _PUBLIC_ NTSTATUS ntvfs_read(struct smbsrv_request *req, union smb_read *io)
return ntvfs->ops->read(ntvfs, req, io);
}
-_PUBLIC_ NTSTATUS ntvfs_write(struct smbsrv_request *req, union smb_write *io)
+_PUBLIC_ NTSTATUS ntvfs_write(struct ntvfs_request *req, union smb_write *io)
{
struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
if (!ntvfs->ops->write) {
@@ -186,7 +207,7 @@ _PUBLIC_ NTSTATUS ntvfs_write(struct smbsrv_request *req, union smb_write *io)
return ntvfs->ops->write(ntvfs, req, io);
}
-_PUBLIC_ NTSTATUS ntvfs_seek(struct smbsrv_request *req, struct smb_seek *io)
+_PUBLIC_ NTSTATUS ntvfs_seek(struct ntvfs_request *req, struct smb_seek *io)
{
struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
if (!ntvfs->ops->seek) {
@@ -195,7 +216,8 @@ _PUBLIC_ NTSTATUS ntvfs_seek(struct smbsrv_request *req, struct smb_seek *io)
return ntvfs->ops->seek(ntvfs, req, io);
}
-_PUBLIC_ NTSTATUS ntvfs_flush(struct smbsrv_request *req, struct smb_flush *flush)
+_PUBLIC_ NTSTATUS ntvfs_flush(struct ntvfs_request *req,
+ struct smb_flush *flush)
{
struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
if (!ntvfs->ops->flush) {
@@ -204,25 +226,7 @@ _PUBLIC_ NTSTATUS ntvfs_flush(struct smbsrv_request *req, struct smb_flush *flus
return ntvfs->ops->flush(ntvfs, req, flush);
}
-_PUBLIC_ NTSTATUS ntvfs_close(struct smbsrv_request *req, union smb_close *io)
-{
- struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
- if (!ntvfs->ops->close) {
- return NT_STATUS_NOT_IMPLEMENTED;
- }
- return ntvfs->ops->close(ntvfs, req, io);
-}
-
-_PUBLIC_ NTSTATUS ntvfs_exit(struct smbsrv_request *req)
-{
- struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
- if (!ntvfs->ops->exit) {
- return NT_STATUS_NOT_IMPLEMENTED;
- }
- return ntvfs->ops->exit(ntvfs, req);
-}
-
-_PUBLIC_ NTSTATUS ntvfs_lock(struct smbsrv_request *req, union smb_lock *lck)
+_PUBLIC_ NTSTATUS ntvfs_lock(struct ntvfs_request *req, union smb_lock *lck)
{
struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
if (!ntvfs->ops->lock) {
@@ -231,46 +235,45 @@ _PUBLIC_ NTSTATUS ntvfs_lock(struct smbsrv_request *req, union smb_lock *lck)
return ntvfs->ops->lock(ntvfs, req, lck);
}
-_PUBLIC_ NTSTATUS ntvfs_setfileinfo(struct smbsrv_request *req, union smb_setfileinfo *info)
+_PUBLIC_ NTSTATUS ntvfs_qfileinfo(struct ntvfs_request *req, union smb_fileinfo *info)
{
struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
- if (!ntvfs->ops->setfileinfo) {
+ if (!ntvfs->ops->qfileinfo) {
return NT_STATUS_NOT_IMPLEMENTED;
}
- return ntvfs->ops->setfileinfo(ntvfs, req, info);
+ return ntvfs->ops->qfileinfo(ntvfs, req, info);
}
-_PUBLIC_ NTSTATUS ntvfs_qfileinfo(struct smbsrv_request *req, union smb_fileinfo *info)
+_PUBLIC_ NTSTATUS ntvfs_setfileinfo(struct ntvfs_request *req, union smb_setfileinfo *info)
{
struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
- if (!ntvfs->ops->qfileinfo) {
+ if (!ntvfs->ops->setfileinfo) {
return NT_STATUS_NOT_IMPLEMENTED;
}
- return ntvfs->ops->qfileinfo(ntvfs, req, info);
+ return ntvfs->ops->setfileinfo(ntvfs, req, info);
}
-/* filesystem operations */
-_PUBLIC_ NTSTATUS ntvfs_fsinfo(struct smbsrv_request *req, union smb_fsinfo *fs)
+_PUBLIC_ NTSTATUS ntvfs_close(struct ntvfs_request *req, union smb_close *io)
{
struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
- if (!ntvfs->ops->fsinfo) {
+ if (!ntvfs->ops->close) {
return NT_STATUS_NOT_IMPLEMENTED;
}
- return ntvfs->ops->fsinfo(ntvfs, req, fs);
+ return ntvfs->ops->close(ntvfs, req, io);
}
-/* printing specific operations */
-_PUBLIC_ NTSTATUS ntvfs_lpq(struct smbsrv_request *req, union smb_lpq *lpq)
+/* trans interface - used by IPC backend for pipes and RAP calls */
+_PUBLIC_ NTSTATUS ntvfs_trans(struct ntvfs_request *req, struct smb_trans2 *trans)
{
struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
- if (!ntvfs->ops->lpq) {
+ if (!ntvfs->ops->trans) {
return NT_STATUS_NOT_IMPLEMENTED;
}
- return ntvfs->ops->lpq(ntvfs, req, lpq);
+ return ntvfs->ops->trans(ntvfs, req, trans);
}
/* trans2 interface - only used by CIFS backend to prover complete passthru for testing */
-_PUBLIC_ NTSTATUS ntvfs_trans2(struct smbsrv_request *req, struct smb_trans2 *trans2)
+_PUBLIC_ NTSTATUS ntvfs_trans2(struct ntvfs_request *req, struct smb_trans2 *trans2)
{
struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
if (!ntvfs->ops->trans2) {
@@ -279,18 +282,18 @@ _PUBLIC_ NTSTATUS ntvfs_trans2(struct smbsrv_request *req, struct smb_trans2 *tr
return ntvfs->ops->trans2(ntvfs, req, trans2);
}
-/* trans interface - used by IPC backend for pipes and RAP calls */
-_PUBLIC_ NTSTATUS ntvfs_trans(struct smbsrv_request *req, struct smb_trans2 *trans)
+/* printing specific operations */
+_PUBLIC_ NTSTATUS ntvfs_lpq(struct ntvfs_request *req, union smb_lpq *lpq)
{
struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
- if (!ntvfs->ops->trans) {
+ if (!ntvfs->ops->lpq) {
return NT_STATUS_NOT_IMPLEMENTED;
}
- return ntvfs->ops->trans(ntvfs, req, trans);
+ return ntvfs->ops->lpq(ntvfs, req, lpq);
}
/* logoff - called when a vuid is closed */
-_PUBLIC_ NTSTATUS ntvfs_logoff(struct smbsrv_request *req)
+_PUBLIC_ NTSTATUS ntvfs_logoff(struct ntvfs_request *req)
{
struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
if (!ntvfs->ops->logoff) {
@@ -299,47 +302,42 @@ _PUBLIC_ NTSTATUS ntvfs_logoff(struct smbsrv_request *req)
return ntvfs->ops->logoff(ntvfs, req);
}
-/* async setup - called by a backend that wants to setup any state for
- a async request */
-_PUBLIC_ NTSTATUS ntvfs_async_setup(struct smbsrv_request *req, void *private)
+_PUBLIC_ NTSTATUS ntvfs_exit(struct ntvfs_request *req)
{
struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
- if (!ntvfs->ops->async_setup) {
+ if (!ntvfs->ops->exit) {
return NT_STATUS_NOT_IMPLEMENTED;
}
- return ntvfs->ops->async_setup(ntvfs, req, private);
+ return ntvfs->ops->exit(ntvfs, req);
}
-
/*
- cancel an outstanding async request
+ change notify request
*/
-_PUBLIC_ NTSTATUS ntvfs_cancel(struct smbsrv_request *req)
+_PUBLIC_ NTSTATUS ntvfs_notify(struct ntvfs_request *req, struct smb_notify *info)
{
struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
- if (!ntvfs->ops->cancel) {
+ if (!ntvfs->ops->notify) {
return NT_STATUS_NOT_IMPLEMENTED;
}
- return ntvfs->ops->cancel(ntvfs, req);
+ return ntvfs->ops->notify(ntvfs, req, info);
}
-
/*
- change notify request
+ cancel an outstanding async request
*/
-_PUBLIC_ NTSTATUS ntvfs_notify(struct smbsrv_request *req, struct smb_notify *info)
+_PUBLIC_ NTSTATUS ntvfs_cancel(struct ntvfs_request *req)
{
struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
- if (!ntvfs->ops->notify) {
+ if (!ntvfs->ops->cancel) {
return NT_STATUS_NOT_IMPLEMENTED;
}
- return ntvfs->ops->notify(ntvfs, req, info);
+ return ntvfs->ops->cancel(ntvfs, req);
}
-
/* initial setup */
_PUBLIC_ NTSTATUS ntvfs_next_connect(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, const char *sharename)
+ struct ntvfs_request *req, const char *sharename)
{
if (!ntvfs->next || !ntvfs->next->ops->connect) {
return NT_STATUS_NOT_IMPLEMENTED;
@@ -347,18 +345,40 @@ _PUBLIC_ NTSTATUS ntvfs_next_connect(struct ntvfs_module_context *ntvfs,
return ntvfs->next->ops->connect(ntvfs->next, req, sharename);
}
-_PUBLIC_ NTSTATUS ntvfs_next_disconnect(struct ntvfs_module_context *ntvfs,
- struct smbsrv_tcon *tcon)
+_PUBLIC_ NTSTATUS ntvfs_next_disconnect(struct ntvfs_module_context *ntvfs)
{
if (!ntvfs->next || !ntvfs->next->ops->disconnect) {
return NT_STATUS_NOT_IMPLEMENTED;
}
- return ntvfs->next->ops->disconnect(ntvfs->next, tcon);
+ return ntvfs->next->ops->disconnect(ntvfs->next);
+}
+
+/* async_setup - called when setting up for a async request */
+_PUBLIC_ NTSTATUS ntvfs_next_async_setup(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ void *private)
+{
+ if (!ntvfs->next || !ntvfs->next->ops->async_setup) {
+ return NT_STATUS_NOT_IMPLEMENTED;
+ }
+ return ntvfs->next->ops->async_setup(ntvfs->next, req, private);
+}
+
+/* filesystem operations */
+_PUBLIC_ NTSTATUS ntvfs_next_fsinfo(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_fsinfo *fs)
+{
+ if (!ntvfs->next || !ntvfs->next->ops->fsinfo) {
+ return NT_STATUS_NOT_IMPLEMENTED;
+ }
+ return ntvfs->next->ops->fsinfo(ntvfs->next, req, fs);
}
/* path operations */
_PUBLIC_ NTSTATUS ntvfs_next_unlink(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_unlink *unl)
+ struct ntvfs_request *req,
+ struct smb_unlink *unl)
{
if (!ntvfs->next || !ntvfs->next->ops->unlink) {
return NT_STATUS_NOT_IMPLEMENTED;
@@ -367,7 +387,8 @@ _PUBLIC_ NTSTATUS ntvfs_next_unlink(struct ntvfs_module_context *ntvfs,
}
_PUBLIC_ NTSTATUS ntvfs_next_chkpath(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_chkpath *cp)
+ struct ntvfs_request *req,
+ struct smb_chkpath *cp)
{
if (!ntvfs->next || !ntvfs->next->ops->chkpath) {
return NT_STATUS_NOT_IMPLEMENTED;
@@ -376,7 +397,8 @@ _PUBLIC_ NTSTATUS ntvfs_next_chkpath(struct ntvfs_module_context *ntvfs,
}
_PUBLIC_ NTSTATUS ntvfs_next_qpathinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_fileinfo *st)
+ struct ntvfs_request *req,
+ union smb_fileinfo *st)
{
if (!ntvfs->next || !ntvfs->next->ops->qpathinfo) {
return NT_STATUS_NOT_IMPLEMENTED;
@@ -385,7 +407,8 @@ _PUBLIC_ NTSTATUS ntvfs_next_qpathinfo(struct ntvfs_module_context *ntvfs,
}
_PUBLIC_ NTSTATUS ntvfs_next_setpathinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_setfileinfo *st)
+ struct ntvfs_request *req,
+ union smb_setfileinfo *st)
{
if (!ntvfs->next || !ntvfs->next->ops->setpathinfo) {
return NT_STATUS_NOT_IMPLEMENTED;
@@ -393,17 +416,9 @@ _PUBLIC_ NTSTATUS ntvfs_next_setpathinfo(struct ntvfs_module_context *ntvfs,
return ntvfs->next->ops->setpathinfo(ntvfs->next, req, st);
}
-_PUBLIC_ NTSTATUS ntvfs_next_openfile(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_open *oi)
-{
- if (!ntvfs->next || !ntvfs->next->ops->openfile) {
- return NT_STATUS_NOT_IMPLEMENTED;
- }
- return ntvfs->next->ops->openfile(ntvfs->next, req, oi);
-}
-
_PUBLIC_ NTSTATUS ntvfs_next_mkdir(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_mkdir *md)
+ struct ntvfs_request *req,
+ union smb_mkdir *md)
{
if (!ntvfs->next || !ntvfs->next->ops->mkdir) {
return NT_STATUS_NOT_IMPLEMENTED;
@@ -412,7 +427,8 @@ _PUBLIC_ NTSTATUS ntvfs_next_mkdir(struct ntvfs_module_context *ntvfs,
}
_PUBLIC_ NTSTATUS ntvfs_next_rmdir(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_rmdir *rd)
+ struct ntvfs_request *req,
+ struct smb_rmdir *rd)
{
if (!ntvfs->next || !ntvfs->next->ops->rmdir) {
return NT_STATUS_NOT_IMPLEMENTED;
@@ -421,7 +437,8 @@ _PUBLIC_ NTSTATUS ntvfs_next_rmdir(struct ntvfs_module_context *ntvfs,
}
_PUBLIC_ NTSTATUS ntvfs_next_rename(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_rename *ren)
+ struct ntvfs_request *req,
+ union smb_rename *ren)
{
if (!ntvfs->next || !ntvfs->next->ops->rename) {
return NT_STATUS_NOT_IMPLEMENTED;
@@ -430,7 +447,8 @@ _PUBLIC_ NTSTATUS ntvfs_next_rename(struct ntvfs_module_context *ntvfs,
}
_PUBLIC_ NTSTATUS ntvfs_next_copy(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_copy *cp)
+ struct ntvfs_request *req,
+ struct smb_copy *cp)
{
if (!ntvfs->next || !ntvfs->next->ops->copy) {
return NT_STATUS_NOT_IMPLEMENTED;
@@ -438,9 +456,21 @@ _PUBLIC_ NTSTATUS ntvfs_next_copy(struct ntvfs_module_context *ntvfs,
return ntvfs->next->ops->copy(ntvfs->next, req, cp);
}
+_PUBLIC_ NTSTATUS ntvfs_next_open(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_open *oi)
+{
+ if (!ntvfs->next || !ntvfs->next->ops->open) {
+ return NT_STATUS_NOT_IMPLEMENTED;
+ }
+ return ntvfs->next->ops->open(ntvfs->next, req, oi);
+}
+
+
/* directory search */
_PUBLIC_ NTSTATUS ntvfs_next_search_first(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_search_first *io, void *private,
+ struct ntvfs_request *req,
+ union smb_search_first *io, void *private,
BOOL (*callback)(void *private, union smb_search_data *file))
{
if (!ntvfs->next || !ntvfs->next->ops->search_first) {
@@ -450,7 +480,8 @@ _PUBLIC_ NTSTATUS ntvfs_next_search_first(struct ntvfs_module_context *ntvfs,
}
_PUBLIC_ NTSTATUS ntvfs_next_search_next(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_search_next *io, void *private,
+ struct ntvfs_request *req,
+ union smb_search_next *io, void *private,
BOOL (*callback)(void *private, union smb_search_data *file))
{
if (!ntvfs->next || !ntvfs->next->ops->search_next) {
@@ -460,7 +491,8 @@ _PUBLIC_ NTSTATUS ntvfs_next_search_next(struct ntvfs_module_context *ntvfs,
}
_PUBLIC_ NTSTATUS ntvfs_next_search_close(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_search_close *io)
+ struct ntvfs_request *req,
+ union smb_search_close *io)
{
if (!ntvfs->next || !ntvfs->next->ops->search_close) {
return NT_STATUS_NOT_IMPLEMENTED;
@@ -470,7 +502,8 @@ _PUBLIC_ NTSTATUS ntvfs_next_search_close(struct ntvfs_module_context *ntvfs,
/* operations on open files */
_PUBLIC_ NTSTATUS ntvfs_next_ioctl(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_ioctl *io)
+ struct ntvfs_request *req,
+ union smb_ioctl *io)
{
if (!ntvfs->next || !ntvfs->next->ops->ioctl) {
return NT_STATUS_NOT_IMPLEMENTED;
@@ -479,7 +512,8 @@ _PUBLIC_ NTSTATUS ntvfs_next_ioctl(struct ntvfs_module_context *ntvfs,
}
_PUBLIC_ NTSTATUS ntvfs_next_read(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_read *io)
+ struct ntvfs_request *req,
+ union smb_read *io)
{
if (!ntvfs->next || !ntvfs->next->ops->read) {
return NT_STATUS_NOT_IMPLEMENTED;
@@ -488,7 +522,8 @@ _PUBLIC_ NTSTATUS ntvfs_next_read(struct ntvfs_module_context *ntvfs,
}
_PUBLIC_ NTSTATUS ntvfs_next_write(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_write *io)
+ struct ntvfs_request *req,
+ union smb_write *io)
{
if (!ntvfs->next || !ntvfs->next->ops->write) {
return NT_STATUS_NOT_IMPLEMENTED;
@@ -497,7 +532,8 @@ _PUBLIC_ NTSTATUS ntvfs_next_write(struct ntvfs_module_context *ntvfs,
}
_PUBLIC_ NTSTATUS ntvfs_next_seek(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_seek *io)
+ struct ntvfs_request *req,
+ struct smb_seek *io)
{
if (!ntvfs->next || !ntvfs->next->ops->seek) {
return NT_STATUS_NOT_IMPLEMENTED;
@@ -506,7 +542,8 @@ _PUBLIC_ NTSTATUS ntvfs_next_seek(struct ntvfs_module_context *ntvfs,
}
_PUBLIC_ NTSTATUS ntvfs_next_flush(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_flush *flush)
+ struct ntvfs_request *req,
+ struct smb_flush *flush)
{
if (!ntvfs->next || !ntvfs->next->ops->flush) {
return NT_STATUS_NOT_IMPLEMENTED;
@@ -514,26 +551,9 @@ _PUBLIC_ NTSTATUS ntvfs_next_flush(struct ntvfs_module_context *ntvfs,
return ntvfs->next->ops->flush(ntvfs->next, req, flush);
}
-_PUBLIC_ NTSTATUS ntvfs_next_close(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_close *io)
-{
- if (!ntvfs->next || !ntvfs->next->ops->close) {
- return NT_STATUS_NOT_IMPLEMENTED;
- }
- return ntvfs->next->ops->close(ntvfs->next, req, io);
-}
-
-_PUBLIC_ NTSTATUS ntvfs_next_exit(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req)
-{
- if (!ntvfs->next || !ntvfs->next->ops->exit) {
- return NT_STATUS_NOT_IMPLEMENTED;
- }
- return ntvfs->next->ops->exit(ntvfs->next, req);
-}
-
_PUBLIC_ NTSTATUS ntvfs_next_lock(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_lock *lck)
+ struct ntvfs_request *req,
+ union smb_lock *lck)
{
if (!ntvfs->next || !ntvfs->next->ops->lock) {
return NT_STATUS_NOT_IMPLEMENTED;
@@ -541,47 +561,51 @@ _PUBLIC_ NTSTATUS ntvfs_next_lock(struct ntvfs_module_context *ntvfs,
return ntvfs->next->ops->lock(ntvfs->next, req, lck);
}
-_PUBLIC_ NTSTATUS ntvfs_next_setfileinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_setfileinfo *info)
+_PUBLIC_ NTSTATUS ntvfs_next_qfileinfo(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_fileinfo *info)
{
- if (!ntvfs->next || !ntvfs->next->ops->setfileinfo) {
+ if (!ntvfs->next || !ntvfs->next->ops->qfileinfo) {
return NT_STATUS_NOT_IMPLEMENTED;
}
- return ntvfs->next->ops->setfileinfo(ntvfs->next, req, info);
+ return ntvfs->next->ops->qfileinfo(ntvfs->next, req, info);
}
-_PUBLIC_ NTSTATUS ntvfs_next_qfileinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_fileinfo *info)
+_PUBLIC_ NTSTATUS ntvfs_next_setfileinfo(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_setfileinfo *info)
{
- if (!ntvfs->next || !ntvfs->next->ops->qfileinfo) {
+ if (!ntvfs->next || !ntvfs->next->ops->setfileinfo) {
return NT_STATUS_NOT_IMPLEMENTED;
}
- return ntvfs->next->ops->qfileinfo(ntvfs->next, req, info);
+ return ntvfs->next->ops->setfileinfo(ntvfs->next, req, info);
}
-/* filesystem operations */
-_PUBLIC_ NTSTATUS ntvfs_next_fsinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_fsinfo *fs)
+_PUBLIC_ NTSTATUS ntvfs_next_close(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_close *io)
{
- if (!ntvfs->next || !ntvfs->next->ops->fsinfo) {
+ if (!ntvfs->next || !ntvfs->next->ops->close) {
return NT_STATUS_NOT_IMPLEMENTED;
}
- return ntvfs->next->ops->fsinfo(ntvfs->next, req, fs);
+ return ntvfs->next->ops->close(ntvfs->next, req, io);
}
-/* printing specific operations */
-_PUBLIC_ NTSTATUS ntvfs_next_lpq(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_lpq *lpq)
+/* trans interface - used by IPC backend for pipes and RAP calls */
+_PUBLIC_ NTSTATUS ntvfs_next_trans(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ struct smb_trans2 *trans)
{
- if (!ntvfs->next || !ntvfs->next->ops->lpq) {
+ if (!ntvfs->next || !ntvfs->next->ops->trans) {
return NT_STATUS_NOT_IMPLEMENTED;
}
- return ntvfs->next->ops->lpq(ntvfs->next, req, lpq);
+ return ntvfs->next->ops->trans(ntvfs->next, req, trans);
}
/* trans2 interface - only used by CIFS backend to prover complete passthru for testing */
_PUBLIC_ NTSTATUS ntvfs_next_trans2(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_trans2 *trans2)
+ struct ntvfs_request *req,
+ struct smb_trans2 *trans2)
{
if (!ntvfs->next || !ntvfs->next->ops->trans2) {
return NT_STATUS_NOT_IMPLEMENTED;
@@ -589,55 +613,56 @@ _PUBLIC_ NTSTATUS ntvfs_next_trans2(struct ntvfs_module_context *ntvfs,
return ntvfs->next->ops->trans2(ntvfs->next, req, trans2);
}
-/* trans interface - used by IPC backend for pipes and RAP calls */
-_PUBLIC_ NTSTATUS ntvfs_next_trans(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_trans2 *trans)
+/*
+ change notify request
+*/
+_PUBLIC_ NTSTATUS ntvfs_next_notify(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ struct smb_notify *info)
{
- if (!ntvfs->next || !ntvfs->next->ops->trans) {
+ if (!ntvfs->next || !ntvfs->next->ops->notify) {
return NT_STATUS_NOT_IMPLEMENTED;
}
- return ntvfs->next->ops->trans(ntvfs->next, req, trans);
+ return ntvfs->next->ops->notify(ntvfs, req, info);
}
-/* logoff - called when a vuid is closed */
-_PUBLIC_ NTSTATUS ntvfs_next_logoff(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req)
+/* cancel - called to cancel an outstanding async request */
+_PUBLIC_ NTSTATUS ntvfs_next_cancel(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req)
{
- if (!ntvfs->next || !ntvfs->next->ops->logoff) {
+ if (!ntvfs->next || !ntvfs->next->ops->cancel) {
return NT_STATUS_NOT_IMPLEMENTED;
}
- return ntvfs->next->ops->logoff(ntvfs->next, req);
+ return ntvfs->next->ops->cancel(ntvfs->next, req);
}
-/* async_setup - called when setting up for a async request */
-_PUBLIC_ NTSTATUS ntvfs_next_async_setup(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req,
- void *private)
+/* printing specific operations */
+_PUBLIC_ NTSTATUS ntvfs_next_lpq(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_lpq *lpq)
{
- if (!ntvfs->next || !ntvfs->next->ops->async_setup) {
+ if (!ntvfs->next || !ntvfs->next->ops->lpq) {
return NT_STATUS_NOT_IMPLEMENTED;
}
- return ntvfs->next->ops->async_setup(ntvfs->next, req, private);
+ return ntvfs->next->ops->lpq(ntvfs->next, req, lpq);
}
-/* cancel - called to cancel an outstanding async request */
-_PUBLIC_ NTSTATUS ntvfs_next_cancel(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req)
+
+/* logoff - called when a vuid is closed */
+_PUBLIC_ NTSTATUS ntvfs_next_logoff(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req)
{
- if (!ntvfs->next || !ntvfs->next->ops->cancel) {
+ if (!ntvfs->next || !ntvfs->next->ops->logoff) {
return NT_STATUS_NOT_IMPLEMENTED;
}
- return ntvfs->next->ops->cancel(ntvfs->next, req);
+ return ntvfs->next->ops->logoff(ntvfs->next, req);
}
-/*
- change notify request
-*/
-_PUBLIC_ NTSTATUS ntvfs_next_notify(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_notify *info)
+_PUBLIC_ NTSTATUS ntvfs_next_exit(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req)
{
- if (!ntvfs->next || !ntvfs->next->ops->notify) {
+ if (!ntvfs->next || !ntvfs->next->ops->exit) {
return NT_STATUS_NOT_IMPLEMENTED;
}
- return ntvfs->next->ops->notify(ntvfs, req, info);
+ return ntvfs->next->ops->exit(ntvfs->next, req);
}
diff --git a/source4/ntvfs/ntvfs_util.c b/source4/ntvfs/ntvfs_util.c
index 861f266271b..c7b99d3d244 100644
--- a/source4/ntvfs/ntvfs_util.c
+++ b/source4/ntvfs/ntvfs_util.c
@@ -27,10 +27,10 @@
#include "ntvfs/ntvfs.h"
-_PUBLIC_ NTSTATUS ntvfs_async_state_push(struct smbsrv_request *req,
+_PUBLIC_ NTSTATUS ntvfs_async_state_push(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
void *private_data,
- void (*send_fn)(struct smbsrv_request *),
- struct ntvfs_module_context *ntvfs)
+ void (*send_fn)(struct ntvfs_request *))
{
struct ntvfs_async_state *async;
@@ -51,7 +51,7 @@ _PUBLIC_ NTSTATUS ntvfs_async_state_push(struct smbsrv_request *req,
return NT_STATUS_OK;
}
-_PUBLIC_ void ntvfs_async_state_pop(struct smbsrv_request *req)
+_PUBLIC_ void ntvfs_async_state_pop(struct ntvfs_request *req)
{
struct ntvfs_async_state *async;
diff --git a/source4/ntvfs/posix/pvfs_acl.c b/source4/ntvfs/posix/pvfs_acl.c
index a5cd919ba39..a03499b7337 100644
--- a/source4/ntvfs/posix/pvfs_acl.c
+++ b/source4/ntvfs/posix/pvfs_acl.c
@@ -63,7 +63,7 @@ static void pvfs_translate_generic_bits(struct security_acl *acl)
setup a default ACL for a file
*/
static NTSTATUS pvfs_default_acl(struct pvfs_state *pvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
struct pvfs_filename *name, int fd,
struct xattr_NTACL *acl)
{
@@ -183,7 +183,7 @@ static void normalise_sd_flags(struct security_descriptor *sd, uint32_t secinfo_
answer a setfileinfo for an ACL
*/
NTSTATUS pvfs_acl_set(struct pvfs_state *pvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
struct pvfs_filename *name, int fd,
uint32_t access_mask,
union smb_setfileinfo *info)
@@ -281,7 +281,7 @@ NTSTATUS pvfs_acl_set(struct pvfs_state *pvfs,
answer a fileinfo query for the ACL
*/
NTSTATUS pvfs_acl_query(struct pvfs_state *pvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
struct pvfs_filename *name, int fd,
union smb_fileinfo *info)
{
@@ -325,7 +325,7 @@ NTSTATUS pvfs_acl_query(struct pvfs_state *pvfs,
specific NT ACL
*/
NTSTATUS pvfs_access_check_unix(struct pvfs_state *pvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
struct pvfs_filename *name,
uint32_t *access_mask)
{
@@ -358,7 +358,7 @@ NTSTATUS pvfs_access_check_unix(struct pvfs_state *pvfs,
*access_mask is modified with the access actually granted
*/
NTSTATUS pvfs_access_check(struct pvfs_state *pvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
struct pvfs_filename *name,
uint32_t *access_mask)
{
@@ -410,7 +410,7 @@ NTSTATUS pvfs_access_check(struct pvfs_state *pvfs,
do not take or return an access check mask
*/
NTSTATUS pvfs_access_check_simple(struct pvfs_state *pvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
struct pvfs_filename *name,
uint32_t access_needed)
{
@@ -424,7 +424,7 @@ NTSTATUS pvfs_access_check_simple(struct pvfs_state *pvfs,
access check for creating a new file/directory
*/
NTSTATUS pvfs_access_check_create(struct pvfs_state *pvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
struct pvfs_filename *name,
uint32_t *access_mask)
{
@@ -452,7 +452,7 @@ NTSTATUS pvfs_access_check_create(struct pvfs_state *pvfs,
access check for creating a new file/directory - no access mask supplied
*/
NTSTATUS pvfs_access_check_parent(struct pvfs_state *pvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
struct pvfs_filename *name,
uint32_t access_mask)
{
@@ -578,7 +578,7 @@ static NTSTATUS pvfs_acl_inherit_aces(struct pvfs_state *pvfs,
as the default ACL applies anyway
*/
NTSTATUS pvfs_acl_inherit(struct pvfs_state *pvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
struct pvfs_filename *name,
int fd)
{
diff --git a/source4/ntvfs/posix/pvfs_flush.c b/source4/ntvfs/posix/pvfs_flush.c
index 5c1132db19f..bf6e23d520a 100644
--- a/source4/ntvfs/posix/pvfs_flush.c
+++ b/source4/ntvfs/posix/pvfs_flush.c
@@ -40,7 +40,7 @@ static void pvfs_flush_file(struct pvfs_state *pvfs, struct pvfs_file *f)
flush a fnum
*/
NTSTATUS pvfs_flush(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_flush *io)
+ struct ntvfs_request *req, struct smb_flush *io)
{
struct pvfs_state *pvfs = ntvfs->private_data;
struct pvfs_file *f;
diff --git a/source4/ntvfs/posix/pvfs_fsinfo.c b/source4/ntvfs/posix/pvfs_fsinfo.c
index be87599b878..6b8f0504f22 100644
--- a/source4/ntvfs/posix/pvfs_fsinfo.c
+++ b/source4/ntvfs/posix/pvfs_fsinfo.c
@@ -79,7 +79,7 @@ static NTSTATUS pvfs_cache_base_fs_uuid(struct pvfs_state *pvfs, struct stat *st
return filesystem space info
*/
NTSTATUS pvfs_fsinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_fsinfo *fs)
+ struct ntvfs_request *req, union smb_fsinfo *fs)
{
NTSTATUS status;
struct pvfs_state *pvfs = ntvfs->private_data;
diff --git a/source4/ntvfs/posix/pvfs_ioctl.c b/source4/ntvfs/posix/pvfs_ioctl.c
index b35a98fa875..aaa9db9986c 100644
--- a/source4/ntvfs/posix/pvfs_ioctl.c
+++ b/source4/ntvfs/posix/pvfs_ioctl.c
@@ -28,7 +28,7 @@
old ioctl interface
*/
static NTSTATUS pvfs_ioctl_old(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_ioctl *io)
+ struct ntvfs_request *req, union smb_ioctl *io)
{
return NT_STATUS_DOS(ERRSRV, ERRerror);
}
@@ -37,7 +37,7 @@ static NTSTATUS pvfs_ioctl_old(struct ntvfs_module_context *ntvfs,
nt ioctl interface
*/
static NTSTATUS pvfs_ntioctl(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_ioctl *io)
+ struct ntvfs_request *req, union smb_ioctl *io)
{
struct pvfs_state *pvfs = ntvfs->private_data;
struct pvfs_file *f;
@@ -62,7 +62,7 @@ static NTSTATUS pvfs_ntioctl(struct ntvfs_module_context *ntvfs,
ioctl interface
*/
NTSTATUS pvfs_ioctl(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_ioctl *io)
+ struct ntvfs_request *req, union smb_ioctl *io)
{
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
diff --git a/source4/ntvfs/posix/pvfs_lock.c b/source4/ntvfs/posix/pvfs_lock.c
index 5031e4cef7a..d2317c18529 100644
--- a/source4/ntvfs/posix/pvfs_lock.c
+++ b/source4/ntvfs/posix/pvfs_lock.c
@@ -53,7 +53,7 @@ struct pvfs_pending_lock {
struct pvfs_state *pvfs;
union smb_lock *lck;
struct pvfs_file *f;
- struct smbsrv_request *req;
+ struct ntvfs_request *req;
int pending_lock;
void *wait_handle;
struct timeval end_time;
@@ -64,7 +64,7 @@ struct pvfs_pending_lock {
the locks we did get and send an error
*/
static void pvfs_lock_async_failed(struct pvfs_state *pvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
struct pvfs_file *f,
struct smb_lock_entry *locks,
int i,
@@ -96,7 +96,7 @@ static void pvfs_pending_lock_continue(void *private, enum pvfs_wait_notice reas
struct pvfs_pending_lock *pending = private;
struct pvfs_state *pvfs = pending->pvfs;
struct pvfs_file *f = pending->f;
- struct smbsrv_request *req = pending->req;
+ struct ntvfs_request *req = pending->req;
union smb_lock *lck = pending->lck;
struct smb_lock_entry *locks;
enum brl_type rw;
@@ -234,7 +234,7 @@ void pvfs_lock_close(struct pvfs_state *pvfs, struct pvfs_file *f)
/*
cancel a set of locks
*/
-static NTSTATUS pvfs_lock_cancel(struct pvfs_state *pvfs, struct smbsrv_request *req, union smb_lock *lck,
+static NTSTATUS pvfs_lock_cancel(struct pvfs_state *pvfs, struct ntvfs_request *req, union smb_lock *lck,
struct pvfs_file *f)
{
struct pvfs_pending_lock *p;
@@ -271,7 +271,7 @@ static NTSTATUS pvfs_lock_cancel(struct pvfs_state *pvfs, struct smbsrv_request
lock or unlock a byte range
*/
NTSTATUS pvfs_lock(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_lock *lck)
+ struct ntvfs_request *req, union smb_lock *lck)
{
struct pvfs_state *pvfs = ntvfs->private_data;
struct pvfs_file *f;
@@ -282,7 +282,7 @@ NTSTATUS pvfs_lock(struct ntvfs_module_context *ntvfs,
NTSTATUS status;
if (lck->generic.level != RAW_LOCK_GENERIC) {
- return ntvfs_map_lock(req, lck, ntvfs);
+ return ntvfs_map_lock(ntvfs, req, lck);
}
f = pvfs_find_fd(pvfs, req, lck->lockx.in.fnum);
diff --git a/source4/ntvfs/posix/pvfs_mkdir.c b/source4/ntvfs/posix/pvfs_mkdir.c
index 591ec7ca843..fe2c5d0467f 100644
--- a/source4/ntvfs/posix/pvfs_mkdir.c
+++ b/source4/ntvfs/posix/pvfs_mkdir.c
@@ -29,7 +29,7 @@
create a directory with EAs
*/
static NTSTATUS pvfs_t2mkdir(struct pvfs_state *pvfs,
- struct smbsrv_request *req, union smb_mkdir *md)
+ struct ntvfs_request *req, union smb_mkdir *md)
{
NTSTATUS status;
struct pvfs_filename *name;
@@ -90,7 +90,7 @@ static NTSTATUS pvfs_t2mkdir(struct pvfs_state *pvfs,
create a directory
*/
NTSTATUS pvfs_mkdir(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_mkdir *md)
+ struct ntvfs_request *req, union smb_mkdir *md)
{
struct pvfs_state *pvfs = ntvfs->private_data;
NTSTATUS status;
@@ -142,7 +142,7 @@ NTSTATUS pvfs_mkdir(struct ntvfs_module_context *ntvfs,
remove a directory
*/
NTSTATUS pvfs_rmdir(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_rmdir *rd)
+ struct ntvfs_request *req, struct smb_rmdir *rd)
{
struct pvfs_state *pvfs = ntvfs->private_data;
NTSTATUS status;
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c
index e24887ca96f..618ddf141b4 100644
--- a/source4/ntvfs/posix/pvfs_open.c
+++ b/source4/ntvfs/posix/pvfs_open.c
@@ -39,7 +39,7 @@
find open file handle given fnum
*/
struct pvfs_file *pvfs_find_fd(struct pvfs_state *pvfs,
- struct smbsrv_request *req, uint16_t fnum)
+ struct ntvfs_request *req, uint16_t fnum)
{
struct pvfs_file *f;
@@ -123,7 +123,7 @@ static int pvfs_dir_fnum_destructor(void *p)
setup any EAs and the ACL on newly created files/directories
*/
static NTSTATUS pvfs_open_setup_eas_acl(struct pvfs_state *pvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
struct pvfs_filename *name,
int fd, int fnum,
union smb_open *io)
@@ -186,7 +186,7 @@ static NTSTATUS pvfs_locking_key(struct pvfs_filename *name,
open a directory
*/
static NTSTATUS pvfs_open_directory(struct pvfs_state *pvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
struct pvfs_filename *name,
union smb_open *io)
{
@@ -537,7 +537,7 @@ static NTSTATUS pvfs_brl_locking_key(struct pvfs_filename *name,
create a new file
*/
static NTSTATUS pvfs_create_file(struct pvfs_state *pvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
struct pvfs_filename *name,
union smb_open *io)
{
@@ -743,7 +743,7 @@ cleanup_delete:
*/
struct pvfs_open_retry {
struct ntvfs_module_context *ntvfs;
- struct smbsrv_request *req;
+ struct ntvfs_request *req;
union smb_open *io;
void *wait_handle;
DATA_BLOB odb_locking_key;
@@ -772,7 +772,7 @@ static void pvfs_open_retry(void *private, enum pvfs_wait_notice reason)
{
struct pvfs_open_retry *r = private;
struct ntvfs_module_context *ntvfs = r->ntvfs;
- struct smbsrv_request *req = r->req;
+ struct ntvfs_request *req = r->req;
union smb_open *io = r->io;
NTSTATUS status;
@@ -828,7 +828,7 @@ static void pvfs_open_retry(void *private, enum pvfs_wait_notice reason)
open processing continues.
*/
static NTSTATUS pvfs_open_deny_dos(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_open *io,
+ struct ntvfs_request *req, union smb_open *io,
struct pvfs_file *f, struct odb_lock *lck)
{
struct pvfs_state *pvfs = ntvfs->private_data;
@@ -904,7 +904,7 @@ static NTSTATUS pvfs_open_deny_dos(struct ntvfs_module_context *ntvfs,
setup for a open retry after a sharing violation
*/
static NTSTATUS pvfs_open_setup_retry(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
union smb_open *io,
struct pvfs_file *f,
struct odb_lock *lck)
@@ -964,7 +964,7 @@ static NTSTATUS pvfs_open_setup_retry(struct ntvfs_module_context *ntvfs,
open a file
*/
NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_open *io)
+ struct ntvfs_request *req, union smb_open *io)
{
struct pvfs_state *pvfs = ntvfs->private_data;
int flags;
@@ -982,7 +982,7 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs,
different open calls. */
if (io->generic.level != RAW_OPEN_GENERIC &&
io->generic.level != RAW_OPEN_NTTRANS_CREATE) {
- return ntvfs_map_open(req, io, ntvfs);
+ return ntvfs_map_open(ntvfs, req, io);
}
/* resolve the cifs name to a posix name */
@@ -1264,7 +1264,7 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs,
close a file
*/
NTSTATUS pvfs_close(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_close *io)
+ struct ntvfs_request *req, union smb_close *io)
{
struct pvfs_state *pvfs = ntvfs->private_data;
struct pvfs_file *f;
@@ -1275,7 +1275,7 @@ NTSTATUS pvfs_close(struct ntvfs_module_context *ntvfs,
}
if (io->generic.level != RAW_CLOSE_CLOSE) {
- return ntvfs_map_close(req, io, ntvfs);
+ return ntvfs_map_close(ntvfs, req, io);
}
f = pvfs_find_fd(pvfs, req, io->close.in.fnum);
@@ -1303,7 +1303,7 @@ NTSTATUS pvfs_close(struct ntvfs_module_context *ntvfs,
logoff - close all file descriptors open by a vuid
*/
NTSTATUS pvfs_logoff(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req)
+ struct ntvfs_request *req)
{
struct pvfs_state *pvfs = ntvfs->private_data;
struct pvfs_file *f, *next;
@@ -1323,7 +1323,7 @@ NTSTATUS pvfs_logoff(struct ntvfs_module_context *ntvfs,
exit - close files for the current pid
*/
NTSTATUS pvfs_exit(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req)
+ struct ntvfs_request *req)
{
struct pvfs_state *pvfs = ntvfs->private_data;
struct pvfs_file *f, *next;
@@ -1343,7 +1343,7 @@ NTSTATUS pvfs_exit(struct ntvfs_module_context *ntvfs,
change the delete on close flag on an already open file
*/
NTSTATUS pvfs_set_delete_on_close(struct pvfs_state *pvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
struct pvfs_file *f, BOOL del_on_close)
{
struct odb_lock *lck;
@@ -1382,7 +1382,7 @@ NTSTATUS pvfs_set_delete_on_close(struct pvfs_state *pvfs,
already open file
*/
NTSTATUS pvfs_can_delete(struct pvfs_state *pvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
struct pvfs_filename *name,
struct odb_lock **lckp)
{
@@ -1427,7 +1427,7 @@ NTSTATUS pvfs_can_delete(struct pvfs_state *pvfs,
already open file
*/
NTSTATUS pvfs_can_rename(struct pvfs_state *pvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
struct pvfs_filename *name,
struct odb_lock **lckp)
{
@@ -1467,7 +1467,7 @@ NTSTATUS pvfs_can_rename(struct pvfs_state *pvfs,
already open file
*/
NTSTATUS pvfs_can_stat(struct pvfs_state *pvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
struct pvfs_filename *name)
{
NTSTATUS status;
diff --git a/source4/ntvfs/posix/pvfs_qfileinfo.c b/source4/ntvfs/posix/pvfs_qfileinfo.c
index ca26331373e..5d908cbee28 100644
--- a/source4/ntvfs/posix/pvfs_qfileinfo.c
+++ b/source4/ntvfs/posix/pvfs_qfileinfo.c
@@ -126,7 +126,7 @@ static NTSTATUS pvfs_query_all_eas(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx,
approximately map a struct pvfs_filename to a generic fileinfo struct
*/
static NTSTATUS pvfs_map_fileinfo(struct pvfs_state *pvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
struct pvfs_filename *name, union smb_fileinfo *info,
int fd)
{
@@ -282,7 +282,7 @@ static NTSTATUS pvfs_map_fileinfo(struct pvfs_state *pvfs,
return info on a pathname
*/
NTSTATUS pvfs_qpathinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_fileinfo *info)
+ struct ntvfs_request *req, union smb_fileinfo *info)
{
struct pvfs_state *pvfs = ntvfs->private_data;
struct pvfs_filename *name;
@@ -318,7 +318,7 @@ NTSTATUS pvfs_qpathinfo(struct ntvfs_module_context *ntvfs,
query info on a open file
*/
NTSTATUS pvfs_qfileinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_fileinfo *info)
+ struct ntvfs_request *req, union smb_fileinfo *info)
{
struct pvfs_state *pvfs = ntvfs->private_data;
struct pvfs_file *f;
diff --git a/source4/ntvfs/posix/pvfs_read.c b/source4/ntvfs/posix/pvfs_read.c
index fb656470b88..93a80609266 100644
--- a/source4/ntvfs/posix/pvfs_read.c
+++ b/source4/ntvfs/posix/pvfs_read.c
@@ -28,7 +28,7 @@
read from a file
*/
NTSTATUS pvfs_read(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_read *rd)
+ struct ntvfs_request *req, union smb_read *rd)
{
struct pvfs_state *pvfs = ntvfs->private_data;
ssize_t ret;
@@ -38,7 +38,7 @@ NTSTATUS pvfs_read(struct ntvfs_module_context *ntvfs,
uint32_t mask;
if (rd->generic.level != RAW_READ_READX) {
- return ntvfs_map_read(req, rd, ntvfs);
+ return ntvfs_map_read(ntvfs, req, rd);
}
f = pvfs_find_fd(pvfs, req, rd->readx.in.fnum);
diff --git a/source4/ntvfs/posix/pvfs_rename.c b/source4/ntvfs/posix/pvfs_rename.c
index 7f1f43e7193..81f6ef1bf72 100644
--- a/source4/ntvfs/posix/pvfs_rename.c
+++ b/source4/ntvfs/posix/pvfs_rename.c
@@ -121,7 +121,7 @@ static const char *pvfs_resolve_wildcard(TALLOC_CTX *mem_ctx,
rename one file from a wildcard set
*/
static NTSTATUS pvfs_rename_one(struct pvfs_state *pvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
const char *dir_path,
const char *fname1,
const char *fname2,
@@ -190,7 +190,7 @@ failed:
rename a set of files with wildcards
*/
static NTSTATUS pvfs_rename_wildcard(struct pvfs_state *pvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
union smb_rename *ren,
struct pvfs_filename *name1,
struct pvfs_filename *name2)
@@ -244,7 +244,7 @@ static NTSTATUS pvfs_rename_wildcard(struct pvfs_state *pvfs,
rename a set of files - SMBmv interface
*/
static NTSTATUS pvfs_rename_mv(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_rename *ren)
+ struct ntvfs_request *req, union smb_rename *ren)
{
struct pvfs_state *pvfs = ntvfs->private_data;
NTSTATUS status;
@@ -309,7 +309,7 @@ static NTSTATUS pvfs_rename_mv(struct ntvfs_module_context *ntvfs,
rename a set of files - ntrename interface
*/
static NTSTATUS pvfs_rename_nt(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_rename *ren)
+ struct ntvfs_request *req, union smb_rename *ren)
{
struct pvfs_state *pvfs = ntvfs->private_data;
NTSTATUS status;
@@ -408,7 +408,7 @@ static NTSTATUS pvfs_rename_nt(struct ntvfs_module_context *ntvfs,
rename a set of files - ntrename interface
*/
NTSTATUS pvfs_rename(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_rename *ren)
+ struct ntvfs_request *req, union smb_rename *ren)
{
switch (ren->generic.level) {
case RAW_RENAME_RENAME:
diff --git a/source4/ntvfs/posix/pvfs_search.c b/source4/ntvfs/posix/pvfs_search.c
index db197c7b621..6aa9163f1e1 100644
--- a/source4/ntvfs/posix/pvfs_search.c
+++ b/source4/ntvfs/posix/pvfs_search.c
@@ -323,7 +323,7 @@ static void pvfs_search_cleanup(struct pvfs_state *pvfs)
list files in a directory matching a wildcard pattern - old SMBsearch interface
*/
static NTSTATUS pvfs_search_first_old(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_search_first *io,
+ struct ntvfs_request *req, union smb_search_first *io,
void *search_private,
BOOL (*callback)(void *, union smb_search_data *))
{
@@ -411,7 +411,7 @@ static NTSTATUS pvfs_search_first_old(struct ntvfs_module_context *ntvfs,
/* continue a old style search */
static NTSTATUS pvfs_search_next_old(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_search_next *io,
+ struct ntvfs_request *req, union smb_search_next *io,
void *search_private,
BOOL (*callback)(void *, union smb_search_data *))
{
@@ -455,7 +455,7 @@ static NTSTATUS pvfs_search_next_old(struct ntvfs_module_context *ntvfs,
list files in a directory matching a wildcard pattern
*/
NTSTATUS pvfs_search_first(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_search_first *io,
+ struct ntvfs_request *req, union smb_search_first *io,
void *search_private,
BOOL (*callback)(void *, union smb_search_data *))
{
@@ -554,7 +554,7 @@ NTSTATUS pvfs_search_first(struct ntvfs_module_context *ntvfs,
/* continue a search */
NTSTATUS pvfs_search_next(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_search_next *io,
+ struct ntvfs_request *req, union smb_search_next *io,
void *search_private,
BOOL (*callback)(void *, union smb_search_data *))
{
@@ -619,7 +619,7 @@ NTSTATUS pvfs_search_next(struct ntvfs_module_context *ntvfs,
/* close a search */
NTSTATUS pvfs_search_close(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_search_close *io)
+ struct ntvfs_request *req, union smb_search_close *io)
{
struct pvfs_state *pvfs = ntvfs->private_data;
struct pvfs_search_state *search;
diff --git a/source4/ntvfs/posix/pvfs_seek.c b/source4/ntvfs/posix/pvfs_seek.c
index c4dd30bd85c..33656e40048 100644
--- a/source4/ntvfs/posix/pvfs_seek.c
+++ b/source4/ntvfs/posix/pvfs_seek.c
@@ -27,7 +27,7 @@
seek in a file
*/
NTSTATUS pvfs_seek(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_seek *io)
+ struct ntvfs_request *req, struct smb_seek *io)
{
struct pvfs_state *pvfs = ntvfs->private_data;
struct pvfs_file *f;
diff --git a/source4/ntvfs/posix/pvfs_setfileinfo.c b/source4/ntvfs/posix/pvfs_setfileinfo.c
index 69c9cd5e4a1..db031496425 100644
--- a/source4/ntvfs/posix/pvfs_setfileinfo.c
+++ b/source4/ntvfs/posix/pvfs_setfileinfo.c
@@ -69,7 +69,7 @@ static uint32_t pvfs_setfileinfo_access(union smb_setfileinfo *info)
rename_information level
*/
static NTSTATUS pvfs_setfileinfo_rename(struct pvfs_state *pvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
struct pvfs_filename *name,
struct smb_rename_information *r)
{
@@ -238,7 +238,7 @@ NTSTATUS pvfs_setfileinfo_ea_set(struct pvfs_state *pvfs,
set info on a open file
*/
NTSTATUS pvfs_setfileinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
union smb_setfileinfo *info)
{
struct pvfs_state *pvfs = ntvfs->private_data;
@@ -425,7 +425,7 @@ NTSTATUS pvfs_setfileinfo(struct ntvfs_module_context *ntvfs,
set info on a pathname
*/
NTSTATUS pvfs_setpathinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_setfileinfo *info)
+ struct ntvfs_request *req, union smb_setfileinfo *info)
{
struct pvfs_state *pvfs = ntvfs->private_data;
struct pvfs_filename *name;
diff --git a/source4/ntvfs/posix/pvfs_unlink.c b/source4/ntvfs/posix/pvfs_unlink.c
index 8eea2c47b89..ee90adba455 100644
--- a/source4/ntvfs/posix/pvfs_unlink.c
+++ b/source4/ntvfs/posix/pvfs_unlink.c
@@ -28,7 +28,7 @@
unlink a stream
*/
static NTSTATUS pvfs_unlink_stream(struct pvfs_state *pvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
struct pvfs_filename *name,
uint16_t attrib)
{
@@ -58,7 +58,7 @@ static NTSTATUS pvfs_unlink_stream(struct pvfs_state *pvfs,
unlink one file
*/
static NTSTATUS pvfs_unlink_one(struct pvfs_state *pvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
const char *unix_path,
const char *fname, uint32_t attrib)
{
@@ -113,7 +113,7 @@ static NTSTATUS pvfs_unlink_one(struct pvfs_state *pvfs,
The name can contain CIFS wildcards, but rarely does (except with OS/2 clients)
*/
NTSTATUS pvfs_unlink(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_unlink *unl)
+ struct ntvfs_request *req, struct smb_unlink *unl)
{
struct pvfs_state *pvfs = ntvfs->private_data;
struct pvfs_dir *dir;
diff --git a/source4/ntvfs/posix/pvfs_wait.c b/source4/ntvfs/posix/pvfs_wait.c
index c3633884088..241382ba0bc 100644
--- a/source4/ntvfs/posix/pvfs_wait.c
+++ b/source4/ntvfs/posix/pvfs_wait.c
@@ -37,7 +37,7 @@ struct pvfs_wait {
int msg_type;
struct messaging_context *msg_ctx;
struct event_context *ev;
- struct smbsrv_request *req;
+ struct ntvfs_request *req;
enum pvfs_wait_notice reason;
};
@@ -47,7 +47,7 @@ struct pvfs_wait {
previous ntvfs handlers in the chain (such as security context)
*/
NTSTATUS pvfs_async_setup(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, void *private)
+ struct ntvfs_request *req, void *private)
{
struct pvfs_wait *pwait = private;
pwait->handler(pwait->private, pwait->reason);
@@ -61,7 +61,7 @@ static void pvfs_wait_dispatch(struct messaging_context *msg, void *private, uin
uint32_t src, DATA_BLOB *data)
{
struct pvfs_wait *pwait = private;
- struct smbsrv_request *req;
+ struct ntvfs_request *req;
/* we need to check that this one is for us. See
messaging_send_ptr() for the other side of this.
@@ -90,7 +90,7 @@ static void pvfs_wait_timeout(struct event_context *ev,
struct timed_event *te, struct timeval t, void *private)
{
struct pvfs_wait *pwait = talloc_get_type(private, struct pvfs_wait);
- struct smbsrv_request *req = pwait->req;
+ struct ntvfs_request *req = pwait->req;
pwait->reason = PVFS_WAIT_TIMEOUT;
@@ -118,8 +118,8 @@ static int pvfs_wait_destructor(void *ptr)
the return value is a handle. To stop waiting talloc_free this
handle.
*/
- void *pvfs_wait_message(struct pvfs_state *pvfs,
- struct smbsrv_request *req,
+void *pvfs_wait_message(struct pvfs_state *pvfs,
+ struct ntvfs_request *req,
int msg_type,
struct timeval end_time,
void (*fn)(void *, enum pvfs_wait_notice),
@@ -167,7 +167,7 @@ static int pvfs_wait_destructor(void *ptr)
/*
cancel an outstanding async request
*/
-NTSTATUS pvfs_cancel(struct ntvfs_module_context *ntvfs, struct smbsrv_request *req)
+NTSTATUS pvfs_cancel(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req)
{
struct pvfs_state *pvfs = ntvfs->private_data;
struct pvfs_wait *pwait;
diff --git a/source4/ntvfs/posix/pvfs_write.c b/source4/ntvfs/posix/pvfs_write.c
index 025ea3f3eb8..d206e3b830b 100644
--- a/source4/ntvfs/posix/pvfs_write.c
+++ b/source4/ntvfs/posix/pvfs_write.c
@@ -29,7 +29,7 @@
write to a file
*/
NTSTATUS pvfs_write(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_write *wr)
+ struct ntvfs_request *req, union smb_write *wr)
{
struct pvfs_state *pvfs = ntvfs->private_data;
ssize_t ret;
@@ -37,7 +37,7 @@ NTSTATUS pvfs_write(struct ntvfs_module_context *ntvfs,
NTSTATUS status;
if (wr->generic.level != RAW_WRITE_WRITEX) {
- return ntvfs_map_write(req, wr, ntvfs);
+ return ntvfs_map_write(ntvfs, req, wr);
}
f = pvfs_find_fd(pvfs, req, wr->writex.in.fnum);
diff --git a/source4/ntvfs/posix/vfs_posix.c b/source4/ntvfs/posix/vfs_posix.c
index e600be446a0..66fbc4bb4c1 100644
--- a/source4/ntvfs/posix/vfs_posix.c
+++ b/source4/ntvfs/posix/vfs_posix.c
@@ -112,7 +112,7 @@ static void pvfs_setup_options(struct pvfs_state *pvfs)
that comes later)
*/
static NTSTATUS pvfs_connect(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, const char *sharename)
+ struct ntvfs_request *req, const char *sharename)
{
struct smbsrv_tcon *tcon = req->tcon;
struct pvfs_state *pvfs;
@@ -194,8 +194,7 @@ static NTSTATUS pvfs_connect(struct ntvfs_module_context *ntvfs,
/*
disconnect from a share
*/
-static NTSTATUS pvfs_disconnect(struct ntvfs_module_context *ntvfs,
- struct smbsrv_tcon *tcon)
+static NTSTATUS pvfs_disconnect(struct ntvfs_module_context *ntvfs)
{
return NT_STATUS_OK;
}
@@ -204,7 +203,7 @@ static NTSTATUS pvfs_disconnect(struct ntvfs_module_context *ntvfs,
check if a directory exists
*/
static NTSTATUS pvfs_chkpath(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_chkpath *cp)
+ struct ntvfs_request *req, struct smb_chkpath *cp)
{
struct pvfs_state *pvfs = ntvfs->private_data;
struct pvfs_filename *name;
@@ -229,7 +228,7 @@ static NTSTATUS pvfs_chkpath(struct ntvfs_module_context *ntvfs,
copy a set of files
*/
static NTSTATUS pvfs_copy(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_copy *cp)
+ struct ntvfs_request *req, struct smb_copy *cp)
{
DEBUG(0,("pvfs_copy not implemented\n"));
return NT_STATUS_NOT_SUPPORTED;
@@ -239,14 +238,14 @@ static NTSTATUS pvfs_copy(struct ntvfs_module_context *ntvfs,
return print queue info
*/
static NTSTATUS pvfs_lpq(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_lpq *lpq)
+ struct ntvfs_request *req, union smb_lpq *lpq)
{
return NT_STATUS_NOT_SUPPORTED;
}
/* SMBtrans - not used on file shares */
static NTSTATUS pvfs_trans(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_trans2 *trans2)
+ struct ntvfs_request *req, struct smb_trans2 *trans2)
{
return NT_STATUS_ACCESS_DENIED;
}
@@ -270,7 +269,7 @@ NTSTATUS ntvfs_posix_init(void)
ops.chkpath = pvfs_chkpath;
ops.qpathinfo = pvfs_qpathinfo;
ops.setpathinfo = pvfs_setpathinfo;
- ops.openfile = pvfs_open;
+ ops.open = pvfs_open;
ops.mkdir = pvfs_mkdir;
ops.rmdir = pvfs_rmdir;
ops.rename = pvfs_rename;
diff --git a/source4/ntvfs/posix/vfs_posix.h b/source4/ntvfs/posix/vfs_posix.h
index 3219631ebb3..a22b55198ce 100644
--- a/source4/ntvfs/posix/vfs_posix.h
+++ b/source4/ntvfs/posix/vfs_posix.h
@@ -195,16 +195,6 @@ struct pvfs_dir;
/* types of notification for pvfs wait events */
enum pvfs_wait_notice {PVFS_WAIT_EVENT, PVFS_WAIT_TIMEOUT, PVFS_WAIT_CANCEL};
-
-/* putting this prototype here avoids us having to expose this whole header in the
- rest of Samba */
-void *pvfs_wait_message(struct pvfs_state *pvfs,
- struct smbsrv_request *req,
- int msg_type,
- struct timeval end_time,
- void (*fn)(void *, enum pvfs_wait_notice),
- void *private);
-
#include "ntvfs/posix/vfs_posix_proto.h"
#endif /* _VFS_POSIX_H_ */
diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c
index b0c34b2abed..1c7699566d2 100644
--- a/source4/ntvfs/print/vfs_print.c
+++ b/source4/ntvfs/print/vfs_print.c
@@ -33,7 +33,7 @@
is available
*/
static NTSTATUS print_connect(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, const char *sharename)
+ struct ntvfs_request *req, const char *sharename)
{
struct smbsrv_tcon *tcon = req->tcon;
@@ -49,8 +49,7 @@ static NTSTATUS print_connect(struct ntvfs_module_context *ntvfs,
/*
disconnect from a share
*/
-static NTSTATUS print_disconnect(struct ntvfs_module_context *ntvfs,
- struct smbsrv_tcon *tcon)
+static NTSTATUS print_disconnect(struct ntvfs_module_context *ntvfs)
{
return NT_STATUS_OK;
}
@@ -59,7 +58,7 @@ static NTSTATUS print_disconnect(struct ntvfs_module_context *ntvfs,
lots of operations are not allowed on printing shares - mostly return NT_STATUS_ACCESS_DENIED
*/
static NTSTATUS print_unlink(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_unlink *unl)
+ struct ntvfs_request *req, struct smb_unlink *unl)
{
return NT_STATUS_ACCESS_DENIED;
}
@@ -69,7 +68,7 @@ static NTSTATUS print_unlink(struct ntvfs_module_context *ntvfs,
ioctl - used for job query
*/
static NTSTATUS print_ioctl(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_ioctl *io)
+ struct ntvfs_request *req, union smb_ioctl *io)
{
char *p;
diff --git a/source4/ntvfs/simple/svfs_util.c b/source4/ntvfs/simple/svfs_util.c
index ab1eccc5518..0a9701f8b3d 100644
--- a/source4/ntvfs/simple/svfs_util.c
+++ b/source4/ntvfs/simple/svfs_util.c
@@ -35,7 +35,7 @@
convert a windows path to a unix path - don't do any manging or case sensitive handling
*/
char *svfs_unix_path(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, const char *name)
+ struct ntvfs_request *req, const char *name)
{
struct svfs_private *private = ntvfs->private_data;
char *ret;
@@ -58,7 +58,7 @@ char *svfs_unix_path(struct ntvfs_module_context *ntvfs,
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 smbsrv_request *req, const char *unix_path)
+struct svfs_dir *svfs_list_unix(TALLOC_CTX *mem_ctx, struct ntvfs_request *req, const char *unix_path)
{
char *p, *mask;
struct svfs_dir *dir;
@@ -141,7 +141,7 @@ struct svfs_dir *svfs_list_unix(TALLOC_CTX *mem_ctx, struct smbsrv_request *req,
returned names are separate unix and DOS names. The returned names
are relative to the directory
*/
-struct svfs_dir *svfs_list(struct ntvfs_module_context *ntvfs, struct smbsrv_request *req, const char *pattern)
+struct svfs_dir *svfs_list(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, const char *pattern)
{
struct svfs_private *private = ntvfs->private_data;
char *unix_path;
diff --git a/source4/ntvfs/simple/vfs_simple.c b/source4/ntvfs/simple/vfs_simple.c
index ce148772772..be9a680d5b2 100644
--- a/source4/ntvfs/simple/vfs_simple.c
+++ b/source4/ntvfs/simple/vfs_simple.c
@@ -49,7 +49,7 @@
that comes later)
*/
static NTSTATUS svfs_connect(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, const char *sharename)
+ struct ntvfs_request *req, const char *sharename)
{
struct stat st;
struct smbsrv_tcon *tcon = req->tcon;
@@ -82,8 +82,7 @@ static NTSTATUS svfs_connect(struct ntvfs_module_context *ntvfs,
/*
disconnect from a share
*/
-static NTSTATUS svfs_disconnect(struct ntvfs_module_context *ntvfs,
- struct smbsrv_tcon *tcon)
+static NTSTATUS svfs_disconnect(struct ntvfs_module_context *ntvfs)
{
return NT_STATUS_OK;
}
@@ -107,7 +106,7 @@ static struct svfs_file *find_fd(struct svfs_private *private, int fd)
The name can contain CIFS wildcards, but rarely does (except with OS/2 clients)
*/
static NTSTATUS svfs_unlink(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_unlink *unl)
+ struct ntvfs_request *req, struct smb_unlink *unl)
{
char *unix_path;
@@ -128,7 +127,7 @@ static NTSTATUS svfs_unlink(struct ntvfs_module_context *ntvfs,
ioctl interface - we don't do any
*/
static NTSTATUS svfs_ioctl(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_ioctl *io)
+ struct ntvfs_request *req, union smb_ioctl *io)
{
return NT_STATUS_INVALID_PARAMETER;
}
@@ -137,7 +136,7 @@ static NTSTATUS svfs_ioctl(struct ntvfs_module_context *ntvfs,
check if a directory exists
*/
static NTSTATUS svfs_chkpath(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_chkpath *cp)
+ struct ntvfs_request *req, struct smb_chkpath *cp)
{
char *unix_path;
struct stat st;
@@ -170,7 +169,7 @@ static uint64_t svfs_file_id(struct stat *st)
approximately map a struct stat to a generic fileinfo struct
*/
static NTSTATUS svfs_map_fileinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_fileinfo *info,
+ struct ntvfs_request *req, union smb_fileinfo *info,
struct stat *st, const char *unix_path)
{
struct svfs_dir *dir = NULL;
@@ -246,14 +245,14 @@ static NTSTATUS svfs_map_fileinfo(struct ntvfs_module_context *ntvfs,
return info on a pathname
*/
static NTSTATUS svfs_qpathinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_fileinfo *info)
+ struct ntvfs_request *req, union smb_fileinfo *info)
{
char *unix_path;
struct stat st;
DEBUG(19,("svfs_qpathinfo: file %s level 0x%x\n", info->generic.in.fname, info->generic.level));
if (info->generic.level != RAW_FILEINFO_GENERIC) {
- return ntvfs_map_qpathinfo(req, info, ntvfs);
+ return ntvfs_map_qpathinfo(ntvfs, req, info);
}
unix_path = svfs_unix_path(ntvfs, req, info->generic.in.fname);
@@ -270,14 +269,14 @@ static NTSTATUS svfs_qpathinfo(struct ntvfs_module_context *ntvfs,
query info on a open file
*/
static NTSTATUS svfs_qfileinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_fileinfo *info)
+ struct ntvfs_request *req, union smb_fileinfo *info)
{
struct svfs_private *private = ntvfs->private_data;
struct svfs_file *f;
struct stat st;
if (info->generic.level != RAW_FILEINFO_GENERIC) {
- return ntvfs_map_qfileinfo(req, info, ntvfs);
+ return ntvfs_map_qfileinfo(ntvfs, req, info);
}
f = find_fd(private, info->generic.in.fnum);
@@ -297,7 +296,7 @@ static NTSTATUS svfs_qfileinfo(struct ntvfs_module_context *ntvfs,
open a file
*/
static NTSTATUS svfs_open(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_open *io)
+ struct ntvfs_request *req, union smb_open *io)
{
struct svfs_private *private = ntvfs->private_data;
char *unix_path;
@@ -307,7 +306,7 @@ static NTSTATUS svfs_open(struct ntvfs_module_context *ntvfs,
int create_flags, rdwr_flags;
if (io->generic.level != RAW_OPEN_GENERIC) {
- return ntvfs_map_open(req, io, ntvfs);
+ return ntvfs_map_open(ntvfs, req, io);
}
if (lp_readonly(req->tcon->service)) {
@@ -400,7 +399,7 @@ do_open:
create a directory
*/
static NTSTATUS svfs_mkdir(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_mkdir *md)
+ struct ntvfs_request *req, union smb_mkdir *md)
{
char *unix_path;
@@ -423,7 +422,7 @@ static NTSTATUS svfs_mkdir(struct ntvfs_module_context *ntvfs,
remove a directory
*/
static NTSTATUS svfs_rmdir(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_rmdir *rd)
+ struct ntvfs_request *req, struct smb_rmdir *rd)
{
char *unix_path;
@@ -442,7 +441,7 @@ static NTSTATUS svfs_rmdir(struct ntvfs_module_context *ntvfs,
rename a set of files
*/
static NTSTATUS svfs_rename(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_rename *ren)
+ struct ntvfs_request *req, union smb_rename *ren)
{
char *unix_path1, *unix_path2;
@@ -466,7 +465,7 @@ static NTSTATUS svfs_rename(struct ntvfs_module_context *ntvfs,
copy a set of files
*/
static NTSTATUS svfs_copy(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_copy *cp)
+ struct ntvfs_request *req, struct smb_copy *cp)
{
return NT_STATUS_NOT_SUPPORTED;
}
@@ -475,7 +474,7 @@ static NTSTATUS svfs_copy(struct ntvfs_module_context *ntvfs,
read from a file
*/
static NTSTATUS svfs_read(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_read *rd)
+ struct ntvfs_request *req, union smb_read *rd)
{
ssize_t ret;
@@ -502,12 +501,12 @@ static NTSTATUS svfs_read(struct ntvfs_module_context *ntvfs,
write to a file
*/
static NTSTATUS svfs_write(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_write *wr)
+ struct ntvfs_request *req, union smb_write *wr)
{
ssize_t ret;
if (wr->generic.level != RAW_WRITE_WRITEX) {
- return ntvfs_map_write(req, wr, ntvfs);
+ return ntvfs_map_write(ntvfs, req, wr);
}
CHECK_READ_ONLY(req);
@@ -530,7 +529,7 @@ static NTSTATUS svfs_write(struct ntvfs_module_context *ntvfs,
seek in a file
*/
static NTSTATUS svfs_seek(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_seek *io)
+ struct ntvfs_request *req, struct smb_seek *io)
{
return NT_STATUS_NOT_SUPPORTED;
}
@@ -539,7 +538,7 @@ static NTSTATUS svfs_seek(struct ntvfs_module_context *ntvfs,
flush a file
*/
static NTSTATUS svfs_flush(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_flush *io)
+ struct ntvfs_request *req, struct smb_flush *io)
{
fsync(io->in.fnum);
return NT_STATUS_OK;
@@ -549,7 +548,7 @@ static NTSTATUS svfs_flush(struct ntvfs_module_context *ntvfs,
close a file
*/
static NTSTATUS svfs_close(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_close *io)
+ struct ntvfs_request *req, union smb_close *io)
{
struct svfs_private *private = ntvfs->private_data;
struct svfs_file *f;
@@ -579,7 +578,7 @@ static NTSTATUS svfs_close(struct ntvfs_module_context *ntvfs,
exit - closing files
*/
static NTSTATUS svfs_exit(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req)
+ struct ntvfs_request *req)
{
return NT_STATUS_NOT_SUPPORTED;
}
@@ -588,7 +587,7 @@ static NTSTATUS svfs_exit(struct ntvfs_module_context *ntvfs,
logoff - closing files
*/
static NTSTATUS svfs_logoff(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req)
+ struct ntvfs_request *req)
{
return NT_STATUS_NOT_SUPPORTED;
}
@@ -597,7 +596,7 @@ static NTSTATUS svfs_logoff(struct ntvfs_module_context *ntvfs,
setup for an async call
*/
static NTSTATUS svfs_async_setup(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
void *private)
{
return NT_STATUS_OK;
@@ -606,7 +605,7 @@ static NTSTATUS svfs_async_setup(struct ntvfs_module_context *ntvfs,
/*
cancel an async call
*/
-static NTSTATUS svfs_cancel(struct ntvfs_module_context *ntvfs, struct smbsrv_request *req)
+static NTSTATUS svfs_cancel(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req)
{
return NT_STATUS_UNSUCCESSFUL;
}
@@ -615,7 +614,7 @@ static NTSTATUS svfs_cancel(struct ntvfs_module_context *ntvfs, struct smbsrv_re
lock a byte range
*/
static NTSTATUS svfs_lock(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_lock *lck)
+ struct ntvfs_request *req, union smb_lock *lck)
{
DEBUG(0,("REWRITE: not doing byte range locking!\n"));
return NT_STATUS_OK;
@@ -625,7 +624,7 @@ static NTSTATUS svfs_lock(struct ntvfs_module_context *ntvfs,
set info on a pathname
*/
static NTSTATUS svfs_setpathinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_setfileinfo *st)
+ struct ntvfs_request *req, union smb_setfileinfo *st)
{
CHECK_READ_ONLY(req);
@@ -636,7 +635,7 @@ static NTSTATUS svfs_setpathinfo(struct ntvfs_module_context *ntvfs,
set info on a open file
*/
static NTSTATUS svfs_setfileinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
union smb_setfileinfo *info)
{
struct utimbuf unix_times;
@@ -684,13 +683,13 @@ static NTSTATUS svfs_setfileinfo(struct ntvfs_module_context *ntvfs,
return filesystem space info
*/
static NTSTATUS svfs_fsinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_fsinfo *fs)
+ struct ntvfs_request *req, union smb_fsinfo *fs)
{
struct svfs_private *private = ntvfs->private_data;
struct stat st;
if (fs->generic.level != RAW_QFS_GENERIC) {
- return ntvfs_map_fsinfo(req, fs, ntvfs);
+ return ntvfs_map_fsinfo(ntvfs, req, fs);
}
if (sys_fsusage(private->connectpath,
@@ -726,13 +725,13 @@ static NTSTATUS svfs_fsinfo(struct ntvfs_module_context *ntvfs,
return filesystem attribute info
*/
static NTSTATUS svfs_fsattr(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_fsattr *fs)
+ struct ntvfs_request *req, union smb_fsattr *fs)
{
struct stat st;
struct svfs_private *private = ntvfs->private_data;
if (fs->generic.level != RAW_FSATTR_GENERIC) {
- return ntvfs_map_fsattr(req, fs, ntvfs);
+ return ntvfs_map_fsattr(ntvfs, req, fs);
}
if (stat(private->connectpath, &st) == -1) {
@@ -758,7 +757,7 @@ static NTSTATUS svfs_fsattr(struct ntvfs_module_context *ntvfs,
return print queue info
*/
static NTSTATUS svfs_lpq(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_lpq *lpq)
+ struct ntvfs_request *req, union smb_lpq *lpq)
{
return NT_STATUS_NOT_SUPPORTED;
}
@@ -767,7 +766,7 @@ static NTSTATUS svfs_lpq(struct ntvfs_module_context *ntvfs,
list files in a directory matching a wildcard pattern
*/
static NTSTATUS svfs_search_first(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_search_first *io,
+ struct ntvfs_request *req, union smb_search_first *io,
void *search_private,
BOOL (*callback)(void *, union smb_search_data *))
{
@@ -837,7 +836,7 @@ static NTSTATUS svfs_search_first(struct ntvfs_module_context *ntvfs,
/* continue a search */
static NTSTATUS svfs_search_next(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_search_next *io,
+ struct ntvfs_request *req, union smb_search_next *io,
void *search_private,
BOOL (*callback)(void *, union smb_search_data *))
{
@@ -925,7 +924,7 @@ found:
/* close a search */
static NTSTATUS svfs_search_close(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_search_close *io)
+ struct ntvfs_request *req, union smb_search_close *io)
{
struct svfs_private *private = ntvfs->private_data;
struct search_state *search;
@@ -947,7 +946,7 @@ static NTSTATUS svfs_search_close(struct ntvfs_module_context *ntvfs,
/* SMBtrans - not used on file shares */
static NTSTATUS svfs_trans(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_trans2 *trans2)
+ struct ntvfs_request *req, struct smb_trans2 *trans2)
{
return NT_STATUS_ACCESS_DENIED;
}
@@ -970,7 +969,7 @@ NTSTATUS ntvfs_simple_init(void)
ops.chkpath = svfs_chkpath;
ops.qpathinfo = svfs_qpathinfo;
ops.setpathinfo = svfs_setpathinfo;
- ops.openfile = svfs_open;
+ ops.open = svfs_open;
ops.mkdir = svfs_mkdir;
ops.rmdir = svfs_rmdir;
ops.rename = svfs_rename;
diff --git a/source4/ntvfs/unixuid/vfs_unixuid.c b/source4/ntvfs/unixuid/vfs_unixuid.c
index df627bd2d17..3b36a6a8916 100644
--- a/source4/ntvfs/unixuid/vfs_unixuid.c
+++ b/source4/ntvfs/unixuid/vfs_unixuid.c
@@ -96,7 +96,7 @@ static NTSTATUS set_unix_security(struct unix_sec_ctx *sec)
form a unix_sec_ctx from the current security_token
*/
static NTSTATUS nt_token_to_unix_security(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
struct security_token *token,
struct unix_sec_ctx **sec)
{
@@ -143,7 +143,7 @@ static NTSTATUS nt_token_to_unix_security(struct ntvfs_module_context *ntvfs,
setup our unix security context according to the session authentication info
*/
static NTSTATUS unixuid_setup_security(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct unix_sec_ctx **sec)
+ struct ntvfs_request *req, struct unix_sec_ctx **sec)
{
struct unixuid_private *private = ntvfs->private_data;
struct security_token *token;
@@ -202,7 +202,7 @@ static NTSTATUS unixuid_setup_security(struct ntvfs_module_context *ntvfs,
connect to a share - used when a tree_connect operation comes in.
*/
static NTSTATUS unixuid_connect(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, const char *sharename)
+ struct ntvfs_request *req, const char *sharename)
{
struct unixuid_private *private;
NTSTATUS status;
@@ -232,8 +232,7 @@ static NTSTATUS unixuid_connect(struct ntvfs_module_context *ntvfs,
/*
disconnect from a share
*/
-static NTSTATUS unixuid_disconnect(struct ntvfs_module_context *ntvfs,
- struct smbsrv_tcon *tcon)
+static NTSTATUS unixuid_disconnect(struct ntvfs_module_context *ntvfs)
{
struct unixuid_private *private = ntvfs->private_data;
NTSTATUS status;
@@ -241,7 +240,7 @@ static NTSTATUS unixuid_disconnect(struct ntvfs_module_context *ntvfs,
talloc_free(private);
ntvfs->private_data = NULL;
- status = ntvfs_next_disconnect(ntvfs, tcon);
+ status = ntvfs_next_disconnect(ntvfs);
return status;
}
@@ -251,7 +250,7 @@ static NTSTATUS unixuid_disconnect(struct ntvfs_module_context *ntvfs,
delete a file
*/
static NTSTATUS unixuid_unlink(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_unlink *unl)
+ struct ntvfs_request *req, struct smb_unlink *unl)
{
NTSTATUS status;
@@ -264,7 +263,7 @@ static NTSTATUS unixuid_unlink(struct ntvfs_module_context *ntvfs,
ioctl interface
*/
static NTSTATUS unixuid_ioctl(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_ioctl *io)
+ struct ntvfs_request *req, union smb_ioctl *io)
{
NTSTATUS status;
@@ -277,7 +276,7 @@ static NTSTATUS unixuid_ioctl(struct ntvfs_module_context *ntvfs,
check if a directory exists
*/
static NTSTATUS unixuid_chkpath(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_chkpath *cp)
+ struct ntvfs_request *req, struct smb_chkpath *cp)
{
NTSTATUS status;
@@ -290,7 +289,7 @@ static NTSTATUS unixuid_chkpath(struct ntvfs_module_context *ntvfs,
return info on a pathname
*/
static NTSTATUS unixuid_qpathinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_fileinfo *info)
+ struct ntvfs_request *req, union smb_fileinfo *info)
{
NTSTATUS status;
@@ -303,7 +302,7 @@ static NTSTATUS unixuid_qpathinfo(struct ntvfs_module_context *ntvfs,
query info on a open file
*/
static NTSTATUS unixuid_qfileinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_fileinfo *info)
+ struct ntvfs_request *req, union smb_fileinfo *info)
{
NTSTATUS status;
@@ -317,7 +316,7 @@ static NTSTATUS unixuid_qfileinfo(struct ntvfs_module_context *ntvfs,
set info on a pathname
*/
static NTSTATUS unixuid_setpathinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_setfileinfo *st)
+ struct ntvfs_request *req, union smb_setfileinfo *st)
{
NTSTATUS status;
@@ -329,12 +328,12 @@ static NTSTATUS unixuid_setpathinfo(struct ntvfs_module_context *ntvfs,
/*
open a file
*/
-static NTSTATUS unixuid_openfile(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_open *io)
+static NTSTATUS unixuid_open(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req, union smb_open *io)
{
NTSTATUS status;
- PASS_THRU_REQ(ntvfs, req, openfile, (ntvfs, req, io));
+ PASS_THRU_REQ(ntvfs, req, open, (ntvfs, req, io));
return status;
}
@@ -343,7 +342,7 @@ static NTSTATUS unixuid_openfile(struct ntvfs_module_context *ntvfs,
create a directory
*/
static NTSTATUS unixuid_mkdir(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_mkdir *md)
+ struct ntvfs_request *req, union smb_mkdir *md)
{
NTSTATUS status;
@@ -356,7 +355,7 @@ static NTSTATUS unixuid_mkdir(struct ntvfs_module_context *ntvfs,
remove a directory
*/
static NTSTATUS unixuid_rmdir(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_rmdir *rd)
+ struct ntvfs_request *req, struct smb_rmdir *rd)
{
NTSTATUS status;
@@ -369,7 +368,7 @@ static NTSTATUS unixuid_rmdir(struct ntvfs_module_context *ntvfs,
rename a set of files
*/
static NTSTATUS unixuid_rename(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_rename *ren)
+ struct ntvfs_request *req, union smb_rename *ren)
{
NTSTATUS status;
@@ -382,7 +381,7 @@ static NTSTATUS unixuid_rename(struct ntvfs_module_context *ntvfs,
copy a set of files
*/
static NTSTATUS unixuid_copy(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_copy *cp)
+ struct ntvfs_request *req, struct smb_copy *cp)
{
NTSTATUS status;
@@ -395,7 +394,7 @@ static NTSTATUS unixuid_copy(struct ntvfs_module_context *ntvfs,
read from a file
*/
static NTSTATUS unixuid_read(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_read *rd)
+ struct ntvfs_request *req, union smb_read *rd)
{
NTSTATUS status;
@@ -408,7 +407,7 @@ static NTSTATUS unixuid_read(struct ntvfs_module_context *ntvfs,
write to a file
*/
static NTSTATUS unixuid_write(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_write *wr)
+ struct ntvfs_request *req, union smb_write *wr)
{
NTSTATUS status;
@@ -421,7 +420,7 @@ static NTSTATUS unixuid_write(struct ntvfs_module_context *ntvfs,
seek in a file
*/
static NTSTATUS unixuid_seek(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_seek *io)
+ struct ntvfs_request *req, struct smb_seek *io)
{
NTSTATUS status;
@@ -434,7 +433,7 @@ static NTSTATUS unixuid_seek(struct ntvfs_module_context *ntvfs,
flush a file
*/
static NTSTATUS unixuid_flush(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_flush *io)
+ struct ntvfs_request *req, struct smb_flush *io)
{
NTSTATUS status;
@@ -447,7 +446,7 @@ static NTSTATUS unixuid_flush(struct ntvfs_module_context *ntvfs,
close a file
*/
static NTSTATUS unixuid_close(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_close *io)
+ struct ntvfs_request *req, union smb_close *io)
{
NTSTATUS status;
@@ -460,7 +459,7 @@ static NTSTATUS unixuid_close(struct ntvfs_module_context *ntvfs,
exit - closing files
*/
static NTSTATUS unixuid_exit(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req)
+ struct ntvfs_request *req)
{
NTSTATUS status;
@@ -473,7 +472,7 @@ static NTSTATUS unixuid_exit(struct ntvfs_module_context *ntvfs,
logoff - closing files
*/
static NTSTATUS unixuid_logoff(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req)
+ struct ntvfs_request *req)
{
struct unixuid_private *private = ntvfs->private_data;
NTSTATUS status;
@@ -489,7 +488,7 @@ static NTSTATUS unixuid_logoff(struct ntvfs_module_context *ntvfs,
async setup
*/
static NTSTATUS unixuid_async_setup(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
void *private)
{
NTSTATUS status;
@@ -503,7 +502,7 @@ static NTSTATUS unixuid_async_setup(struct ntvfs_module_context *ntvfs,
cancel an async request
*/
static NTSTATUS unixuid_cancel(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req)
+ struct ntvfs_request *req)
{
NTSTATUS status;
@@ -516,7 +515,7 @@ static NTSTATUS unixuid_cancel(struct ntvfs_module_context *ntvfs,
lock a byte range
*/
static NTSTATUS unixuid_lock(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_lock *lck)
+ struct ntvfs_request *req, union smb_lock *lck)
{
NTSTATUS status;
@@ -529,7 +528,7 @@ static NTSTATUS unixuid_lock(struct ntvfs_module_context *ntvfs,
set info on a open file
*/
static NTSTATUS unixuid_setfileinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req,
+ struct ntvfs_request *req,
union smb_setfileinfo *info)
{
NTSTATUS status;
@@ -544,7 +543,7 @@ static NTSTATUS unixuid_setfileinfo(struct ntvfs_module_context *ntvfs,
return filesystem space info
*/
static NTSTATUS unixuid_fsinfo(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_fsinfo *fs)
+ struct ntvfs_request *req, union smb_fsinfo *fs)
{
NTSTATUS status;
@@ -557,7 +556,7 @@ static NTSTATUS unixuid_fsinfo(struct ntvfs_module_context *ntvfs,
return print queue info
*/
static NTSTATUS unixuid_lpq(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_lpq *lpq)
+ struct ntvfs_request *req, union smb_lpq *lpq)
{
NTSTATUS status;
@@ -570,7 +569,7 @@ static NTSTATUS unixuid_lpq(struct ntvfs_module_context *ntvfs,
list files in a directory matching a wildcard pattern
*/
static NTSTATUS unixuid_search_first(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_search_first *io,
+ struct ntvfs_request *req, union smb_search_first *io,
void *search_private,
BOOL (*callback)(void *, union smb_search_data *))
{
@@ -583,7 +582,7 @@ static NTSTATUS unixuid_search_first(struct ntvfs_module_context *ntvfs,
/* continue a search */
static NTSTATUS unixuid_search_next(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_search_next *io,
+ struct ntvfs_request *req, union smb_search_next *io,
void *search_private,
BOOL (*callback)(void *, union smb_search_data *))
{
@@ -596,7 +595,7 @@ static NTSTATUS unixuid_search_next(struct ntvfs_module_context *ntvfs,
/* close a search */
static NTSTATUS unixuid_search_close(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_search_close *io)
+ struct ntvfs_request *req, union smb_search_close *io)
{
NTSTATUS status;
@@ -607,7 +606,7 @@ static NTSTATUS unixuid_search_close(struct ntvfs_module_context *ntvfs,
/* SMBtrans - not used on file shares */
static NTSTATUS unixuid_trans(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_trans2 *trans2)
+ struct ntvfs_request *req, struct smb_trans2 *trans2)
{
NTSTATUS status;
@@ -633,7 +632,7 @@ NTSTATUS ntvfs_unixuid_init(void)
ops.chkpath = unixuid_chkpath;
ops.qpathinfo = unixuid_qpathinfo;
ops.setpathinfo = unixuid_setpathinfo;
- ops.openfile = unixuid_openfile;
+ ops.open = unixuid_open;
ops.mkdir = unixuid_mkdir;
ops.rmdir = unixuid_rmdir;
ops.rename = unixuid_rename;