From dcad0f6fd492506efd9a69b4e32c7bbfa5da90e5 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 29 Sep 2004 13:17:09 +0000 Subject: r2751: this is a new ntvfs design which tries to solve: - the stacking of modules - finding the modules private data - hide the ntvfs details from the calling layer - I set NTVFS_INTERFACE_VERSION 0 till we are closer to release (because we need to solve some async problems with the module stacking) metze (This used to be commit 3ff03b5cb21bb79afdd3b1609be9635f6688a539) --- source4/ntvfs/ntvfs_interface.c | 566 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 566 insertions(+) create mode 100644 source4/ntvfs/ntvfs_interface.c (limited to 'source4/ntvfs/ntvfs_interface.c') diff --git a/source4/ntvfs/ntvfs_interface.c b/source4/ntvfs/ntvfs_interface.c new file mode 100644 index 0000000000..06cda11000 --- /dev/null +++ b/source4/ntvfs/ntvfs_interface.c @@ -0,0 +1,566 @@ +/* + Unix SMB/CIFS implementation. + NTVFS interface functions + + Copyright (C) Stefan (metze) Metzmacher 2004 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "includes.h" + +/* connect/disconnect */ +NTSTATUS ntvfs_connect(struct smbsrv_request *req, const char *sharename) +{ + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + if (!ntvfs->ops->connect) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->ops->connect(ntvfs, req, sharename); +} + +NTSTATUS ntvfs_disconnect(struct smbsrv_tcon *tcon) +{ + struct ntvfs_module_context *ntvfs = tcon->ntvfs_ctx->modules; + if (!ntvfs->ops->disconnect) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->ops->disconnect(ntvfs, tcon); +} + +/* path operations */ +NTSTATUS ntvfs_unlink(struct smbsrv_request *req, struct smb_unlink *unl) +{ + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + if (!ntvfs->ops->unlink) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->ops->unlink(ntvfs, req, unl); +} + +NTSTATUS ntvfs_chkpath(struct smbsrv_request *req, struct smb_chkpath *cp) +{ + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + if (!ntvfs->ops->chkpath) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->ops->chkpath(ntvfs, req, cp); +} + +NTSTATUS ntvfs_qpathinfo(struct smbsrv_request *req, union smb_fileinfo *st) +{ + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + if (!ntvfs->ops->qpathinfo) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->ops->qpathinfo(ntvfs, req, st); +} + +NTSTATUS ntvfs_setpathinfo(struct smbsrv_request *req, union smb_setfileinfo *st) +{ + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + if (!ntvfs->ops->setpathinfo) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->ops->setpathinfo(ntvfs, req, st); +} + +NTSTATUS ntvfs_open(struct smbsrv_request *req, union smb_open *oi) +{ + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + if (!ntvfs->ops->open) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->ops->open(ntvfs, req, oi); +} + +NTSTATUS ntvfs_mkdir(struct smbsrv_request *req, union smb_mkdir *md) +{ + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + if (!ntvfs->ops->mkdir) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->ops->mkdir(ntvfs, req, md); +} + +NTSTATUS ntvfs_rmdir(struct smbsrv_request *req, struct smb_rmdir *rd) +{ + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + if (!ntvfs->ops->rmdir) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->ops->rmdir(ntvfs, req, rd); +} + +NTSTATUS ntvfs_rename(struct smbsrv_request *req, union smb_rename *ren) +{ + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + if (!ntvfs->ops->rename) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->ops->rename(ntvfs, req, ren); +} + +NTSTATUS ntvfs_copy(struct smbsrv_request *req, struct smb_copy *cp) +{ + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + if (!ntvfs->ops->copy) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->ops->copy(ntvfs, req, cp); +} + +/* directory search */ +NTSTATUS ntvfs_search_first(struct smbsrv_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; + if (!ntvfs->ops->search_first) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->ops->search_first(ntvfs, req, io, private, ntvfs_callback); +} + +NTSTATUS ntvfs_search_next(struct smbsrv_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; + if (!ntvfs->ops->search_next) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->ops->search_next(ntvfs, req, io, private, ntvfs_callback); +} + +NTSTATUS ntvfs_search_close(struct smbsrv_request *req, union smb_search_close *io) +{ + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + if (!ntvfs->ops->search_close) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->ops->search_close(ntvfs, req, io); +} + +/* operations on open files */ +NTSTATUS ntvfs_ioctl(struct smbsrv_request *req, union smb_ioctl *io) +{ + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + if (!ntvfs->ops->ioctl) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->ops->ioctl(ntvfs, req, io); +} + +NTSTATUS ntvfs_read(struct smbsrv_request *req, union smb_read *io) +{ + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + if (!ntvfs->ops->read) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->ops->read(ntvfs, req, io); +} + +NTSTATUS ntvfs_write(struct smbsrv_request *req, union smb_write *io) +{ + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + if (!ntvfs->ops->write) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->ops->write(ntvfs, req, io); +} + +NTSTATUS ntvfs_seek(struct smbsrv_request *req, struct smb_seek *io) +{ + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + if (!ntvfs->ops->seek) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->ops->seek(ntvfs, req, io); +} + +NTSTATUS ntvfs_flush(struct smbsrv_request *req, struct smb_flush *flush) +{ + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + if (!ntvfs->ops->flush) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->ops->flush(ntvfs, req, flush); +} + +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); +} + +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); +} + +NTSTATUS ntvfs_lock(struct smbsrv_request *req, union smb_lock *lck) +{ + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + if (!ntvfs->ops->lock) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->ops->lock(ntvfs, req, lck); +} + +NTSTATUS ntvfs_setfileinfo(struct smbsrv_request *req, union smb_setfileinfo *info) +{ + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + if (!ntvfs->ops->setfileinfo) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->ops->setfileinfo(ntvfs, req, info); +} + +NTSTATUS ntvfs_qfileinfo(struct smbsrv_request *req, union smb_fileinfo *info) +{ + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + if (!ntvfs->ops->qfileinfo) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->ops->qfileinfo(ntvfs, req, info); +} + +/* filesystem operations */ +NTSTATUS ntvfs_fsinfo(struct smbsrv_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); +} + +/* printing specific operations */ +NTSTATUS ntvfs_lpq(struct smbsrv_request *req, union smb_lpq *lpq) +{ + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + if (!ntvfs->ops->lpq) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->ops->lpq(ntvfs, req, lpq); +} + +/* trans2 interface - only used by CIFS backend to prover complete passthru for testing */ +NTSTATUS ntvfs_trans2(struct smbsrv_request *req, struct smb_trans2 *trans2) +{ + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + if (!ntvfs->ops->trans2) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->ops->trans2(ntvfs, req, trans2); +} + +/* trans interface - used by IPC backend for pipes and RAP calls */ +NTSTATUS ntvfs_trans(struct smbsrv_request *req, struct smb_trans2 *trans) +{ + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + if (!ntvfs->ops->trans) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->ops->trans(ntvfs, req, trans); +} + +/* logoff - called when a vuid is closed */ +NTSTATUS ntvfs_logoff(struct smbsrv_request *req) +{ + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + if (!ntvfs->ops->logoff) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->ops->logoff(ntvfs, req); +} + +/* initial setup */ +NTSTATUS ntvfs_next_connect(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, const char *sharename) +{ + if (!ntvfs->next || !ntvfs->next->ops->connect) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->next->ops->connect(ntvfs->next, req, sharename); +} + +NTSTATUS ntvfs_next_disconnect(struct ntvfs_module_context *ntvfs, + struct smbsrv_tcon *tcon) +{ + if (!ntvfs->next || !ntvfs->next->ops->disconnect) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->next->ops->disconnect(ntvfs->next, tcon); +} + +/* path operations */ +NTSTATUS ntvfs_next_unlink(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, struct smb_unlink *unl) +{ + if (!ntvfs->next || !ntvfs->next->ops->unlink) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->next->ops->unlink(ntvfs->next, req, unl); +} + +NTSTATUS ntvfs_next_chkpath(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, struct smb_chkpath *cp) +{ + if (!ntvfs->next || !ntvfs->next->ops->chkpath) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->next->ops->chkpath(ntvfs->next, req, cp); +} + +NTSTATUS ntvfs_next_qpathinfo(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, union smb_fileinfo *st) +{ + if (!ntvfs->next || !ntvfs->next->ops->qpathinfo) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->next->ops->qpathinfo(ntvfs->next, req, st); +} + +NTSTATUS ntvfs_next_setpathinfo(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, union smb_setfileinfo *st) +{ + if (!ntvfs->next || !ntvfs->next->ops->setpathinfo) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->next->ops->setpathinfo(ntvfs->next, req, st); +} + +NTSTATUS ntvfs_next_open(struct ntvfs_module_context *ntvfs, + struct smbsrv_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); +} + +NTSTATUS ntvfs_next_mkdir(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, union smb_mkdir *md) +{ + if (!ntvfs->next || !ntvfs->next->ops->mkdir) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->next->ops->mkdir(ntvfs->next, req, md); +} + +NTSTATUS ntvfs_next_rmdir(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, struct smb_rmdir *rd) +{ + if (!ntvfs->next || !ntvfs->next->ops->rmdir) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->next->ops->rmdir(ntvfs->next, req, rd); +} + +NTSTATUS ntvfs_next_rename(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, union smb_rename *ren) +{ + if (!ntvfs->next || !ntvfs->next->ops->rename) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->next->ops->rename(ntvfs->next, req, ren); +} + +NTSTATUS ntvfs_next_copy(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, struct smb_copy *cp) +{ + if (!ntvfs->next || !ntvfs->next->ops->copy) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->next->ops->copy(ntvfs->next, req, cp); +} + +/* directory search */ +NTSTATUS ntvfs_next_search_first(struct ntvfs_module_context *ntvfs, + struct smbsrv_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) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->next->ops->search_first(ntvfs->next, req, io, private, callback); +} + +NTSTATUS ntvfs_next_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)) +{ + if (!ntvfs->next || !ntvfs->next->ops->search_next) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->next->ops->search_next(ntvfs->next, req, io, private, callback); +} + +NTSTATUS ntvfs_next_search_close(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, union smb_search_close *io) +{ + if (!ntvfs->next || !ntvfs->next->ops->search_close) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->next->ops->search_close(ntvfs->next, req, io); +} + +/* operations on open files */ +NTSTATUS ntvfs_next_ioctl(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, union smb_ioctl *io) +{ + if (!ntvfs->next || !ntvfs->next->ops->ioctl) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->next->ops->ioctl(ntvfs->next, req, io); +} + +NTSTATUS ntvfs_next_read(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, union smb_read *io) +{ + if (!ntvfs->next || !ntvfs->next->ops->read) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->next->ops->read(ntvfs->next, req, io); +} + +NTSTATUS ntvfs_next_write(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, union smb_write *io) +{ + if (!ntvfs->next || !ntvfs->next->ops->write) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->next->ops->write(ntvfs->next, req, io); +} + +NTSTATUS ntvfs_next_seek(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, struct smb_seek *io) +{ + if (!ntvfs->next || !ntvfs->next->ops->seek) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->next->ops->seek(ntvfs->next, req, io); +} + +NTSTATUS ntvfs_next_flush(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, struct smb_flush *flush) +{ + if (!ntvfs->next || !ntvfs->next->ops->flush) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->next->ops->flush(ntvfs->next, req, flush); +} + +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); +} + +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); +} + +NTSTATUS ntvfs_next_lock(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, union smb_lock *lck) +{ + if (!ntvfs->next || !ntvfs->next->ops->lock) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->next->ops->lock(ntvfs->next, req, lck); +} + +NTSTATUS ntvfs_next_setfileinfo(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, union smb_setfileinfo *info) +{ + if (!ntvfs->next || !ntvfs->next->ops->setfileinfo) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->next->ops->setfileinfo(ntvfs->next, req, info); +} + +NTSTATUS ntvfs_next_qfileinfo(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, union smb_fileinfo *info) +{ + if (!ntvfs->next || !ntvfs->next->ops->qfileinfo) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->next->ops->qfileinfo(ntvfs->next, req, info); +} + +/* filesystem operations */ +NTSTATUS ntvfs_next_fsinfo(struct ntvfs_module_context *ntvfs, + struct smbsrv_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); +} + +/* printing specific operations */ +NTSTATUS ntvfs_next_lpq(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, union smb_lpq *lpq) +{ + if (!ntvfs->next || !ntvfs->next->ops->lpq) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->next->ops->lpq(ntvfs->next, req, lpq); +} + +/* trans2 interface - only used by CIFS backend to prover complete passthru for testing */ +NTSTATUS ntvfs_next_trans2(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, struct smb_trans2 *trans2) +{ + if (!ntvfs->next || !ntvfs->next->ops->trans2) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->next->ops->trans2(ntvfs->next, req, trans2); +} + +/* trans interface - used by IPC backend for pipes and RAP calls */ +NTSTATUS ntvfs_next_trans(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, struct smb_trans2 *trans) +{ + if (!ntvfs->next || !ntvfs->next->ops->trans) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->next->ops->trans(ntvfs->next, req, trans); +} + +/* logoff - called when a vuid is closed */ +NTSTATUS ntvfs_next_logoff(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req) +{ + if (!ntvfs->next || !ntvfs->next->ops->logoff) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->next->ops->logoff(ntvfs->next, req); +} -- cgit From 142d295aa8e70477c85d1835f2907f81c4c3c519 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 18 Oct 2004 13:27:22 +0000 Subject: r3039: This solves the problem of async handlers in ntvfs backends not being in the right state when called. For example, when we use the unixuid handler in the chain of handlers, and a backend decides to continue a call asynchronously then we need to ensure that the continuation happens with the right security context. The solution is to add a new ntvfs operation ntvfs_async_setup(), which calls all the way down through the layers, setting up anything that is required, and takes a private pointer. The backend wanting to make a async calls can use ntvfs_async_setup() to ensure that the modules above it are called when doing async processing. (This used to be commit a256e71029727fa1659ade6257085df537308c7d) --- source4/ntvfs/ntvfs_interface.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'source4/ntvfs/ntvfs_interface.c') diff --git a/source4/ntvfs/ntvfs_interface.c b/source4/ntvfs/ntvfs_interface.c index 06cda11000..7ba1c0d6be 100644 --- a/source4/ntvfs/ntvfs_interface.c +++ b/source4/ntvfs/ntvfs_interface.c @@ -293,6 +293,17 @@ 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 */ +NTSTATUS ntvfs_async_setup(struct smbsrv_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); +} + /* initial setup */ NTSTATUS ntvfs_next_connect(struct ntvfs_module_context *ntvfs, struct smbsrv_request *req, const char *sharename) @@ -564,3 +575,14 @@ NTSTATUS ntvfs_next_logoff(struct ntvfs_module_context *ntvfs, } return ntvfs->next->ops->logoff(ntvfs->next, req); } + +/* async_setup - called when setting up for a async request */ +NTSTATUS ntvfs_next_async_setup(struct ntvfs_module_context *ntvfs, + struct smbsrv_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); +} -- cgit From 2df2d1b67f9bf2907f452688b2c54b73052cfb49 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Nov 2004 04:51:57 +0000 Subject: r3461: another place where "open" was used as a structure element (This used to be commit 1087ea830e7aead86d54a1836512e88554afc919) --- source4/ntvfs/ntvfs_interface.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source4/ntvfs/ntvfs_interface.c') diff --git a/source4/ntvfs/ntvfs_interface.c b/source4/ntvfs/ntvfs_interface.c index 7ba1c0d6be..95c01a0b50 100644 --- a/source4/ntvfs/ntvfs_interface.c +++ b/source4/ntvfs/ntvfs_interface.c @@ -77,13 +77,13 @@ NTSTATUS ntvfs_setpathinfo(struct smbsrv_request *req, union smb_setfileinfo *st return ntvfs->ops->setpathinfo(ntvfs, req, st); } -NTSTATUS ntvfs_open(struct smbsrv_request *req, union smb_open *oi) +NTSTATUS ntvfs_openfile(struct smbsrv_request *req, union smb_open *oi) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; - if (!ntvfs->ops->open) { + if (!ntvfs->ops->openfile) { return NT_STATUS_NOT_IMPLEMENTED; } - return ntvfs->ops->open(ntvfs, req, oi); + return ntvfs->ops->openfile(ntvfs, req, oi); } NTSTATUS ntvfs_mkdir(struct smbsrv_request *req, union smb_mkdir *md) @@ -360,13 +360,13 @@ NTSTATUS ntvfs_next_setpathinfo(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->setpathinfo(ntvfs->next, req, st); } -NTSTATUS ntvfs_next_open(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_openfile(struct ntvfs_module_context *ntvfs, struct smbsrv_request *req, union smb_open *oi) { - if (!ntvfs->next || !ntvfs->next->ops->open) { + if (!ntvfs->next || !ntvfs->next->ops->openfile) { return NT_STATUS_NOT_IMPLEMENTED; } - return ntvfs->next->ops->open(ntvfs->next, req, oi); + return ntvfs->next->ops->openfile(ntvfs->next, req, oi); } NTSTATUS ntvfs_next_mkdir(struct ntvfs_module_context *ntvfs, -- cgit From aa34fcebf8aa0660574a7c6976b33b3f37985e27 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Nov 2004 07:18:24 +0000 Subject: r3466: split out request.h, signing.h, and smb_server.h (This used to be commit 7c4e6ebf05790dd6e29896dd316db0fff613aa4e) --- source4/ntvfs/ntvfs_interface.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/ntvfs/ntvfs_interface.c') diff --git a/source4/ntvfs/ntvfs_interface.c b/source4/ntvfs/ntvfs_interface.c index 95c01a0b50..f1ab217533 100644 --- a/source4/ntvfs/ntvfs_interface.c +++ b/source4/ntvfs/ntvfs_interface.c @@ -20,6 +20,8 @@ */ #include "includes.h" +#include "smb_server/smb_server.h" + /* connect/disconnect */ NTSTATUS ntvfs_connect(struct smbsrv_request *req, const char *sharename) -- cgit From c870ae8b898d3bcc81ed9fd1afd505d78dea52cc Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 4 Nov 2004 11:28:38 +0000 Subject: r3528: added support for the SMBntcancel() operation, which cancels any outstanding async operation (triggering an immediate timeout). pvfs now passes the RAW-MUX test (This used to be commit 3423e2f41461d054067ef168b9b986f62cc8f77c) --- source4/ntvfs/ntvfs_interface.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'source4/ntvfs/ntvfs_interface.c') diff --git a/source4/ntvfs/ntvfs_interface.c b/source4/ntvfs/ntvfs_interface.c index f1ab217533..6ab5aad790 100644 --- a/source4/ntvfs/ntvfs_interface.c +++ b/source4/ntvfs/ntvfs_interface.c @@ -306,6 +306,20 @@ NTSTATUS ntvfs_async_setup(struct smbsrv_request *req, void *private) return ntvfs->ops->async_setup(ntvfs, req, private); } + +/* + cancel an outstanding async request +*/ +NTSTATUS ntvfs_cancel(struct smbsrv_request *req) +{ + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + if (!ntvfs->ops->cancel) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->ops->cancel(ntvfs, req); +} + + /* initial setup */ NTSTATUS ntvfs_next_connect(struct ntvfs_module_context *ntvfs, struct smbsrv_request *req, const char *sharename) @@ -588,3 +602,13 @@ NTSTATUS ntvfs_next_async_setup(struct ntvfs_module_context *ntvfs, } return ntvfs->next->ops->async_setup(ntvfs->next, req, private); } + +/* cancel - called to cancel an outstanding async request */ +NTSTATUS ntvfs_next_cancel(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req) +{ + if (!ntvfs->next || !ntvfs->next->ops->cancel) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->next->ops->cancel(ntvfs->next, req); +} -- cgit From 94efb6f70efd7d3f2f5740cf0998f23bb9624546 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 4 Aug 2005 21:00:38 +0000 Subject: r9074: cope with a null ntvfs context in disconnect, so the destructor that runs on a failed ntvfs init works (This used to be commit dac0be64c7cef18f6740053b3e6fe9a25df40c88) --- source4/ntvfs/ntvfs_interface.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source4/ntvfs/ntvfs_interface.c') diff --git a/source4/ntvfs/ntvfs_interface.c b/source4/ntvfs/ntvfs_interface.c index 6ab5aad790..6a711bc3bd 100644 --- a/source4/ntvfs/ntvfs_interface.c +++ b/source4/ntvfs/ntvfs_interface.c @@ -35,7 +35,11 @@ NTSTATUS ntvfs_connect(struct smbsrv_request *req, const char *sharename) NTSTATUS ntvfs_disconnect(struct smbsrv_tcon *tcon) { - struct ntvfs_module_context *ntvfs = tcon->ntvfs_ctx->modules; + struct ntvfs_module_context *ntvfs; + if (tcon->ntvfs_ctx == NULL) { + return NT_STATUS_INVALID_CONNECTION; + } + ntvfs = tcon->ntvfs_ctx->modules; if (!ntvfs->ops->disconnect) { return NT_STATUS_NOT_IMPLEMENTED; } -- cgit From 0a3c167f6bcf08b2204ca49831ca49eef73dcbf4 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 27 Dec 2005 22:51:30 +0000 Subject: r12528: Add seperate proto headers for ntvfs, tdr, smb_server and nbt_server. (This used to be commit 87f665a1d5ba74289974bf9d8f9441c162e6f1b1) --- source4/ntvfs/ntvfs_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/ntvfs/ntvfs_interface.c') diff --git a/source4/ntvfs/ntvfs_interface.c b/source4/ntvfs/ntvfs_interface.c index 6a711bc3bd..788dcafaca 100644 --- a/source4/ntvfs/ntvfs_interface.c +++ b/source4/ntvfs/ntvfs_interface.c @@ -21,7 +21,7 @@ #include "includes.h" #include "smb_server/smb_server.h" - +#include "ntvfs/ntvfs.h" /* connect/disconnect */ NTSTATUS ntvfs_connect(struct smbsrv_request *req, const char *sharename) -- cgit From 69f7c004fefc4f4e85843bd171fe066167703bb8 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 11 Jan 2006 10:53:52 +0000 Subject: r12838: make the ntvfs function public metze (This used to be commit 41a564fdba5969fc7e518439520764fd56cfa280) --- source4/ntvfs/ntvfs_interface.c | 196 ++++++++++++++++++++-------------------- 1 file changed, 98 insertions(+), 98 deletions(-) (limited to 'source4/ntvfs/ntvfs_interface.c') diff --git a/source4/ntvfs/ntvfs_interface.c b/source4/ntvfs/ntvfs_interface.c index 788dcafaca..5a2415f5f9 100644 --- a/source4/ntvfs/ntvfs_interface.c +++ b/source4/ntvfs/ntvfs_interface.c @@ -24,7 +24,7 @@ #include "ntvfs/ntvfs.h" /* connect/disconnect */ -NTSTATUS ntvfs_connect(struct smbsrv_request *req, const char *sharename) +_PUBLIC_ NTSTATUS ntvfs_connect(struct smbsrv_request *req, const char *sharename) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->connect) { @@ -33,7 +33,7 @@ NTSTATUS ntvfs_connect(struct smbsrv_request *req, const char *sharename) return ntvfs->ops->connect(ntvfs, req, sharename); } -NTSTATUS ntvfs_disconnect(struct smbsrv_tcon *tcon) +_PUBLIC_ NTSTATUS ntvfs_disconnect(struct smbsrv_tcon *tcon) { struct ntvfs_module_context *ntvfs; if (tcon->ntvfs_ctx == NULL) { @@ -47,7 +47,7 @@ NTSTATUS ntvfs_disconnect(struct smbsrv_tcon *tcon) } /* path operations */ -NTSTATUS ntvfs_unlink(struct smbsrv_request *req, struct smb_unlink *unl) +_PUBLIC_ NTSTATUS ntvfs_unlink(struct smbsrv_request *req, struct smb_unlink *unl) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->unlink) { @@ -56,7 +56,7 @@ NTSTATUS ntvfs_unlink(struct smbsrv_request *req, struct smb_unlink *unl) return ntvfs->ops->unlink(ntvfs, req, unl); } -NTSTATUS ntvfs_chkpath(struct smbsrv_request *req, struct smb_chkpath *cp) +_PUBLIC_ NTSTATUS ntvfs_chkpath(struct smbsrv_request *req, struct smb_chkpath *cp) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->chkpath) { @@ -65,7 +65,7 @@ NTSTATUS ntvfs_chkpath(struct smbsrv_request *req, struct smb_chkpath *cp) return ntvfs->ops->chkpath(ntvfs, req, cp); } -NTSTATUS ntvfs_qpathinfo(struct smbsrv_request *req, union smb_fileinfo *st) +_PUBLIC_ NTSTATUS ntvfs_qpathinfo(struct smbsrv_request *req, union smb_fileinfo *st) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->qpathinfo) { @@ -74,7 +74,7 @@ NTSTATUS ntvfs_qpathinfo(struct smbsrv_request *req, union smb_fileinfo *st) return ntvfs->ops->qpathinfo(ntvfs, req, st); } -NTSTATUS ntvfs_setpathinfo(struct smbsrv_request *req, union smb_setfileinfo *st) +_PUBLIC_ NTSTATUS ntvfs_setpathinfo(struct smbsrv_request *req, union smb_setfileinfo *st) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->setpathinfo) { @@ -83,7 +83,7 @@ NTSTATUS ntvfs_setpathinfo(struct smbsrv_request *req, union smb_setfileinfo *st return ntvfs->ops->setpathinfo(ntvfs, req, st); } -NTSTATUS ntvfs_openfile(struct smbsrv_request *req, union smb_open *oi) +_PUBLIC_ NTSTATUS ntvfs_openfile(struct smbsrv_request *req, union smb_open *oi) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->openfile) { @@ -92,7 +92,7 @@ NTSTATUS ntvfs_openfile(struct smbsrv_request *req, union smb_open *oi) return ntvfs->ops->openfile(ntvfs, req, oi); } -NTSTATUS ntvfs_mkdir(struct smbsrv_request *req, union smb_mkdir *md) +_PUBLIC_ NTSTATUS ntvfs_mkdir(struct smbsrv_request *req, union smb_mkdir *md) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->mkdir) { @@ -101,7 +101,7 @@ NTSTATUS ntvfs_mkdir(struct smbsrv_request *req, union smb_mkdir *md) return ntvfs->ops->mkdir(ntvfs, req, md); } -NTSTATUS ntvfs_rmdir(struct smbsrv_request *req, struct smb_rmdir *rd) +_PUBLIC_ NTSTATUS ntvfs_rmdir(struct smbsrv_request *req, struct smb_rmdir *rd) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->rmdir) { @@ -110,7 +110,7 @@ NTSTATUS ntvfs_rmdir(struct smbsrv_request *req, struct smb_rmdir *rd) return ntvfs->ops->rmdir(ntvfs, req, rd); } -NTSTATUS ntvfs_rename(struct smbsrv_request *req, union smb_rename *ren) +_PUBLIC_ NTSTATUS ntvfs_rename(struct smbsrv_request *req, union smb_rename *ren) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->rename) { @@ -119,7 +119,7 @@ NTSTATUS ntvfs_rename(struct smbsrv_request *req, union smb_rename *ren) return ntvfs->ops->rename(ntvfs, req, ren); } -NTSTATUS ntvfs_copy(struct smbsrv_request *req, struct smb_copy *cp) +_PUBLIC_ NTSTATUS ntvfs_copy(struct smbsrv_request *req, struct smb_copy *cp) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->copy) { @@ -129,8 +129,8 @@ NTSTATUS ntvfs_copy(struct smbsrv_request *req, struct smb_copy *cp) } /* directory search */ -NTSTATUS ntvfs_search_first(struct smbsrv_request *req, union smb_search_first *io, void *private, - BOOL ntvfs_callback(void *private, union smb_search_data *file)) +_PUBLIC_ NTSTATUS ntvfs_search_first(struct smbsrv_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; if (!ntvfs->ops->search_first) { @@ -139,8 +139,8 @@ NTSTATUS ntvfs_search_first(struct smbsrv_request *req, union smb_search_first * return ntvfs->ops->search_first(ntvfs, req, io, private, ntvfs_callback); } -NTSTATUS ntvfs_search_next(struct smbsrv_request *req, union smb_search_next *io, void *private, - BOOL ntvfs_callback(void *private, union smb_search_data *file)) +_PUBLIC_ NTSTATUS ntvfs_search_next(struct smbsrv_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; if (!ntvfs->ops->search_next) { @@ -149,7 +149,7 @@ NTSTATUS ntvfs_search_next(struct smbsrv_request *req, union smb_search_next *io return ntvfs->ops->search_next(ntvfs, req, io, private, ntvfs_callback); } -NTSTATUS ntvfs_search_close(struct smbsrv_request *req, union smb_search_close *io) +_PUBLIC_ NTSTATUS ntvfs_search_close(struct smbsrv_request *req, union smb_search_close *io) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->search_close) { @@ -159,7 +159,7 @@ NTSTATUS ntvfs_search_close(struct smbsrv_request *req, union smb_search_close * } /* operations on open files */ -NTSTATUS ntvfs_ioctl(struct smbsrv_request *req, union smb_ioctl *io) +_PUBLIC_ NTSTATUS ntvfs_ioctl(struct smbsrv_request *req, union smb_ioctl *io) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->ioctl) { @@ -168,7 +168,7 @@ NTSTATUS ntvfs_ioctl(struct smbsrv_request *req, union smb_ioctl *io) return ntvfs->ops->ioctl(ntvfs, req, io); } -NTSTATUS ntvfs_read(struct smbsrv_request *req, union smb_read *io) +_PUBLIC_ NTSTATUS ntvfs_read(struct smbsrv_request *req, union smb_read *io) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->read) { @@ -177,7 +177,7 @@ NTSTATUS ntvfs_read(struct smbsrv_request *req, union smb_read *io) return ntvfs->ops->read(ntvfs, req, io); } -NTSTATUS ntvfs_write(struct smbsrv_request *req, union smb_write *io) +_PUBLIC_ NTSTATUS ntvfs_write(struct smbsrv_request *req, union smb_write *io) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->write) { @@ -186,7 +186,7 @@ NTSTATUS ntvfs_write(struct smbsrv_request *req, union smb_write *io) return ntvfs->ops->write(ntvfs, req, io); } -NTSTATUS ntvfs_seek(struct smbsrv_request *req, struct smb_seek *io) +_PUBLIC_ NTSTATUS ntvfs_seek(struct smbsrv_request *req, struct smb_seek *io) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->seek) { @@ -195,7 +195,7 @@ NTSTATUS ntvfs_seek(struct smbsrv_request *req, struct smb_seek *io) return ntvfs->ops->seek(ntvfs, req, io); } -NTSTATUS ntvfs_flush(struct smbsrv_request *req, struct smb_flush *flush) +_PUBLIC_ NTSTATUS ntvfs_flush(struct smbsrv_request *req, struct smb_flush *flush) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->flush) { @@ -204,7 +204,7 @@ NTSTATUS ntvfs_flush(struct smbsrv_request *req, struct smb_flush *flush) return ntvfs->ops->flush(ntvfs, req, flush); } -NTSTATUS ntvfs_close(struct smbsrv_request *req, union smb_close *io) +_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) { @@ -213,7 +213,7 @@ NTSTATUS ntvfs_close(struct smbsrv_request *req, union smb_close *io) return ntvfs->ops->close(ntvfs, req, io); } -NTSTATUS ntvfs_exit(struct smbsrv_request *req) +_PUBLIC_ NTSTATUS ntvfs_exit(struct smbsrv_request *req) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->exit) { @@ -222,7 +222,7 @@ NTSTATUS ntvfs_exit(struct smbsrv_request *req) return ntvfs->ops->exit(ntvfs, req); } -NTSTATUS ntvfs_lock(struct smbsrv_request *req, union smb_lock *lck) +_PUBLIC_ NTSTATUS ntvfs_lock(struct smbsrv_request *req, union smb_lock *lck) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->lock) { @@ -231,7 +231,7 @@ NTSTATUS ntvfs_lock(struct smbsrv_request *req, union smb_lock *lck) return ntvfs->ops->lock(ntvfs, req, lck); } -NTSTATUS ntvfs_setfileinfo(struct smbsrv_request *req, union smb_setfileinfo *info) +_PUBLIC_ NTSTATUS ntvfs_setfileinfo(struct smbsrv_request *req, union smb_setfileinfo *info) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->setfileinfo) { @@ -240,7 +240,7 @@ NTSTATUS ntvfs_setfileinfo(struct smbsrv_request *req, union smb_setfileinfo *in return ntvfs->ops->setfileinfo(ntvfs, req, info); } -NTSTATUS ntvfs_qfileinfo(struct smbsrv_request *req, union smb_fileinfo *info) +_PUBLIC_ NTSTATUS ntvfs_qfileinfo(struct smbsrv_request *req, union smb_fileinfo *info) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->qfileinfo) { @@ -250,7 +250,7 @@ NTSTATUS ntvfs_qfileinfo(struct smbsrv_request *req, union smb_fileinfo *info) } /* filesystem operations */ -NTSTATUS ntvfs_fsinfo(struct smbsrv_request *req, union smb_fsinfo *fs) +_PUBLIC_ NTSTATUS ntvfs_fsinfo(struct smbsrv_request *req, union smb_fsinfo *fs) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->fsinfo) { @@ -260,7 +260,7 @@ NTSTATUS ntvfs_fsinfo(struct smbsrv_request *req, union smb_fsinfo *fs) } /* printing specific operations */ -NTSTATUS ntvfs_lpq(struct smbsrv_request *req, union smb_lpq *lpq) +_PUBLIC_ NTSTATUS ntvfs_lpq(struct smbsrv_request *req, union smb_lpq *lpq) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->lpq) { @@ -270,7 +270,7 @@ NTSTATUS ntvfs_lpq(struct smbsrv_request *req, union smb_lpq *lpq) } /* trans2 interface - only used by CIFS backend to prover complete passthru for testing */ -NTSTATUS ntvfs_trans2(struct smbsrv_request *req, struct smb_trans2 *trans2) +_PUBLIC_ NTSTATUS ntvfs_trans2(struct smbsrv_request *req, struct smb_trans2 *trans2) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->trans2) { @@ -280,7 +280,7 @@ NTSTATUS ntvfs_trans2(struct smbsrv_request *req, struct smb_trans2 *trans2) } /* trans interface - used by IPC backend for pipes and RAP calls */ -NTSTATUS ntvfs_trans(struct smbsrv_request *req, struct smb_trans2 *trans) +_PUBLIC_ NTSTATUS ntvfs_trans(struct smbsrv_request *req, struct smb_trans2 *trans) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->trans) { @@ -290,7 +290,7 @@ NTSTATUS ntvfs_trans(struct smbsrv_request *req, struct smb_trans2 *trans) } /* logoff - called when a vuid is closed */ -NTSTATUS ntvfs_logoff(struct smbsrv_request *req) +_PUBLIC_ NTSTATUS ntvfs_logoff(struct smbsrv_request *req) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->logoff) { @@ -301,7 +301,7 @@ NTSTATUS ntvfs_logoff(struct smbsrv_request *req) /* async setup - called by a backend that wants to setup any state for a async request */ -NTSTATUS ntvfs_async_setup(struct smbsrv_request *req, void *private) +_PUBLIC_ NTSTATUS ntvfs_async_setup(struct smbsrv_request *req, void *private) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->async_setup) { @@ -314,7 +314,7 @@ NTSTATUS ntvfs_async_setup(struct smbsrv_request *req, void *private) /* cancel an outstanding async request */ -NTSTATUS ntvfs_cancel(struct smbsrv_request *req) +_PUBLIC_ NTSTATUS ntvfs_cancel(struct smbsrv_request *req) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->cancel) { @@ -325,8 +325,8 @@ NTSTATUS ntvfs_cancel(struct smbsrv_request *req) /* initial setup */ -NTSTATUS ntvfs_next_connect(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, const char *sharename) +_PUBLIC_ NTSTATUS ntvfs_next_connect(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, const char *sharename) { if (!ntvfs->next || !ntvfs->next->ops->connect) { return NT_STATUS_NOT_IMPLEMENTED; @@ -334,8 +334,8 @@ NTSTATUS ntvfs_next_connect(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->connect(ntvfs->next, req, sharename); } -NTSTATUS ntvfs_next_disconnect(struct ntvfs_module_context *ntvfs, - struct smbsrv_tcon *tcon) +_PUBLIC_ NTSTATUS ntvfs_next_disconnect(struct ntvfs_module_context *ntvfs, + struct smbsrv_tcon *tcon) { if (!ntvfs->next || !ntvfs->next->ops->disconnect) { return NT_STATUS_NOT_IMPLEMENTED; @@ -344,8 +344,8 @@ NTSTATUS ntvfs_next_disconnect(struct ntvfs_module_context *ntvfs, } /* path operations */ -NTSTATUS ntvfs_next_unlink(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, struct smb_unlink *unl) +_PUBLIC_ NTSTATUS ntvfs_next_unlink(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, struct smb_unlink *unl) { if (!ntvfs->next || !ntvfs->next->ops->unlink) { return NT_STATUS_NOT_IMPLEMENTED; @@ -353,8 +353,8 @@ NTSTATUS ntvfs_next_unlink(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->unlink(ntvfs->next, req, unl); } -NTSTATUS ntvfs_next_chkpath(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, struct smb_chkpath *cp) +_PUBLIC_ NTSTATUS ntvfs_next_chkpath(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, struct smb_chkpath *cp) { if (!ntvfs->next || !ntvfs->next->ops->chkpath) { return NT_STATUS_NOT_IMPLEMENTED; @@ -362,8 +362,8 @@ NTSTATUS ntvfs_next_chkpath(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->chkpath(ntvfs->next, req, cp); } -NTSTATUS ntvfs_next_qpathinfo(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, union smb_fileinfo *st) +_PUBLIC_ NTSTATUS ntvfs_next_qpathinfo(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, union smb_fileinfo *st) { if (!ntvfs->next || !ntvfs->next->ops->qpathinfo) { return NT_STATUS_NOT_IMPLEMENTED; @@ -371,8 +371,8 @@ NTSTATUS ntvfs_next_qpathinfo(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->qpathinfo(ntvfs->next, req, st); } -NTSTATUS ntvfs_next_setpathinfo(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, union smb_setfileinfo *st) +_PUBLIC_ NTSTATUS ntvfs_next_setpathinfo(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, union smb_setfileinfo *st) { if (!ntvfs->next || !ntvfs->next->ops->setpathinfo) { return NT_STATUS_NOT_IMPLEMENTED; @@ -380,8 +380,8 @@ NTSTATUS ntvfs_next_setpathinfo(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->setpathinfo(ntvfs->next, req, st); } -NTSTATUS ntvfs_next_openfile(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, union smb_open *oi) +_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; @@ -389,8 +389,8 @@ NTSTATUS ntvfs_next_openfile(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->openfile(ntvfs->next, req, oi); } -NTSTATUS ntvfs_next_mkdir(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, union smb_mkdir *md) +_PUBLIC_ NTSTATUS ntvfs_next_mkdir(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, union smb_mkdir *md) { if (!ntvfs->next || !ntvfs->next->ops->mkdir) { return NT_STATUS_NOT_IMPLEMENTED; @@ -398,8 +398,8 @@ NTSTATUS ntvfs_next_mkdir(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->mkdir(ntvfs->next, req, md); } -NTSTATUS ntvfs_next_rmdir(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, struct smb_rmdir *rd) +_PUBLIC_ NTSTATUS ntvfs_next_rmdir(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, struct smb_rmdir *rd) { if (!ntvfs->next || !ntvfs->next->ops->rmdir) { return NT_STATUS_NOT_IMPLEMENTED; @@ -407,8 +407,8 @@ NTSTATUS ntvfs_next_rmdir(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->rmdir(ntvfs->next, req, rd); } -NTSTATUS ntvfs_next_rename(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, union smb_rename *ren) +_PUBLIC_ NTSTATUS ntvfs_next_rename(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, union smb_rename *ren) { if (!ntvfs->next || !ntvfs->next->ops->rename) { return NT_STATUS_NOT_IMPLEMENTED; @@ -416,8 +416,8 @@ NTSTATUS ntvfs_next_rename(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->rename(ntvfs->next, req, ren); } -NTSTATUS ntvfs_next_copy(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, struct smb_copy *cp) +_PUBLIC_ NTSTATUS ntvfs_next_copy(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, struct smb_copy *cp) { if (!ntvfs->next || !ntvfs->next->ops->copy) { return NT_STATUS_NOT_IMPLEMENTED; @@ -426,9 +426,9 @@ NTSTATUS ntvfs_next_copy(struct ntvfs_module_context *ntvfs, } /* directory search */ -NTSTATUS ntvfs_next_search_first(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, union smb_search_first *io, void *private, - BOOL (*callback)(void *private, union smb_search_data *file)) +_PUBLIC_ NTSTATUS ntvfs_next_search_first(struct ntvfs_module_context *ntvfs, + struct smbsrv_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) { return NT_STATUS_NOT_IMPLEMENTED; @@ -436,9 +436,9 @@ NTSTATUS ntvfs_next_search_first(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->search_first(ntvfs->next, req, io, private, callback); } -NTSTATUS ntvfs_next_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)) +_PUBLIC_ NTSTATUS ntvfs_next_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)) { if (!ntvfs->next || !ntvfs->next->ops->search_next) { return NT_STATUS_NOT_IMPLEMENTED; @@ -446,8 +446,8 @@ NTSTATUS ntvfs_next_search_next(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->search_next(ntvfs->next, req, io, private, callback); } -NTSTATUS ntvfs_next_search_close(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, union smb_search_close *io) +_PUBLIC_ NTSTATUS ntvfs_next_search_close(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, union smb_search_close *io) { if (!ntvfs->next || !ntvfs->next->ops->search_close) { return NT_STATUS_NOT_IMPLEMENTED; @@ -456,8 +456,8 @@ NTSTATUS ntvfs_next_search_close(struct ntvfs_module_context *ntvfs, } /* operations on open files */ -NTSTATUS ntvfs_next_ioctl(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, union smb_ioctl *io) +_PUBLIC_ NTSTATUS ntvfs_next_ioctl(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, union smb_ioctl *io) { if (!ntvfs->next || !ntvfs->next->ops->ioctl) { return NT_STATUS_NOT_IMPLEMENTED; @@ -465,8 +465,8 @@ NTSTATUS ntvfs_next_ioctl(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->ioctl(ntvfs->next, req, io); } -NTSTATUS ntvfs_next_read(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, union smb_read *io) +_PUBLIC_ NTSTATUS ntvfs_next_read(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, union smb_read *io) { if (!ntvfs->next || !ntvfs->next->ops->read) { return NT_STATUS_NOT_IMPLEMENTED; @@ -474,8 +474,8 @@ NTSTATUS ntvfs_next_read(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->read(ntvfs->next, req, io); } -NTSTATUS ntvfs_next_write(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, union smb_write *io) +_PUBLIC_ NTSTATUS ntvfs_next_write(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, union smb_write *io) { if (!ntvfs->next || !ntvfs->next->ops->write) { return NT_STATUS_NOT_IMPLEMENTED; @@ -483,8 +483,8 @@ NTSTATUS ntvfs_next_write(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->write(ntvfs->next, req, io); } -NTSTATUS ntvfs_next_seek(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, struct smb_seek *io) +_PUBLIC_ NTSTATUS ntvfs_next_seek(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, struct smb_seek *io) { if (!ntvfs->next || !ntvfs->next->ops->seek) { return NT_STATUS_NOT_IMPLEMENTED; @@ -492,8 +492,8 @@ NTSTATUS ntvfs_next_seek(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->seek(ntvfs->next, req, io); } -NTSTATUS ntvfs_next_flush(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, struct smb_flush *flush) +_PUBLIC_ NTSTATUS ntvfs_next_flush(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, struct smb_flush *flush) { if (!ntvfs->next || !ntvfs->next->ops->flush) { return NT_STATUS_NOT_IMPLEMENTED; @@ -501,8 +501,8 @@ NTSTATUS ntvfs_next_flush(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->flush(ntvfs->next, req, flush); } -NTSTATUS ntvfs_next_close(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, union smb_close *io) +_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; @@ -510,8 +510,8 @@ NTSTATUS ntvfs_next_close(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->close(ntvfs->next, req, io); } -NTSTATUS ntvfs_next_exit(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req) +_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; @@ -519,8 +519,8 @@ NTSTATUS ntvfs_next_exit(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->exit(ntvfs->next, req); } -NTSTATUS ntvfs_next_lock(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, union smb_lock *lck) +_PUBLIC_ NTSTATUS ntvfs_next_lock(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, union smb_lock *lck) { if (!ntvfs->next || !ntvfs->next->ops->lock) { return NT_STATUS_NOT_IMPLEMENTED; @@ -528,8 +528,8 @@ NTSTATUS ntvfs_next_lock(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->lock(ntvfs->next, req, lck); } -NTSTATUS ntvfs_next_setfileinfo(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, union smb_setfileinfo *info) +_PUBLIC_ NTSTATUS ntvfs_next_setfileinfo(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, union smb_setfileinfo *info) { if (!ntvfs->next || !ntvfs->next->ops->setfileinfo) { return NT_STATUS_NOT_IMPLEMENTED; @@ -537,8 +537,8 @@ NTSTATUS ntvfs_next_setfileinfo(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->setfileinfo(ntvfs->next, req, info); } -NTSTATUS ntvfs_next_qfileinfo(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, union smb_fileinfo *info) +_PUBLIC_ NTSTATUS ntvfs_next_qfileinfo(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, union smb_fileinfo *info) { if (!ntvfs->next || !ntvfs->next->ops->qfileinfo) { return NT_STATUS_NOT_IMPLEMENTED; @@ -547,8 +547,8 @@ NTSTATUS ntvfs_next_qfileinfo(struct ntvfs_module_context *ntvfs, } /* filesystem operations */ -NTSTATUS ntvfs_next_fsinfo(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, union smb_fsinfo *fs) +_PUBLIC_ NTSTATUS ntvfs_next_fsinfo(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, union smb_fsinfo *fs) { if (!ntvfs->next || !ntvfs->next->ops->fsinfo) { return NT_STATUS_NOT_IMPLEMENTED; @@ -557,8 +557,8 @@ NTSTATUS ntvfs_next_fsinfo(struct ntvfs_module_context *ntvfs, } /* printing specific operations */ -NTSTATUS ntvfs_next_lpq(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, union smb_lpq *lpq) +_PUBLIC_ NTSTATUS ntvfs_next_lpq(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, union smb_lpq *lpq) { if (!ntvfs->next || !ntvfs->next->ops->lpq) { return NT_STATUS_NOT_IMPLEMENTED; @@ -567,8 +567,8 @@ NTSTATUS ntvfs_next_lpq(struct ntvfs_module_context *ntvfs, } /* trans2 interface - only used by CIFS backend to prover complete passthru for testing */ -NTSTATUS ntvfs_next_trans2(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, struct smb_trans2 *trans2) +_PUBLIC_ NTSTATUS ntvfs_next_trans2(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, struct smb_trans2 *trans2) { if (!ntvfs->next || !ntvfs->next->ops->trans2) { return NT_STATUS_NOT_IMPLEMENTED; @@ -577,8 +577,8 @@ NTSTATUS ntvfs_next_trans2(struct ntvfs_module_context *ntvfs, } /* trans interface - used by IPC backend for pipes and RAP calls */ -NTSTATUS ntvfs_next_trans(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, struct smb_trans2 *trans) +_PUBLIC_ NTSTATUS ntvfs_next_trans(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, struct smb_trans2 *trans) { if (!ntvfs->next || !ntvfs->next->ops->trans) { return NT_STATUS_NOT_IMPLEMENTED; @@ -587,8 +587,8 @@ NTSTATUS ntvfs_next_trans(struct ntvfs_module_context *ntvfs, } /* logoff - called when a vuid is closed */ -NTSTATUS ntvfs_next_logoff(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req) +_PUBLIC_ NTSTATUS ntvfs_next_logoff(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req) { if (!ntvfs->next || !ntvfs->next->ops->logoff) { return NT_STATUS_NOT_IMPLEMENTED; @@ -597,9 +597,9 @@ NTSTATUS ntvfs_next_logoff(struct ntvfs_module_context *ntvfs, } /* async_setup - called when setting up for a async request */ -NTSTATUS ntvfs_next_async_setup(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, - void *private) +_PUBLIC_ NTSTATUS ntvfs_next_async_setup(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, + void *private) { if (!ntvfs->next || !ntvfs->next->ops->async_setup) { return NT_STATUS_NOT_IMPLEMENTED; @@ -608,8 +608,8 @@ NTSTATUS ntvfs_next_async_setup(struct ntvfs_module_context *ntvfs, } /* cancel - called to cancel an outstanding async request */ -NTSTATUS ntvfs_next_cancel(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req) +_PUBLIC_ NTSTATUS ntvfs_next_cancel(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req) { if (!ntvfs->next || !ntvfs->next->ops->cancel) { return NT_STATUS_NOT_IMPLEMENTED; -- cgit From 418befec187066f6f107f1cf986d29bf77ca498c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 8 Mar 2006 03:54:24 +0000 Subject: r14011: - added a ntvfs_notify op to allow backends to support change notify - converted the nttrans server side code to be async (needed for change notify) This is the start of some work on supporting change notify via a new approach. More soon. (This used to be commit 0ad70bfd83b4a03c0e67f11f63822b833be67aa1) --- source4/ntvfs/ntvfs_interface.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'source4/ntvfs/ntvfs_interface.c') diff --git a/source4/ntvfs/ntvfs_interface.c b/source4/ntvfs/ntvfs_interface.c index 5a2415f5f9..be536d5eef 100644 --- a/source4/ntvfs/ntvfs_interface.c +++ b/source4/ntvfs/ntvfs_interface.c @@ -324,6 +324,19 @@ _PUBLIC_ NTSTATUS ntvfs_cancel(struct smbsrv_request *req) } +/* + change notify request +*/ +_PUBLIC_ NTSTATUS ntvfs_notify(struct smbsrv_request *req, struct smb_notify *info) +{ + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + if (!ntvfs->ops->notify) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->ops->notify(ntvfs, req, info); +} + + /* initial setup */ _PUBLIC_ NTSTATUS ntvfs_next_connect(struct ntvfs_module_context *ntvfs, struct smbsrv_request *req, const char *sharename) -- cgit From 30b4212a1a1101fee3ee8c9fe8fdc989bf9dc2b6 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 8 Mar 2006 11:13:13 +0000 Subject: r14037: add ntvfs_next_notify() metze (This used to be commit d4c0f8900e908bc70fd66059fc667432329abf89) --- source4/ntvfs/ntvfs_interface.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source4/ntvfs/ntvfs_interface.c') diff --git a/source4/ntvfs/ntvfs_interface.c b/source4/ntvfs/ntvfs_interface.c index be536d5eef..a3a605c0c8 100644 --- a/source4/ntvfs/ntvfs_interface.c +++ b/source4/ntvfs/ntvfs_interface.c @@ -629,3 +629,15 @@ _PUBLIC_ NTSTATUS ntvfs_next_cancel(struct ntvfs_module_context *ntvfs, } return ntvfs->next->ops->cancel(ntvfs->next, req); } + +/* + change notify request +*/ +_PUBLIC_ NTSTATUS ntvfs_next_notify(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, struct smb_notify *info) +{ + if (!ntvfs->next || !ntvfs->next->ops->notify) { + return NT_STATUS_NOT_IMPLEMENTED; + } + return ntvfs->next->ops->notify(ntvfs, req, info); +} -- cgit From 86497db6113c4ec3210d671c3fcf957d1026098c Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 10 Mar 2006 14:31:17 +0000 Subject: 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) --- source4/ntvfs/ntvfs_interface.c | 373 +++++++++++++++++++++------------------- 1 file changed, 199 insertions(+), 174 deletions(-) (limited to 'source4/ntvfs/ntvfs_interface.c') diff --git a/source4/ntvfs/ntvfs_interface.c b/source4/ntvfs/ntvfs_interface.c index a3a605c0c8..2be3170bd8 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); } -- cgit From 307e43bb5628e8b53a930c2928279af994281ba5 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 10 Mar 2006 20:49:20 +0000 Subject: r14173: change smb interface structures to always use a union smb_file, to abtract - const char *path fot qpathinfo and setpathinfo - uint16_t fnum for SMB - smb2_handle handle for SMB2 the idea is to later add a struct ntvfs_handle *ntvfs so that the ntvfs subsystem don't need to know the difference between SMB and SMB2 metze (This used to be commit 2ef3f5970901b5accdb50f0d0115b5d46b0c788f) --- source4/ntvfs/ntvfs_interface.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'source4/ntvfs/ntvfs_interface.c') diff --git a/source4/ntvfs/ntvfs_interface.c b/source4/ntvfs/ntvfs_interface.c index 2be3170bd8..68166e5132 100644 --- a/source4/ntvfs/ntvfs_interface.c +++ b/source4/ntvfs/ntvfs_interface.c @@ -68,7 +68,7 @@ _PUBLIC_ NTSTATUS ntvfs_fsinfo(struct ntvfs_request *req, union smb_fsinfo *fs) } /* path operations */ -_PUBLIC_ NTSTATUS ntvfs_unlink(struct ntvfs_request *req, struct smb_unlink *unl) +_PUBLIC_ NTSTATUS ntvfs_unlink(struct ntvfs_request *req, union smb_unlink *unl) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->unlink) { @@ -77,7 +77,7 @@ _PUBLIC_ NTSTATUS ntvfs_unlink(struct ntvfs_request *req, struct smb_unlink *unl return ntvfs->ops->unlink(ntvfs, req, unl); } -_PUBLIC_ NTSTATUS ntvfs_chkpath(struct ntvfs_request *req, struct smb_chkpath *cp) +_PUBLIC_ NTSTATUS ntvfs_chkpath(struct ntvfs_request *req, union smb_chkpath *cp) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->chkpath) { @@ -207,7 +207,7 @@ _PUBLIC_ NTSTATUS ntvfs_write(struct ntvfs_request *req, union smb_write *io) return ntvfs->ops->write(ntvfs, req, io); } -_PUBLIC_ NTSTATUS ntvfs_seek(struct ntvfs_request *req, struct smb_seek *io) +_PUBLIC_ NTSTATUS ntvfs_seek(struct ntvfs_request *req, union smb_seek *io) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->seek) { @@ -217,7 +217,7 @@ _PUBLIC_ NTSTATUS ntvfs_seek(struct ntvfs_request *req, struct smb_seek *io) } _PUBLIC_ NTSTATUS ntvfs_flush(struct ntvfs_request *req, - struct smb_flush *flush) + union smb_flush *flush) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->flush) { @@ -314,7 +314,7 @@ _PUBLIC_ NTSTATUS ntvfs_exit(struct ntvfs_request *req) /* change notify request */ -_PUBLIC_ NTSTATUS ntvfs_notify(struct ntvfs_request *req, struct smb_notify *info) +_PUBLIC_ NTSTATUS ntvfs_notify(struct ntvfs_request *req, union smb_notify *info) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->notify) { @@ -378,7 +378,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_fsinfo(struct ntvfs_module_context *ntvfs, /* path operations */ _PUBLIC_ NTSTATUS ntvfs_next_unlink(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, - struct smb_unlink *unl) + union smb_unlink *unl) { if (!ntvfs->next || !ntvfs->next->ops->unlink) { return NT_STATUS_NOT_IMPLEMENTED; @@ -388,7 +388,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_unlink(struct ntvfs_module_context *ntvfs, _PUBLIC_ NTSTATUS ntvfs_next_chkpath(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, - struct smb_chkpath *cp) + union smb_chkpath *cp) { if (!ntvfs->next || !ntvfs->next->ops->chkpath) { return NT_STATUS_NOT_IMPLEMENTED; @@ -533,7 +533,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_write(struct ntvfs_module_context *ntvfs, _PUBLIC_ NTSTATUS ntvfs_next_seek(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, - struct smb_seek *io) + union smb_seek *io) { if (!ntvfs->next || !ntvfs->next->ops->seek) { return NT_STATUS_NOT_IMPLEMENTED; @@ -543,7 +543,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_seek(struct ntvfs_module_context *ntvfs, _PUBLIC_ NTSTATUS ntvfs_next_flush(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, - struct smb_flush *flush) + union smb_flush *flush) { if (!ntvfs->next || !ntvfs->next->ops->flush) { return NT_STATUS_NOT_IMPLEMENTED; @@ -618,7 +618,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_trans2(struct ntvfs_module_context *ntvfs, */ _PUBLIC_ NTSTATUS ntvfs_next_notify(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, - struct smb_notify *info) + union smb_notify *info) { if (!ntvfs->next || !ntvfs->next->ops->notify) { return NT_STATUS_NOT_IMPLEMENTED; -- cgit From 2e7df84576d26bc37eb87b7e3c79fcb3fb358d68 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 15 Mar 2006 17:28:46 +0000 Subject: r14456: don't access the smbsrv_tcon inside the ntvfs modules metze (This used to be commit 5709c1c4e1a561dd9af98cfefbbbdac9b18765b7) --- source4/ntvfs/ntvfs_interface.c | 81 +++++++++++++++++++++++++---------------- 1 file changed, 50 insertions(+), 31 deletions(-) (limited to 'source4/ntvfs/ntvfs_interface.c') diff --git a/source4/ntvfs/ntvfs_interface.c b/source4/ntvfs/ntvfs_interface.c index 68166e5132..0888991877 100644 --- a/source4/ntvfs/ntvfs_interface.c +++ b/source4/ntvfs/ntvfs_interface.c @@ -26,7 +26,7 @@ /* connect/disconnect */ _PUBLIC_ NTSTATUS ntvfs_connect(struct ntvfs_request *req, const char *sharename) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->connect) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -50,7 +50,7 @@ _PUBLIC_ NTSTATUS ntvfs_disconnect(struct ntvfs_context *ntvfs_ctx) a async request */ _PUBLIC_ NTSTATUS ntvfs_async_setup(struct ntvfs_request *req, void *private) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->async_setup) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -60,7 +60,7 @@ _PUBLIC_ NTSTATUS ntvfs_async_setup(struct ntvfs_request *req, void *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; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->fsinfo) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -70,7 +70,7 @@ _PUBLIC_ NTSTATUS ntvfs_fsinfo(struct ntvfs_request *req, union smb_fsinfo *fs) /* path operations */ _PUBLIC_ NTSTATUS ntvfs_unlink(struct ntvfs_request *req, union smb_unlink *unl) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->unlink) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -79,7 +79,7 @@ _PUBLIC_ NTSTATUS ntvfs_unlink(struct ntvfs_request *req, union smb_unlink *unl) _PUBLIC_ NTSTATUS ntvfs_chkpath(struct ntvfs_request *req, union smb_chkpath *cp) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->chkpath) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -88,7 +88,7 @@ _PUBLIC_ NTSTATUS ntvfs_chkpath(struct ntvfs_request *req, union smb_chkpath *cp _PUBLIC_ NTSTATUS ntvfs_qpathinfo(struct ntvfs_request *req, union smb_fileinfo *st) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->qpathinfo) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -97,7 +97,7 @@ _PUBLIC_ NTSTATUS ntvfs_qpathinfo(struct ntvfs_request *req, union smb_fileinfo _PUBLIC_ NTSTATUS ntvfs_setpathinfo(struct ntvfs_request *req, union smb_setfileinfo *st) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->setpathinfo) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -106,7 +106,7 @@ _PUBLIC_ NTSTATUS ntvfs_setpathinfo(struct ntvfs_request *req, union smb_setfile _PUBLIC_ NTSTATUS ntvfs_open(struct ntvfs_request *req, union smb_open *oi) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->open) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -115,7 +115,7 @@ _PUBLIC_ NTSTATUS ntvfs_open(struct ntvfs_request *req, union smb_open *oi) _PUBLIC_ NTSTATUS ntvfs_mkdir(struct ntvfs_request *req, union smb_mkdir *md) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->mkdir) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -124,7 +124,7 @@ _PUBLIC_ NTSTATUS ntvfs_mkdir(struct ntvfs_request *req, union smb_mkdir *md) _PUBLIC_ NTSTATUS ntvfs_rmdir(struct ntvfs_request *req, struct smb_rmdir *rd) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->rmdir) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -133,7 +133,7 @@ _PUBLIC_ NTSTATUS ntvfs_rmdir(struct ntvfs_request *req, struct smb_rmdir *rd) _PUBLIC_ NTSTATUS ntvfs_rename(struct ntvfs_request *req, union smb_rename *ren) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->rename) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -142,7 +142,7 @@ _PUBLIC_ NTSTATUS ntvfs_rename(struct ntvfs_request *req, union smb_rename *ren) _PUBLIC_ NTSTATUS ntvfs_copy(struct ntvfs_request *req, struct smb_copy *cp) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->copy) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -153,7 +153,7 @@ _PUBLIC_ NTSTATUS ntvfs_copy(struct ntvfs_request *req, struct smb_copy *cp) _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; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->search_first) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -163,7 +163,7 @@ _PUBLIC_ NTSTATUS ntvfs_search_first(struct ntvfs_request *req, union smb_search _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; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->search_next) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -172,7 +172,7 @@ _PUBLIC_ NTSTATUS ntvfs_search_next(struct ntvfs_request *req, union smb_search_ _PUBLIC_ NTSTATUS ntvfs_search_close(struct ntvfs_request *req, union smb_search_close *io) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->search_close) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -182,7 +182,7 @@ _PUBLIC_ NTSTATUS ntvfs_search_close(struct ntvfs_request *req, union smb_search /* operations on open files */ _PUBLIC_ NTSTATUS ntvfs_ioctl(struct ntvfs_request *req, union smb_ioctl *io) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->ioctl) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -191,7 +191,7 @@ _PUBLIC_ NTSTATUS ntvfs_ioctl(struct ntvfs_request *req, union smb_ioctl *io) _PUBLIC_ NTSTATUS ntvfs_read(struct ntvfs_request *req, union smb_read *io) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->read) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -200,7 +200,7 @@ _PUBLIC_ NTSTATUS ntvfs_read(struct ntvfs_request *req, union smb_read *io) _PUBLIC_ NTSTATUS ntvfs_write(struct ntvfs_request *req, union smb_write *io) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->write) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -209,7 +209,7 @@ _PUBLIC_ NTSTATUS ntvfs_write(struct ntvfs_request *req, union smb_write *io) _PUBLIC_ NTSTATUS ntvfs_seek(struct ntvfs_request *req, union smb_seek *io) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->seek) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -219,7 +219,7 @@ _PUBLIC_ NTSTATUS ntvfs_seek(struct ntvfs_request *req, union smb_seek *io) _PUBLIC_ NTSTATUS ntvfs_flush(struct ntvfs_request *req, union smb_flush *flush) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->flush) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -228,7 +228,7 @@ _PUBLIC_ NTSTATUS ntvfs_flush(struct ntvfs_request *req, _PUBLIC_ NTSTATUS ntvfs_lock(struct ntvfs_request *req, union smb_lock *lck) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->lock) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -237,7 +237,7 @@ _PUBLIC_ NTSTATUS ntvfs_lock(struct ntvfs_request *req, union smb_lock *lck) _PUBLIC_ NTSTATUS ntvfs_qfileinfo(struct ntvfs_request *req, union smb_fileinfo *info) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->qfileinfo) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -246,7 +246,7 @@ _PUBLIC_ NTSTATUS ntvfs_qfileinfo(struct ntvfs_request *req, union smb_fileinfo _PUBLIC_ NTSTATUS ntvfs_setfileinfo(struct ntvfs_request *req, union smb_setfileinfo *info) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->setfileinfo) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -255,7 +255,7 @@ _PUBLIC_ NTSTATUS ntvfs_setfileinfo(struct ntvfs_request *req, union smb_setfile _PUBLIC_ NTSTATUS ntvfs_close(struct ntvfs_request *req, union smb_close *io) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->close) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -265,7 +265,7 @@ _PUBLIC_ NTSTATUS ntvfs_close(struct ntvfs_request *req, union smb_close *io) /* 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; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->trans) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -275,7 +275,7 @@ _PUBLIC_ NTSTATUS ntvfs_trans(struct ntvfs_request *req, struct smb_trans2 *tran /* trans2 interface - only used by CIFS backend to prover complete passthru for testing */ _PUBLIC_ NTSTATUS ntvfs_trans2(struct ntvfs_request *req, struct smb_trans2 *trans2) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->trans2) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -285,7 +285,7 @@ _PUBLIC_ NTSTATUS ntvfs_trans2(struct ntvfs_request *req, struct smb_trans2 *tra /* 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; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->lpq) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -295,7 +295,7 @@ _PUBLIC_ NTSTATUS ntvfs_lpq(struct ntvfs_request *req, union smb_lpq *lpq) /* logoff - called when a vuid is closed */ _PUBLIC_ NTSTATUS ntvfs_logoff(struct ntvfs_request *req) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->logoff) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -304,7 +304,7 @@ _PUBLIC_ NTSTATUS ntvfs_logoff(struct ntvfs_request *req) _PUBLIC_ NTSTATUS ntvfs_exit(struct ntvfs_request *req) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->exit) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -316,7 +316,7 @@ _PUBLIC_ NTSTATUS ntvfs_exit(struct ntvfs_request *req) */ _PUBLIC_ NTSTATUS ntvfs_notify(struct ntvfs_request *req, union smb_notify *info) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->notify) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -328,7 +328,7 @@ _PUBLIC_ NTSTATUS ntvfs_notify(struct ntvfs_request *req, union smb_notify *info */ _PUBLIC_ NTSTATUS ntvfs_cancel(struct ntvfs_request *req) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; + struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; if (!ntvfs->ops->cancel) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -666,3 +666,22 @@ _PUBLIC_ NTSTATUS ntvfs_next_exit(struct ntvfs_module_context *ntvfs, } return ntvfs->next->ops->exit(ntvfs->next, req); } + +_PUBLIC_ NTSTATUS ntvfs_set_oplock_handler(struct ntvfs_context *ntvfs, + NTSTATUS (*handler)(void *private_data, uint16_t fnum, uint8_t level), + void *private_data) +{ + ntvfs->oplock.handler = handler; + ntvfs->oplock.private_data = private_data; + return NT_STATUS_OK; +} + +_PUBLIC_ NTSTATUS ntvfs_send_oplock_break(struct ntvfs_module_context *ntvfs, + uint16_t fnum, uint8_t level) +{ + if (!ntvfs->ctx->oplock.handler) { + return NT_STATUS_OK; + } + + return ntvfs->ctx->oplock.handler(ntvfs->ctx->oplock.private_data, fnum, level); +} -- cgit From d3087451c4ec25171ba956fe2cd4e1d0f64f7edc Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 16 Mar 2006 18:54:19 +0000 Subject: r14487: split smbsrv_request into two parts, one will be moved to ntvfs_request but I don't to get the commit to large, to I'll do this tomorrow... metze (This used to be commit 10e627032d7d04f1ebf6efed248c426614f5aa6f) --- source4/ntvfs/ntvfs_interface.c | 93 +++++++++++++++++++++++++++-------------- 1 file changed, 62 insertions(+), 31 deletions(-) (limited to 'source4/ntvfs/ntvfs_interface.c') diff --git a/source4/ntvfs/ntvfs_interface.c b/source4/ntvfs/ntvfs_interface.c index 0888991877..f17acc9355 100644 --- a/source4/ntvfs/ntvfs_interface.c +++ b/source4/ntvfs/ntvfs_interface.c @@ -26,7 +26,7 @@ /* connect/disconnect */ _PUBLIC_ NTSTATUS ntvfs_connect(struct ntvfs_request *req, const char *sharename) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->connect) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -50,7 +50,7 @@ _PUBLIC_ NTSTATUS ntvfs_disconnect(struct ntvfs_context *ntvfs_ctx) a async request */ _PUBLIC_ NTSTATUS ntvfs_async_setup(struct ntvfs_request *req, void *private) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->async_setup) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -60,7 +60,7 @@ _PUBLIC_ NTSTATUS ntvfs_async_setup(struct ntvfs_request *req, void *private) /* filesystem operations */ _PUBLIC_ NTSTATUS ntvfs_fsinfo(struct ntvfs_request *req, union smb_fsinfo *fs) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->fsinfo) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -70,7 +70,7 @@ _PUBLIC_ NTSTATUS ntvfs_fsinfo(struct ntvfs_request *req, union smb_fsinfo *fs) /* path operations */ _PUBLIC_ NTSTATUS ntvfs_unlink(struct ntvfs_request *req, union smb_unlink *unl) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->unlink) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -79,7 +79,7 @@ _PUBLIC_ NTSTATUS ntvfs_unlink(struct ntvfs_request *req, union smb_unlink *unl) _PUBLIC_ NTSTATUS ntvfs_chkpath(struct ntvfs_request *req, union smb_chkpath *cp) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->chkpath) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -88,7 +88,7 @@ _PUBLIC_ NTSTATUS ntvfs_chkpath(struct ntvfs_request *req, union smb_chkpath *cp _PUBLIC_ NTSTATUS ntvfs_qpathinfo(struct ntvfs_request *req, union smb_fileinfo *st) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->qpathinfo) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -97,7 +97,7 @@ _PUBLIC_ NTSTATUS ntvfs_qpathinfo(struct ntvfs_request *req, union smb_fileinfo _PUBLIC_ NTSTATUS ntvfs_setpathinfo(struct ntvfs_request *req, union smb_setfileinfo *st) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->setpathinfo) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -106,7 +106,7 @@ _PUBLIC_ NTSTATUS ntvfs_setpathinfo(struct ntvfs_request *req, union smb_setfile _PUBLIC_ NTSTATUS ntvfs_open(struct ntvfs_request *req, union smb_open *oi) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->open) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -115,7 +115,7 @@ _PUBLIC_ NTSTATUS ntvfs_open(struct ntvfs_request *req, union smb_open *oi) _PUBLIC_ NTSTATUS ntvfs_mkdir(struct ntvfs_request *req, union smb_mkdir *md) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->mkdir) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -124,7 +124,7 @@ _PUBLIC_ NTSTATUS ntvfs_mkdir(struct ntvfs_request *req, union smb_mkdir *md) _PUBLIC_ NTSTATUS ntvfs_rmdir(struct ntvfs_request *req, struct smb_rmdir *rd) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->rmdir) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -133,7 +133,7 @@ _PUBLIC_ NTSTATUS ntvfs_rmdir(struct ntvfs_request *req, struct smb_rmdir *rd) _PUBLIC_ NTSTATUS ntvfs_rename(struct ntvfs_request *req, union smb_rename *ren) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->rename) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -142,7 +142,7 @@ _PUBLIC_ NTSTATUS ntvfs_rename(struct ntvfs_request *req, union smb_rename *ren) _PUBLIC_ NTSTATUS ntvfs_copy(struct ntvfs_request *req, struct smb_copy *cp) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->copy) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -153,7 +153,7 @@ _PUBLIC_ NTSTATUS ntvfs_copy(struct ntvfs_request *req, struct smb_copy *cp) _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->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->search_first) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -163,7 +163,7 @@ _PUBLIC_ NTSTATUS ntvfs_search_first(struct ntvfs_request *req, union smb_search _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->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->search_next) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -172,7 +172,7 @@ _PUBLIC_ NTSTATUS ntvfs_search_next(struct ntvfs_request *req, union smb_search_ _PUBLIC_ NTSTATUS ntvfs_search_close(struct ntvfs_request *req, union smb_search_close *io) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->search_close) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -182,7 +182,7 @@ _PUBLIC_ NTSTATUS ntvfs_search_close(struct ntvfs_request *req, union smb_search /* operations on open files */ _PUBLIC_ NTSTATUS ntvfs_ioctl(struct ntvfs_request *req, union smb_ioctl *io) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->ioctl) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -191,7 +191,7 @@ _PUBLIC_ NTSTATUS ntvfs_ioctl(struct ntvfs_request *req, union smb_ioctl *io) _PUBLIC_ NTSTATUS ntvfs_read(struct ntvfs_request *req, union smb_read *io) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->read) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -200,7 +200,7 @@ _PUBLIC_ NTSTATUS ntvfs_read(struct ntvfs_request *req, union smb_read *io) _PUBLIC_ NTSTATUS ntvfs_write(struct ntvfs_request *req, union smb_write *io) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->write) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -209,7 +209,7 @@ _PUBLIC_ NTSTATUS ntvfs_write(struct ntvfs_request *req, union smb_write *io) _PUBLIC_ NTSTATUS ntvfs_seek(struct ntvfs_request *req, union smb_seek *io) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->seek) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -219,7 +219,7 @@ _PUBLIC_ NTSTATUS ntvfs_seek(struct ntvfs_request *req, union smb_seek *io) _PUBLIC_ NTSTATUS ntvfs_flush(struct ntvfs_request *req, union smb_flush *flush) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->flush) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -228,7 +228,7 @@ _PUBLIC_ NTSTATUS ntvfs_flush(struct ntvfs_request *req, _PUBLIC_ NTSTATUS ntvfs_lock(struct ntvfs_request *req, union smb_lock *lck) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->lock) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -237,7 +237,7 @@ _PUBLIC_ NTSTATUS ntvfs_lock(struct ntvfs_request *req, union smb_lock *lck) _PUBLIC_ NTSTATUS ntvfs_qfileinfo(struct ntvfs_request *req, union smb_fileinfo *info) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->qfileinfo) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -246,7 +246,7 @@ _PUBLIC_ NTSTATUS ntvfs_qfileinfo(struct ntvfs_request *req, union smb_fileinfo _PUBLIC_ NTSTATUS ntvfs_setfileinfo(struct ntvfs_request *req, union smb_setfileinfo *info) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->setfileinfo) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -255,7 +255,7 @@ _PUBLIC_ NTSTATUS ntvfs_setfileinfo(struct ntvfs_request *req, union smb_setfile _PUBLIC_ NTSTATUS ntvfs_close(struct ntvfs_request *req, union smb_close *io) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->close) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -265,7 +265,7 @@ _PUBLIC_ NTSTATUS ntvfs_close(struct ntvfs_request *req, union smb_close *io) /* 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->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->trans) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -275,7 +275,7 @@ _PUBLIC_ NTSTATUS ntvfs_trans(struct ntvfs_request *req, struct smb_trans2 *tran /* trans2 interface - only used by CIFS backend to prover complete passthru for testing */ _PUBLIC_ NTSTATUS ntvfs_trans2(struct ntvfs_request *req, struct smb_trans2 *trans2) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->trans2) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -285,7 +285,7 @@ _PUBLIC_ NTSTATUS ntvfs_trans2(struct ntvfs_request *req, struct smb_trans2 *tra /* printing specific operations */ _PUBLIC_ NTSTATUS ntvfs_lpq(struct ntvfs_request *req, union smb_lpq *lpq) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->lpq) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -295,7 +295,7 @@ _PUBLIC_ NTSTATUS ntvfs_lpq(struct ntvfs_request *req, union smb_lpq *lpq) /* logoff - called when a vuid is closed */ _PUBLIC_ NTSTATUS ntvfs_logoff(struct ntvfs_request *req) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->logoff) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -304,7 +304,7 @@ _PUBLIC_ NTSTATUS ntvfs_logoff(struct ntvfs_request *req) _PUBLIC_ NTSTATUS ntvfs_exit(struct ntvfs_request *req) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->exit) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -316,7 +316,7 @@ _PUBLIC_ NTSTATUS ntvfs_exit(struct ntvfs_request *req) */ _PUBLIC_ NTSTATUS ntvfs_notify(struct ntvfs_request *req, union smb_notify *info) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->notify) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -328,7 +328,7 @@ _PUBLIC_ NTSTATUS ntvfs_notify(struct ntvfs_request *req, union smb_notify *info */ _PUBLIC_ NTSTATUS ntvfs_cancel(struct ntvfs_request *req) { - struct ntvfs_module_context *ntvfs = req->tcon->ntvfs->modules; + struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->cancel) { return NT_STATUS_NOT_IMPLEMENTED; } @@ -667,6 +667,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_exit(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->exit(ntvfs->next, req); } +/* oplock helpers */ _PUBLIC_ NTSTATUS ntvfs_set_oplock_handler(struct ntvfs_context *ntvfs, NTSTATUS (*handler)(void *private_data, uint16_t fnum, uint8_t level), void *private_data) @@ -685,3 +686,33 @@ _PUBLIC_ NTSTATUS ntvfs_send_oplock_break(struct ntvfs_module_context *ntvfs, return ntvfs->ctx->oplock.handler(ntvfs->ctx->oplock.private_data, fnum, level); } + +/* client connection callback */ +_PUBLIC_ NTSTATUS ntvfs_set_addr_callbacks(struct ntvfs_context *ntvfs, + struct socket_address *(*my_addr)(void *private_data, TALLOC_CTX *mem_ctx), + struct socket_address *(*peer_addr)(void *private_data, TALLOC_CTX *mem_ctx), + void *private_data) +{ + ntvfs->client.get_peer_addr = my_addr; + ntvfs->client.get_my_addr = peer_addr; + ntvfs->client.private_data = private_data; + return NT_STATUS_OK; +} + +_PUBLIC_ struct socket_address *ntvfs_get_my_addr(struct ntvfs_module_context *ntvfs, TALLOC_CTX *mem_ctx) +{ + if (!ntvfs->ctx->client.get_my_addr) { + return NULL; + } + + return ntvfs->ctx->client.get_my_addr(ntvfs->ctx->client.private_data, mem_ctx); +} + +_PUBLIC_ struct socket_address *ntvfs_get_peer_addr(struct ntvfs_module_context *ntvfs, TALLOC_CTX *mem_ctx) +{ + if (!ntvfs->ctx->client.get_peer_addr) { + return NULL; + } + + return ntvfs->ctx->client.get_peer_addr(ntvfs->ctx->client.private_data, mem_ctx); +} -- cgit From 9225c02aee19478fc4825c4b798a6757d140b5c0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 18 Mar 2006 09:07:47 +0000 Subject: r14539: get rid of a pointless union layer in struct smb_notify (This used to be commit 1e1c5593817e84c59c1a10b5a3c1957e363e5198) --- source4/ntvfs/ntvfs_interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/ntvfs/ntvfs_interface.c') diff --git a/source4/ntvfs/ntvfs_interface.c b/source4/ntvfs/ntvfs_interface.c index f17acc9355..a47c965b2a 100644 --- a/source4/ntvfs/ntvfs_interface.c +++ b/source4/ntvfs/ntvfs_interface.c @@ -314,7 +314,7 @@ _PUBLIC_ NTSTATUS ntvfs_exit(struct ntvfs_request *req) /* change notify request */ -_PUBLIC_ NTSTATUS ntvfs_notify(struct ntvfs_request *req, union smb_notify *info) +_PUBLIC_ NTSTATUS ntvfs_notify(struct ntvfs_request *req, struct smb_notify *info) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->notify) { @@ -618,7 +618,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_trans2(struct ntvfs_module_context *ntvfs, */ _PUBLIC_ NTSTATUS ntvfs_next_notify(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, - union smb_notify *info) + struct smb_notify *info) { if (!ntvfs->next || !ntvfs->next->ops->notify) { return NT_STATUS_NOT_IMPLEMENTED; -- cgit From 582c039ab14d79501362761811197477752372a9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 21 Mar 2006 11:38:57 +0000 Subject: r14613: fixed ntvfs_notify_next() (This used to be commit 9bf7d322d014d0d7dc603427b233acd97fae5734) --- source4/ntvfs/ntvfs_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/ntvfs/ntvfs_interface.c') diff --git a/source4/ntvfs/ntvfs_interface.c b/source4/ntvfs/ntvfs_interface.c index a47c965b2a..945eb232e2 100644 --- a/source4/ntvfs/ntvfs_interface.c +++ b/source4/ntvfs/ntvfs_interface.c @@ -623,7 +623,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_notify(struct ntvfs_module_context *ntvfs, if (!ntvfs->next || !ntvfs->next->ops->notify) { return NT_STATUS_NOT_IMPLEMENTED; } - return ntvfs->next->ops->notify(ntvfs, req, info); + return ntvfs->next->ops->notify(ntvfs->next, req, info); } /* cancel - called to cancel an outstanding async request */ -- cgit From ad06a8bd651e3a8b598c92a356ac1ce4117ae72e Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sun, 26 Mar 2006 01:23:40 +0000 Subject: r14736: - the ntvfs subsystem should not know about smb_server.h - the process module subsystem should not know about smb_server.h - the smb_server module should not know about process models metze (This used to be commit bac95bb8f4ad35a31ee666f5916ff9b2f292d964) --- source4/ntvfs/ntvfs_interface.c | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/ntvfs/ntvfs_interface.c') diff --git a/source4/ntvfs/ntvfs_interface.c b/source4/ntvfs/ntvfs_interface.c index 945eb232e2..c26832d96e 100644 --- a/source4/ntvfs/ntvfs_interface.c +++ b/source4/ntvfs/ntvfs_interface.c @@ -20,7 +20,6 @@ */ #include "includes.h" -#include "smb_server/smb_server.h" #include "ntvfs/ntvfs.h" /* connect/disconnect */ -- cgit From 9ef33f5f5c786b83311ca088357fb2f0aa72fc9e Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 20 May 2006 08:15:22 +0000 Subject: r15734: This is a major change to the NTVFS subsystem: - to use a struct ntvfs_handle instead of a uint16_t fnum. (to make it independend from the frontend protocol) - the allocation of handles now is provided by the frontend (smbsrv_*) via callbacks and not by each backend module - this also makes sure that file handles are only passed to the ntvfs subsystem when the tcon and session matches, so modules can rely on this and need to check this. - this allows multiple modules in the ntvfs module chain to allocate file handles. This can be used for virtual files like "\\$Extend\\$Quota:$Q:$INDEX_ALLOCATION"... - also this will make SMB2 with 128 bit file handles possible metze (This used to be commit 287fc1c22d670f6e568014b420f7f4cb31dc7958) --- source4/ntvfs/ntvfs_interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source4/ntvfs/ntvfs_interface.c') diff --git a/source4/ntvfs/ntvfs_interface.c b/source4/ntvfs/ntvfs_interface.c index c26832d96e..67cbe8df22 100644 --- a/source4/ntvfs/ntvfs_interface.c +++ b/source4/ntvfs/ntvfs_interface.c @@ -668,7 +668,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_exit(struct ntvfs_module_context *ntvfs, /* oplock helpers */ _PUBLIC_ NTSTATUS ntvfs_set_oplock_handler(struct ntvfs_context *ntvfs, - NTSTATUS (*handler)(void *private_data, uint16_t fnum, uint8_t level), + NTSTATUS (*handler)(void *private_data, struct ntvfs_handle *handle, uint8_t level), void *private_data) { ntvfs->oplock.handler = handler; @@ -677,13 +677,13 @@ _PUBLIC_ NTSTATUS ntvfs_set_oplock_handler(struct ntvfs_context *ntvfs, } _PUBLIC_ NTSTATUS ntvfs_send_oplock_break(struct ntvfs_module_context *ntvfs, - uint16_t fnum, uint8_t level) + struct ntvfs_handle *handle, uint8_t level) { if (!ntvfs->ctx->oplock.handler) { return NT_STATUS_OK; } - return ntvfs->ctx->oplock.handler(ntvfs->ctx->oplock.private_data, fnum, level); + return ntvfs->ctx->oplock.handler(ntvfs->ctx->oplock.private_data, handle, level); } /* client connection callback */ -- cgit From a8958391e8fd9ddd996d2d3aff7ddeed3243fc1f Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 12 Jul 2006 14:25:50 +0000 Subject: r16980: - make struct smb_notify a union and add levels RAW_NOTIFY_NTTRANS,RAW_NOTIFY_SMB2 - parse SMB2 Notify reponse metze (This used to be commit de50e0ccddfad16ad7b254770f4c52c1abe707b9) --- source4/ntvfs/ntvfs_interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/ntvfs/ntvfs_interface.c') diff --git a/source4/ntvfs/ntvfs_interface.c b/source4/ntvfs/ntvfs_interface.c index 67cbe8df22..fc8fccca33 100644 --- a/source4/ntvfs/ntvfs_interface.c +++ b/source4/ntvfs/ntvfs_interface.c @@ -313,7 +313,7 @@ _PUBLIC_ NTSTATUS ntvfs_exit(struct ntvfs_request *req) /* change notify request */ -_PUBLIC_ NTSTATUS ntvfs_notify(struct ntvfs_request *req, struct smb_notify *info) +_PUBLIC_ NTSTATUS ntvfs_notify(struct ntvfs_request *req, union smb_notify *info) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->notify) { @@ -617,7 +617,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_trans2(struct ntvfs_module_context *ntvfs, */ _PUBLIC_ NTSTATUS ntvfs_next_notify(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, - struct smb_notify *info) + union smb_notify *info) { if (!ntvfs->next || !ntvfs->next->ops->notify) { return NT_STATUS_NOT_IMPLEMENTED; -- cgit From 42c1ef4025186066660b1bb187d063e07bb493ff Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 22 May 2007 09:25:58 +0000 Subject: r23067: use 'const union smb_search_data *file' also in the server code to get rid of compiler warnings in the cifs backend metze (This used to be commit 34ef07b1f5acdad27edd80de8de4c6de7f879f9b) --- source4/ntvfs/ntvfs_interface.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/ntvfs/ntvfs_interface.c') diff --git a/source4/ntvfs/ntvfs_interface.c b/source4/ntvfs/ntvfs_interface.c index fc8fccca33..4a5fd42384 100644 --- a/source4/ntvfs/ntvfs_interface.c +++ b/source4/ntvfs/ntvfs_interface.c @@ -150,7 +150,7 @@ _PUBLIC_ NTSTATUS ntvfs_copy(struct ntvfs_request *req, struct smb_copy *cp) /* directory search */ _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)) + BOOL ntvfs_callback(void *private, const union smb_search_data *file)) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->search_first) { @@ -160,7 +160,7 @@ _PUBLIC_ NTSTATUS ntvfs_search_first(struct ntvfs_request *req, union smb_search } _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)) + BOOL ntvfs_callback(void *private, const union smb_search_data *file)) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->search_next) { @@ -470,7 +470,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_open(struct ntvfs_module_context *ntvfs, _PUBLIC_ NTSTATUS ntvfs_next_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)) + BOOL (*callback)(void *private, const union smb_search_data *file)) { if (!ntvfs->next || !ntvfs->next->ops->search_first) { return NT_STATUS_NOT_IMPLEMENTED; @@ -481,7 +481,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_search_first(struct ntvfs_module_context *ntvfs, _PUBLIC_ NTSTATUS ntvfs_next_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)) + BOOL (*callback)(void *private, const union smb_search_data *file)) { if (!ntvfs->next || !ntvfs->next->ops->search_next) { return NT_STATUS_NOT_IMPLEMENTED; -- cgit From 0479a2f1cbae51fcd8dbdc3c148c808421fb4d25 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 02:07:03 +0000 Subject: r23792: convert Samba4 to GPLv3 There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa) --- source4/ntvfs/ntvfs_interface.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source4/ntvfs/ntvfs_interface.c') diff --git a/source4/ntvfs/ntvfs_interface.c b/source4/ntvfs/ntvfs_interface.c index 4a5fd42384..74fb815359 100644 --- a/source4/ntvfs/ntvfs_interface.c +++ b/source4/ntvfs/ntvfs_interface.c @@ -6,7 +6,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -15,8 +15,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ #include "includes.h" -- cgit From 2151cde58014ea2e822c13d2f8a369b45dc19ca8 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 6 Oct 2007 22:28:14 +0000 Subject: r25554: Convert last instances of BOOL, True and False to the standard types. (This used to be commit 566aa14139510788548a874e9213d91317f83ca9) --- source4/ntvfs/ntvfs_interface.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/ntvfs/ntvfs_interface.c') diff --git a/source4/ntvfs/ntvfs_interface.c b/source4/ntvfs/ntvfs_interface.c index 74fb815359..3bd2859388 100644 --- a/source4/ntvfs/ntvfs_interface.c +++ b/source4/ntvfs/ntvfs_interface.c @@ -149,7 +149,7 @@ _PUBLIC_ NTSTATUS ntvfs_copy(struct ntvfs_request *req, struct smb_copy *cp) /* directory search */ _PUBLIC_ NTSTATUS ntvfs_search_first(struct ntvfs_request *req, union smb_search_first *io, void *private, - BOOL ntvfs_callback(void *private, const union smb_search_data *file)) + bool ntvfs_callback(void *private, const union smb_search_data *file)) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->search_first) { @@ -159,7 +159,7 @@ _PUBLIC_ NTSTATUS ntvfs_search_first(struct ntvfs_request *req, union smb_search } _PUBLIC_ NTSTATUS ntvfs_search_next(struct ntvfs_request *req, union smb_search_next *io, void *private, - BOOL ntvfs_callback(void *private, const union smb_search_data *file)) + bool ntvfs_callback(void *private, const union smb_search_data *file)) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->search_next) { @@ -469,7 +469,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_open(struct ntvfs_module_context *ntvfs, _PUBLIC_ NTSTATUS ntvfs_next_search_first(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_search_first *io, void *private, - BOOL (*callback)(void *private, const union smb_search_data *file)) + bool (*callback)(void *private, const union smb_search_data *file)) { if (!ntvfs->next || !ntvfs->next->ops->search_first) { return NT_STATUS_NOT_IMPLEMENTED; @@ -480,7 +480,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_search_first(struct ntvfs_module_context *ntvfs, _PUBLIC_ NTSTATUS ntvfs_next_search_next(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_search_next *io, void *private, - BOOL (*callback)(void *private, const union smb_search_data *file)) + bool (*callback)(void *private, const union smb_search_data *file)) { if (!ntvfs->next || !ntvfs->next->ops->search_next) { return NT_STATUS_NOT_IMPLEMENTED; -- cgit From afe3e8172ddaa5e4aa811faceecda4f943d6e2ef Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 2 Apr 2008 04:53:27 +0200 Subject: Install public header files again and include required prototypes. (This used to be commit 47ffbbf67435904754469544390b67d34c958343) --- source4/ntvfs/ntvfs_interface.c | 138 ++++++++++++++++++++-------------------- 1 file changed, 69 insertions(+), 69 deletions(-) (limited to 'source4/ntvfs/ntvfs_interface.c') diff --git a/source4/ntvfs/ntvfs_interface.c b/source4/ntvfs/ntvfs_interface.c index 3bd2859388..c348558fca 100644 --- a/source4/ntvfs/ntvfs_interface.c +++ b/source4/ntvfs/ntvfs_interface.c @@ -22,7 +22,7 @@ #include "ntvfs/ntvfs.h" /* connect/disconnect */ -_PUBLIC_ NTSTATUS ntvfs_connect(struct ntvfs_request *req, const char *sharename) +NTSTATUS ntvfs_connect(struct ntvfs_request *req, const char *sharename) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->connect) { @@ -31,7 +31,7 @@ _PUBLIC_ NTSTATUS ntvfs_connect(struct ntvfs_request *req, const char *sharename return ntvfs->ops->connect(ntvfs, req, sharename); } -_PUBLIC_ NTSTATUS ntvfs_disconnect(struct ntvfs_context *ntvfs_ctx) +NTSTATUS ntvfs_disconnect(struct ntvfs_context *ntvfs_ctx) { struct ntvfs_module_context *ntvfs; if (ntvfs_ctx == NULL) { @@ -46,7 +46,7 @@ _PUBLIC_ NTSTATUS ntvfs_disconnect(struct ntvfs_context *ntvfs_ctx) /* 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) +NTSTATUS ntvfs_async_setup(struct ntvfs_request *req, void *private) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->async_setup) { @@ -56,7 +56,7 @@ _PUBLIC_ NTSTATUS ntvfs_async_setup(struct ntvfs_request *req, void *private) } /* filesystem operations */ -_PUBLIC_ NTSTATUS ntvfs_fsinfo(struct ntvfs_request *req, union smb_fsinfo *fs) +NTSTATUS ntvfs_fsinfo(struct ntvfs_request *req, union smb_fsinfo *fs) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->fsinfo) { @@ -66,7 +66,7 @@ _PUBLIC_ NTSTATUS ntvfs_fsinfo(struct ntvfs_request *req, union smb_fsinfo *fs) } /* path operations */ -_PUBLIC_ NTSTATUS ntvfs_unlink(struct ntvfs_request *req, union smb_unlink *unl) +NTSTATUS ntvfs_unlink(struct ntvfs_request *req, union smb_unlink *unl) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->unlink) { @@ -75,7 +75,7 @@ _PUBLIC_ NTSTATUS ntvfs_unlink(struct ntvfs_request *req, union smb_unlink *unl) return ntvfs->ops->unlink(ntvfs, req, unl); } -_PUBLIC_ NTSTATUS ntvfs_chkpath(struct ntvfs_request *req, union smb_chkpath *cp) +NTSTATUS ntvfs_chkpath(struct ntvfs_request *req, union smb_chkpath *cp) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->chkpath) { @@ -84,7 +84,7 @@ _PUBLIC_ NTSTATUS ntvfs_chkpath(struct ntvfs_request *req, union smb_chkpath *cp return ntvfs->ops->chkpath(ntvfs, req, cp); } -_PUBLIC_ NTSTATUS ntvfs_qpathinfo(struct ntvfs_request *req, union smb_fileinfo *st) +NTSTATUS ntvfs_qpathinfo(struct ntvfs_request *req, union smb_fileinfo *st) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->qpathinfo) { @@ -93,7 +93,7 @@ _PUBLIC_ NTSTATUS ntvfs_qpathinfo(struct ntvfs_request *req, union smb_fileinfo return ntvfs->ops->qpathinfo(ntvfs, req, st); } -_PUBLIC_ NTSTATUS ntvfs_setpathinfo(struct ntvfs_request *req, union smb_setfileinfo *st) +NTSTATUS ntvfs_setpathinfo(struct ntvfs_request *req, union smb_setfileinfo *st) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->setpathinfo) { @@ -102,7 +102,7 @@ _PUBLIC_ NTSTATUS ntvfs_setpathinfo(struct ntvfs_request *req, union smb_setfile return ntvfs->ops->setpathinfo(ntvfs, req, st); } -_PUBLIC_ NTSTATUS ntvfs_open(struct ntvfs_request *req, union smb_open *oi) +NTSTATUS ntvfs_open(struct ntvfs_request *req, union smb_open *oi) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->open) { @@ -111,7 +111,7 @@ _PUBLIC_ NTSTATUS ntvfs_open(struct ntvfs_request *req, union smb_open *oi) return ntvfs->ops->open(ntvfs, req, oi); } -_PUBLIC_ NTSTATUS ntvfs_mkdir(struct ntvfs_request *req, union smb_mkdir *md) +NTSTATUS ntvfs_mkdir(struct ntvfs_request *req, union smb_mkdir *md) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->mkdir) { @@ -120,7 +120,7 @@ _PUBLIC_ NTSTATUS ntvfs_mkdir(struct ntvfs_request *req, union smb_mkdir *md) return ntvfs->ops->mkdir(ntvfs, req, md); } -_PUBLIC_ NTSTATUS ntvfs_rmdir(struct ntvfs_request *req, struct smb_rmdir *rd) +NTSTATUS ntvfs_rmdir(struct ntvfs_request *req, struct smb_rmdir *rd) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->rmdir) { @@ -129,7 +129,7 @@ _PUBLIC_ NTSTATUS ntvfs_rmdir(struct ntvfs_request *req, struct smb_rmdir *rd) return ntvfs->ops->rmdir(ntvfs, req, rd); } -_PUBLIC_ NTSTATUS ntvfs_rename(struct ntvfs_request *req, union smb_rename *ren) +NTSTATUS ntvfs_rename(struct ntvfs_request *req, union smb_rename *ren) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->rename) { @@ -138,7 +138,7 @@ _PUBLIC_ NTSTATUS ntvfs_rename(struct ntvfs_request *req, union smb_rename *ren) return ntvfs->ops->rename(ntvfs, req, ren); } -_PUBLIC_ NTSTATUS ntvfs_copy(struct ntvfs_request *req, struct smb_copy *cp) +NTSTATUS ntvfs_copy(struct ntvfs_request *req, struct smb_copy *cp) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->copy) { @@ -148,7 +148,7 @@ _PUBLIC_ NTSTATUS ntvfs_copy(struct ntvfs_request *req, struct smb_copy *cp) } /* directory search */ -_PUBLIC_ NTSTATUS ntvfs_search_first(struct ntvfs_request *req, union smb_search_first *io, void *private, +NTSTATUS ntvfs_search_first(struct ntvfs_request *req, union smb_search_first *io, void *private, bool ntvfs_callback(void *private, const union smb_search_data *file)) { struct ntvfs_module_context *ntvfs = req->ctx->modules; @@ -158,7 +158,7 @@ _PUBLIC_ NTSTATUS ntvfs_search_first(struct ntvfs_request *req, union smb_search return ntvfs->ops->search_first(ntvfs, req, io, private, ntvfs_callback); } -_PUBLIC_ NTSTATUS ntvfs_search_next(struct ntvfs_request *req, union smb_search_next *io, void *private, +NTSTATUS ntvfs_search_next(struct ntvfs_request *req, union smb_search_next *io, void *private, bool ntvfs_callback(void *private, const union smb_search_data *file)) { struct ntvfs_module_context *ntvfs = req->ctx->modules; @@ -168,7 +168,7 @@ _PUBLIC_ NTSTATUS ntvfs_search_next(struct ntvfs_request *req, union smb_search_ return ntvfs->ops->search_next(ntvfs, req, io, private, ntvfs_callback); } -_PUBLIC_ NTSTATUS ntvfs_search_close(struct ntvfs_request *req, union smb_search_close *io) +NTSTATUS ntvfs_search_close(struct ntvfs_request *req, union smb_search_close *io) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->search_close) { @@ -178,7 +178,7 @@ _PUBLIC_ NTSTATUS ntvfs_search_close(struct ntvfs_request *req, union smb_search } /* operations on open files */ -_PUBLIC_ NTSTATUS ntvfs_ioctl(struct ntvfs_request *req, union smb_ioctl *io) +NTSTATUS ntvfs_ioctl(struct ntvfs_request *req, union smb_ioctl *io) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->ioctl) { @@ -187,7 +187,7 @@ _PUBLIC_ NTSTATUS ntvfs_ioctl(struct ntvfs_request *req, union smb_ioctl *io) return ntvfs->ops->ioctl(ntvfs, req, io); } -_PUBLIC_ NTSTATUS ntvfs_read(struct ntvfs_request *req, union smb_read *io) +NTSTATUS ntvfs_read(struct ntvfs_request *req, union smb_read *io) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->read) { @@ -196,7 +196,7 @@ _PUBLIC_ NTSTATUS ntvfs_read(struct ntvfs_request *req, union smb_read *io) return ntvfs->ops->read(ntvfs, req, io); } -_PUBLIC_ NTSTATUS ntvfs_write(struct ntvfs_request *req, union smb_write *io) +NTSTATUS ntvfs_write(struct ntvfs_request *req, union smb_write *io) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->write) { @@ -205,7 +205,7 @@ _PUBLIC_ NTSTATUS ntvfs_write(struct ntvfs_request *req, union smb_write *io) return ntvfs->ops->write(ntvfs, req, io); } -_PUBLIC_ NTSTATUS ntvfs_seek(struct ntvfs_request *req, union smb_seek *io) +NTSTATUS ntvfs_seek(struct ntvfs_request *req, union smb_seek *io) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->seek) { @@ -214,7 +214,7 @@ _PUBLIC_ NTSTATUS ntvfs_seek(struct ntvfs_request *req, union smb_seek *io) return ntvfs->ops->seek(ntvfs, req, io); } -_PUBLIC_ NTSTATUS ntvfs_flush(struct ntvfs_request *req, +NTSTATUS ntvfs_flush(struct ntvfs_request *req, union smb_flush *flush) { struct ntvfs_module_context *ntvfs = req->ctx->modules; @@ -224,7 +224,7 @@ _PUBLIC_ NTSTATUS ntvfs_flush(struct ntvfs_request *req, return ntvfs->ops->flush(ntvfs, req, flush); } -_PUBLIC_ NTSTATUS ntvfs_lock(struct ntvfs_request *req, union smb_lock *lck) +NTSTATUS ntvfs_lock(struct ntvfs_request *req, union smb_lock *lck) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->lock) { @@ -233,7 +233,7 @@ _PUBLIC_ NTSTATUS ntvfs_lock(struct ntvfs_request *req, union smb_lock *lck) return ntvfs->ops->lock(ntvfs, req, lck); } -_PUBLIC_ NTSTATUS ntvfs_qfileinfo(struct ntvfs_request *req, union smb_fileinfo *info) +NTSTATUS ntvfs_qfileinfo(struct ntvfs_request *req, union smb_fileinfo *info) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->qfileinfo) { @@ -242,7 +242,7 @@ _PUBLIC_ NTSTATUS ntvfs_qfileinfo(struct ntvfs_request *req, union smb_fileinfo return ntvfs->ops->qfileinfo(ntvfs, req, info); } -_PUBLIC_ NTSTATUS ntvfs_setfileinfo(struct ntvfs_request *req, union smb_setfileinfo *info) +NTSTATUS ntvfs_setfileinfo(struct ntvfs_request *req, union smb_setfileinfo *info) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->setfileinfo) { @@ -251,7 +251,7 @@ _PUBLIC_ NTSTATUS ntvfs_setfileinfo(struct ntvfs_request *req, union smb_setfile return ntvfs->ops->setfileinfo(ntvfs, req, info); } -_PUBLIC_ NTSTATUS ntvfs_close(struct ntvfs_request *req, union smb_close *io) +NTSTATUS ntvfs_close(struct ntvfs_request *req, union smb_close *io) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->close) { @@ -261,7 +261,7 @@ _PUBLIC_ NTSTATUS ntvfs_close(struct ntvfs_request *req, union smb_close *io) } /* trans interface - used by IPC backend for pipes and RAP calls */ -_PUBLIC_ NTSTATUS ntvfs_trans(struct ntvfs_request *req, struct smb_trans2 *trans) +NTSTATUS ntvfs_trans(struct ntvfs_request *req, struct smb_trans2 *trans) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->trans) { @@ -271,7 +271,7 @@ _PUBLIC_ NTSTATUS ntvfs_trans(struct ntvfs_request *req, struct smb_trans2 *tran } /* trans2 interface - only used by CIFS backend to prover complete passthru for testing */ -_PUBLIC_ NTSTATUS ntvfs_trans2(struct ntvfs_request *req, struct smb_trans2 *trans2) +NTSTATUS ntvfs_trans2(struct ntvfs_request *req, struct smb_trans2 *trans2) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->trans2) { @@ -281,7 +281,7 @@ _PUBLIC_ NTSTATUS ntvfs_trans2(struct ntvfs_request *req, struct smb_trans2 *tra } /* printing specific operations */ -_PUBLIC_ NTSTATUS ntvfs_lpq(struct ntvfs_request *req, union smb_lpq *lpq) +NTSTATUS ntvfs_lpq(struct ntvfs_request *req, union smb_lpq *lpq) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->lpq) { @@ -291,7 +291,7 @@ _PUBLIC_ NTSTATUS ntvfs_lpq(struct ntvfs_request *req, union smb_lpq *lpq) } /* logoff - called when a vuid is closed */ -_PUBLIC_ NTSTATUS ntvfs_logoff(struct ntvfs_request *req) +NTSTATUS ntvfs_logoff(struct ntvfs_request *req) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->logoff) { @@ -300,7 +300,7 @@ _PUBLIC_ NTSTATUS ntvfs_logoff(struct ntvfs_request *req) return ntvfs->ops->logoff(ntvfs, req); } -_PUBLIC_ NTSTATUS ntvfs_exit(struct ntvfs_request *req) +NTSTATUS ntvfs_exit(struct ntvfs_request *req) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->exit) { @@ -312,7 +312,7 @@ _PUBLIC_ NTSTATUS ntvfs_exit(struct ntvfs_request *req) /* change notify request */ -_PUBLIC_ NTSTATUS ntvfs_notify(struct ntvfs_request *req, union smb_notify *info) +NTSTATUS ntvfs_notify(struct ntvfs_request *req, union smb_notify *info) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->notify) { @@ -324,7 +324,7 @@ _PUBLIC_ NTSTATUS ntvfs_notify(struct ntvfs_request *req, union smb_notify *info /* cancel an outstanding async request */ -_PUBLIC_ NTSTATUS ntvfs_cancel(struct ntvfs_request *req) +NTSTATUS ntvfs_cancel(struct ntvfs_request *req) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->cancel) { @@ -334,7 +334,7 @@ _PUBLIC_ NTSTATUS ntvfs_cancel(struct ntvfs_request *req) } /* initial setup */ -_PUBLIC_ NTSTATUS ntvfs_next_connect(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_connect(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, const char *sharename) { if (!ntvfs->next || !ntvfs->next->ops->connect) { @@ -343,7 +343,7 @@ _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) +NTSTATUS ntvfs_next_disconnect(struct ntvfs_module_context *ntvfs) { if (!ntvfs->next || !ntvfs->next->ops->disconnect) { return NT_STATUS_NOT_IMPLEMENTED; @@ -352,7 +352,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_disconnect(struct ntvfs_module_context *ntvfs) } /* async_setup - called when setting up for a async request */ -_PUBLIC_ NTSTATUS ntvfs_next_async_setup(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_async_setup(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, void *private) { @@ -363,7 +363,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_async_setup(struct ntvfs_module_context *ntvfs, } /* filesystem operations */ -_PUBLIC_ NTSTATUS ntvfs_next_fsinfo(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_fsinfo(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_fsinfo *fs) { @@ -374,7 +374,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_fsinfo(struct ntvfs_module_context *ntvfs, } /* path operations */ -_PUBLIC_ NTSTATUS ntvfs_next_unlink(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_unlink(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_unlink *unl) { @@ -384,7 +384,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_unlink(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->unlink(ntvfs->next, req, unl); } -_PUBLIC_ NTSTATUS ntvfs_next_chkpath(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_chkpath(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_chkpath *cp) { @@ -394,7 +394,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_chkpath(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->chkpath(ntvfs->next, req, cp); } -_PUBLIC_ NTSTATUS ntvfs_next_qpathinfo(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_qpathinfo(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_fileinfo *st) { @@ -404,7 +404,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_qpathinfo(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->qpathinfo(ntvfs->next, req, st); } -_PUBLIC_ NTSTATUS ntvfs_next_setpathinfo(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_setpathinfo(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_setfileinfo *st) { @@ -414,7 +414,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_setpathinfo(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->setpathinfo(ntvfs->next, req, st); } -_PUBLIC_ NTSTATUS ntvfs_next_mkdir(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_mkdir(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_mkdir *md) { @@ -424,7 +424,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_mkdir(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->mkdir(ntvfs->next, req, md); } -_PUBLIC_ NTSTATUS ntvfs_next_rmdir(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_rmdir(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, struct smb_rmdir *rd) { @@ -434,7 +434,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_rmdir(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->rmdir(ntvfs->next, req, rd); } -_PUBLIC_ NTSTATUS ntvfs_next_rename(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_rename(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_rename *ren) { @@ -444,7 +444,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_rename(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->rename(ntvfs->next, req, ren); } -_PUBLIC_ NTSTATUS ntvfs_next_copy(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_copy(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, struct smb_copy *cp) { @@ -454,7 +454,7 @@ _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, +NTSTATUS ntvfs_next_open(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_open *oi) { @@ -466,7 +466,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_open(struct ntvfs_module_context *ntvfs, /* directory search */ -_PUBLIC_ NTSTATUS ntvfs_next_search_first(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_search_first(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_search_first *io, void *private, bool (*callback)(void *private, const union smb_search_data *file)) @@ -477,7 +477,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_search_first(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->search_first(ntvfs->next, req, io, private, callback); } -_PUBLIC_ NTSTATUS ntvfs_next_search_next(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_search_next(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_search_next *io, void *private, bool (*callback)(void *private, const union smb_search_data *file)) @@ -488,7 +488,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_search_next(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->search_next(ntvfs->next, req, io, private, callback); } -_PUBLIC_ NTSTATUS ntvfs_next_search_close(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_search_close(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_search_close *io) { @@ -499,7 +499,7 @@ _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, +NTSTATUS ntvfs_next_ioctl(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_ioctl *io) { @@ -509,7 +509,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_ioctl(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->ioctl(ntvfs->next, req, io); } -_PUBLIC_ NTSTATUS ntvfs_next_read(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_read(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_read *io) { @@ -519,7 +519,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_read(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->read(ntvfs->next, req, io); } -_PUBLIC_ NTSTATUS ntvfs_next_write(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_write(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_write *io) { @@ -529,7 +529,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_write(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->write(ntvfs->next, req, io); } -_PUBLIC_ NTSTATUS ntvfs_next_seek(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_seek(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_seek *io) { @@ -539,7 +539,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_seek(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->seek(ntvfs->next, req, io); } -_PUBLIC_ NTSTATUS ntvfs_next_flush(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_flush(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_flush *flush) { @@ -549,7 +549,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_flush(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->flush(ntvfs->next, req, flush); } -_PUBLIC_ NTSTATUS ntvfs_next_lock(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_lock(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_lock *lck) { @@ -559,7 +559,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_lock(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->lock(ntvfs->next, req, lck); } -_PUBLIC_ NTSTATUS ntvfs_next_qfileinfo(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_qfileinfo(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_fileinfo *info) { @@ -569,7 +569,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_qfileinfo(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->qfileinfo(ntvfs->next, req, info); } -_PUBLIC_ NTSTATUS ntvfs_next_setfileinfo(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_setfileinfo(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_setfileinfo *info) { @@ -579,7 +579,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_setfileinfo(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->setfileinfo(ntvfs->next, req, info); } -_PUBLIC_ NTSTATUS ntvfs_next_close(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_close(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_close *io) { @@ -590,7 +590,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_close(struct ntvfs_module_context *ntvfs, } /* trans interface - used by IPC backend for pipes and RAP calls */ -_PUBLIC_ NTSTATUS ntvfs_next_trans(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_trans(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, struct smb_trans2 *trans) { @@ -601,7 +601,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_trans(struct ntvfs_module_context *ntvfs, } /* trans2 interface - only used by CIFS backend to prover complete passthru for testing */ -_PUBLIC_ NTSTATUS ntvfs_next_trans2(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_trans2(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, struct smb_trans2 *trans2) { @@ -614,7 +614,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_trans2(struct ntvfs_module_context *ntvfs, /* change notify request */ -_PUBLIC_ NTSTATUS ntvfs_next_notify(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_notify(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_notify *info) { @@ -625,7 +625,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_notify(struct ntvfs_module_context *ntvfs, } /* cancel - called to cancel an outstanding async request */ -_PUBLIC_ NTSTATUS ntvfs_next_cancel(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_cancel(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req) { if (!ntvfs->next || !ntvfs->next->ops->cancel) { @@ -635,7 +635,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_cancel(struct ntvfs_module_context *ntvfs, } /* printing specific operations */ -_PUBLIC_ NTSTATUS ntvfs_next_lpq(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_lpq(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_lpq *lpq) { @@ -647,7 +647,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_lpq(struct ntvfs_module_context *ntvfs, /* logoff - called when a vuid is closed */ -_PUBLIC_ NTSTATUS ntvfs_next_logoff(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_logoff(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req) { if (!ntvfs->next || !ntvfs->next->ops->logoff) { @@ -656,7 +656,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_logoff(struct ntvfs_module_context *ntvfs, return ntvfs->next->ops->logoff(ntvfs->next, req); } -_PUBLIC_ NTSTATUS ntvfs_next_exit(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_next_exit(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req) { if (!ntvfs->next || !ntvfs->next->ops->exit) { @@ -666,7 +666,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_exit(struct ntvfs_module_context *ntvfs, } /* oplock helpers */ -_PUBLIC_ NTSTATUS ntvfs_set_oplock_handler(struct ntvfs_context *ntvfs, +NTSTATUS ntvfs_set_oplock_handler(struct ntvfs_context *ntvfs, NTSTATUS (*handler)(void *private_data, struct ntvfs_handle *handle, uint8_t level), void *private_data) { @@ -675,7 +675,7 @@ _PUBLIC_ NTSTATUS ntvfs_set_oplock_handler(struct ntvfs_context *ntvfs, return NT_STATUS_OK; } -_PUBLIC_ NTSTATUS ntvfs_send_oplock_break(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_send_oplock_break(struct ntvfs_module_context *ntvfs, struct ntvfs_handle *handle, uint8_t level) { if (!ntvfs->ctx->oplock.handler) { @@ -686,7 +686,7 @@ _PUBLIC_ NTSTATUS ntvfs_send_oplock_break(struct ntvfs_module_context *ntvfs, } /* client connection callback */ -_PUBLIC_ NTSTATUS ntvfs_set_addr_callbacks(struct ntvfs_context *ntvfs, +NTSTATUS ntvfs_set_addr_callbacks(struct ntvfs_context *ntvfs, struct socket_address *(*my_addr)(void *private_data, TALLOC_CTX *mem_ctx), struct socket_address *(*peer_addr)(void *private_data, TALLOC_CTX *mem_ctx), void *private_data) @@ -697,7 +697,7 @@ _PUBLIC_ NTSTATUS ntvfs_set_addr_callbacks(struct ntvfs_context *ntvfs, return NT_STATUS_OK; } -_PUBLIC_ struct socket_address *ntvfs_get_my_addr(struct ntvfs_module_context *ntvfs, TALLOC_CTX *mem_ctx) +struct socket_address *ntvfs_get_my_addr(struct ntvfs_module_context *ntvfs, TALLOC_CTX *mem_ctx) { if (!ntvfs->ctx->client.get_my_addr) { return NULL; @@ -706,7 +706,7 @@ _PUBLIC_ struct socket_address *ntvfs_get_my_addr(struct ntvfs_module_context *n return ntvfs->ctx->client.get_my_addr(ntvfs->ctx->client.private_data, mem_ctx); } -_PUBLIC_ struct socket_address *ntvfs_get_peer_addr(struct ntvfs_module_context *ntvfs, TALLOC_CTX *mem_ctx) +struct socket_address *ntvfs_get_peer_addr(struct ntvfs_module_context *ntvfs, TALLOC_CTX *mem_ctx) { if (!ntvfs->ctx->client.get_peer_addr) { return NULL; -- cgit