summaryrefslogtreecommitdiff
path: root/source4/smb_server/smb/service.c
diff options
context:
space:
mode:
authorSam Liddicott <sam@liddicott.com>2009-04-23 13:47:59 +0100
committerStefan Metzmacher <metze@samba.org>2009-04-23 16:57:18 +0200
commit176302dc05cd67d013f3d153b9816329a175167e (patch)
tree3e872fac3dd7c215cc8236387a95153a24b11f1d /source4/smb_server/smb/service.c
parent652dc40f0d535b333f8dd6a15fe699438176c53b (diff)
downloadsamba-176302dc05cd67d013f3d153b9816329a175167e.tar.gz
samba-176302dc05cd67d013f3d153b9816329a175167e.tar.bz2
samba-176302dc05cd67d013f3d153b9816329a175167e.zip
Add async support for reply_tcon* and ntvfs_connect
smbsrv_tcon_backend no longer creates the ntvfs_request wrapper, so smbsrv_reply_tcon* can now do this and then invoke ntvfs_connect in the typical manner using SMBSRV_SETUP_NTVFS_REQUEST and SMBSRV_CALL_NTVFS_BACKEND Previously smbsrv_tcon_backend has been responsible for instantiating the ntvfs_module_context to service a tree-connect request, and then create an ntvfs_request wrapper around the smbsrv_request and pass this to ntvfs_connect for the newly created ntvfs. These actions could not be invoked asynchronously. This meant that any client requests made while instantiating the ntvfs module, including any composite's used during authentication (or related client connections for the case of proxy modules) would block other ntvfs modules and requests in the current process as they executed a nested event loop to await completion. Signed-off-by: Sam Liddicott <sam@liddicott.com> Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4/smb_server/smb/service.c')
-rw-r--r--source4/smb_server/smb/service.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/source4/smb_server/smb/service.c b/source4/smb_server/smb/service.c
index 52471c09c9..85d169fc13 100644
--- a/source4/smb_server/smb/service.c
+++ b/source4/smb_server/smb/service.c
@@ -27,6 +27,7 @@
/****************************************************************************
Make a connection, given the snum to connect to, and the vuser of the
connecting user if appropriate.
+ Does note invoke the NTVFS connection hook
****************************************************************************/
static NTSTATUS make_connection_scfg(struct smbsrv_request *req,
struct share_config *scfg,
@@ -88,23 +89,6 @@ static NTSTATUS make_connection_scfg(struct smbsrv_request *req,
goto failed;
}
- req->ntvfs = ntvfs_request_create(req->tcon->ntvfs, req,
- req->session->session_info,
- SVAL(req->in.hdr,HDR_PID),
- req->request_time,
- req, NULL, 0);
- if (!req->ntvfs) {
- status = NT_STATUS_NO_MEMORY;
- goto failed;
- }
-
- /* Invoke NTVFS connection hook */
- status = ntvfs_connect(req->ntvfs, scfg->name);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0,("make_connection: NTVFS make connection failed!\n"));
- goto failed;
- }
-
return NT_STATUS_OK;
failed:
@@ -204,9 +188,6 @@ NTSTATUS smbsrv_tcon_backend(struct smbsrv_request *req, union smb_tcon *con)
return status;
}
- con->tconx.out.tid = req->tcon->tid;
- con->tconx.out.dev_type = talloc_strdup(req, req->tcon->ntvfs->dev_type);
- con->tconx.out.fs_type = talloc_strdup(req, req->tcon->ntvfs->fs_type);
con->tconx.out.options = SMB_SUPPORT_SEARCH_BITS | (share_int_option(req->tcon->ntvfs->config, SHARE_CSC_POLICY, SHARE_CSC_POLICY_DEFAULT) << 2);
if (share_bool_option(req->tcon->ntvfs->config, SHARE_MSDFS_ROOT, SHARE_MSDFS_ROOT_DEFAULT) && lp_host_msdfs(req->smb_conn->lp_ctx)) {
con->tconx.out.options |= SMB_SHARE_IN_DFS;