summaryrefslogtreecommitdiff
path: root/source4/ntvfs/ntvfs_generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/ntvfs/ntvfs_generic.c')
-rw-r--r--source4/ntvfs/ntvfs_generic.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/source4/ntvfs/ntvfs_generic.c b/source4/ntvfs/ntvfs_generic.c
index 29f21b1863..731e91f5c9 100644
--- a/source4/ntvfs/ntvfs_generic.c
+++ b/source4/ntvfs/ntvfs_generic.c
@@ -57,7 +57,8 @@ static BOOL is_exe_file(const char *fname)
/*
NTVFS open generic to any mapper
*/
-NTSTATUS ntvfs_map_open(struct smbsrv_request *req, union smb_open *io)
+NTSTATUS ntvfs_map_open(struct smbsrv_request *req, union smb_open *io,
+ const struct ntvfs_ops *ops)
{
NTSTATUS status;
union smb_open io2;
@@ -145,7 +146,7 @@ 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 = req->tcon->ntvfs_ops->open(req, &io2);
+ status = ops->open(req, &io2);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -227,7 +228,7 @@ NTSTATUS ntvfs_map_open(struct smbsrv_request *req, union smb_open *io)
DEBUG(9,("ntvfs_map_open(OPEN): mapped flags=0x%x to access_mask=0x%x and share_access=0x%x\n",
io->open.in.flags, io2.generic.in.access_mask, io2.generic.in.share_access));
- status = req->tcon->ntvfs_ops->open(req, &io2);
+ status = ops->open(req, &io2);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -249,7 +250,8 @@ NTSTATUS ntvfs_map_open(struct smbsrv_request *req, union smb_open *io)
/*
NTVFS fsinfo generic to any mapper
*/
-NTSTATUS ntvfs_map_fsinfo(struct smbsrv_request *req, union smb_fsinfo *fs)
+NTSTATUS ntvfs_map_fsinfo(struct smbsrv_request *req, union smb_fsinfo *fs,
+ const struct ntvfs_ops *ops)
{
NTSTATUS status;
union smb_fsinfo fs2;
@@ -261,7 +263,7 @@ NTSTATUS ntvfs_map_fsinfo(struct smbsrv_request *req, union smb_fsinfo *fs)
/* ask the backend for the generic info */
fs2.generic.level = RAW_QFS_GENERIC;
- status = req->tcon->ntvfs_ops->fsinfo(req, &fs2);
+ status = ops->fsinfo(req, &fs2);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -590,7 +592,8 @@ NTSTATUS ntvfs_map_fileinfo(struct smbsrv_request *req, union smb_fileinfo *info
/*
NTVFS fileinfo generic to any mapper
*/
-NTSTATUS ntvfs_map_qfileinfo(struct smbsrv_request *req, union smb_fileinfo *info)
+NTSTATUS ntvfs_map_qfileinfo(struct smbsrv_request *req, union smb_fileinfo *info,
+ const struct ntvfs_ops *ops)
{
NTSTATUS status;
union smb_fileinfo info2;
@@ -603,7 +606,7 @@ NTSTATUS ntvfs_map_qfileinfo(struct smbsrv_request *req, union smb_fileinfo *inf
info2.generic.level = RAW_FILEINFO_GENERIC;
info2.generic.in.fnum = info->generic.in.fnum;
- status = req->tcon->ntvfs_ops->qfileinfo(req, &info2);
+ status = ops->qfileinfo(req, &info2);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -613,7 +616,8 @@ NTSTATUS ntvfs_map_qfileinfo(struct smbsrv_request *req, union smb_fileinfo *inf
/*
NTVFS pathinfo generic to any mapper
*/
-NTSTATUS ntvfs_map_qpathinfo(struct smbsrv_request *req, union smb_fileinfo *info)
+NTSTATUS ntvfs_map_qpathinfo(struct smbsrv_request *req, union smb_fileinfo *info,
+ const struct ntvfs_ops *ops)
{
NTSTATUS status;
union smb_fileinfo info2;
@@ -626,7 +630,7 @@ NTSTATUS ntvfs_map_qpathinfo(struct smbsrv_request *req, union smb_fileinfo *inf
info2.generic.level = RAW_FILEINFO_GENERIC;
info2.generic.in.fname = info->generic.in.fname;
- status = req->tcon->ntvfs_ops->qpathinfo(req, &info2);
+ status = ops->qpathinfo(req, &info2);
if (!NT_STATUS_IS_OK(status)) {
return status;
}