diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-03-15 17:28:46 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:57:26 -0500 |
commit | 2e7df84576d26bc37eb87b7e3c79fcb3fb358d68 (patch) | |
tree | 2b30c038028b0a1530d0236fa196efaa3d63b0f5 /source4/ntvfs/posix | |
parent | 84aea6eca58b20f32fad0de0f43d9a5c7de247c9 (diff) | |
download | samba-2e7df84576d26bc37eb87b7e3c79fcb3fb358d68.tar.gz samba-2e7df84576d26bc37eb87b7e3c79fcb3fb358d68.tar.bz2 samba-2e7df84576d26bc37eb87b7e3c79fcb3fb358d68.zip |
r14456: don't access the smbsrv_tcon inside the ntvfs modules
metze
(This used to be commit 5709c1c4e1a561dd9af98cfefbbbdac9b18765b7)
Diffstat (limited to 'source4/ntvfs/posix')
-rw-r--r-- | source4/ntvfs/posix/pvfs_dirlist.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_fsinfo.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_search.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_wait.c | 4 | ||||
-rw-r--r-- | source4/ntvfs/posix/vfs_posix.c | 27 | ||||
-rw-r--r-- | source4/ntvfs/posix/vfs_posix.h | 2 |
6 files changed, 19 insertions, 20 deletions
diff --git a/source4/ntvfs/posix/pvfs_dirlist.c b/source4/ntvfs/posix/pvfs_dirlist.c index 9838072080..a61fc458b3 100644 --- a/source4/ntvfs/posix/pvfs_dirlist.c +++ b/source4/ntvfs/posix/pvfs_dirlist.c @@ -177,7 +177,7 @@ static void dcache_add(struct pvfs_dir *dir, const char *name) const char *pvfs_list_next(struct pvfs_dir *dir, uint_t *ofs) { struct dirent *de; - enum protocol_types protocol = dir->pvfs->tcon->smb_conn->negotiate.protocol; + enum protocol_types protocol = dir->pvfs->ntvfs->ctx->protocol; /* non-wildcard searches are easy */ if (dir->no_wildcard) { diff --git a/source4/ntvfs/posix/pvfs_fsinfo.c b/source4/ntvfs/posix/pvfs_fsinfo.c index 6b8f0504f2..553681a3d4 100644 --- a/source4/ntvfs/posix/pvfs_fsinfo.c +++ b/source4/ntvfs/posix/pvfs_fsinfo.c @@ -169,7 +169,7 @@ NTSTATUS pvfs_fsinfo(struct ntvfs_module_context *ntvfs, case RAW_QFS_ATTRIBUTE_INFORMATION: fs->attribute_info.out.fs_attr = pvfs->fs_attribs; fs->attribute_info.out.max_file_component_length = 255; - fs->attribute_info.out.fs_type.s = req->tcon->fs_type; + fs->attribute_info.out.fs_type.s = ntvfs->ctx->fs_type; return NT_STATUS_OK; case RAW_QFS_QUOTA_INFORMATION: diff --git a/source4/ntvfs/posix/pvfs_search.c b/source4/ntvfs/posix/pvfs_search.c index 6aa9163f1e..c74bac5a3d 100644 --- a/source4/ntvfs/posix/pvfs_search.c +++ b/source4/ntvfs/posix/pvfs_search.c @@ -72,7 +72,7 @@ static void pvfs_search_timer(struct event_context *ev, struct timed_event *te, */ static void pvfs_search_setup_timer(struct pvfs_search_state *search) { - struct event_context *ev = search->pvfs->tcon->smb_conn->connection->event.ctx; + struct event_context *ev = search->pvfs->ntvfs->ctx->event_ctx; talloc_free(search->te); search->te = event_add_timed(ev, search, timeval_current_ofs(search->pvfs->search_inactivity_time, 0), diff --git a/source4/ntvfs/posix/pvfs_wait.c b/source4/ntvfs/posix/pvfs_wait.c index 241382ba0b..9b2f478633 100644 --- a/source4/ntvfs/posix/pvfs_wait.c +++ b/source4/ntvfs/posix/pvfs_wait.c @@ -134,8 +134,8 @@ void *pvfs_wait_message(struct pvfs_state *pvfs, pwait->private = private; pwait->handler = fn; - pwait->msg_ctx = pvfs->tcon->smb_conn->connection->msg_ctx; - pwait->ev = req->tcon->smb_conn->connection->event.ctx; + pwait->msg_ctx = pvfs->ntvfs->ctx->msg_ctx; + pwait->ev = pvfs->ntvfs->ctx->event_ctx; pwait->msg_type = msg_type; pwait->req = talloc_reference(pwait, req); pwait->pvfs = pvfs; diff --git a/source4/ntvfs/posix/vfs_posix.c b/source4/ntvfs/posix/vfs_posix.c index ba53dc65e0..31588fdf78 100644 --- a/source4/ntvfs/posix/vfs_posix.c +++ b/source4/ntvfs/posix/vfs_posix.c @@ -38,7 +38,7 @@ */ static void pvfs_setup_options(struct pvfs_state *pvfs) { - int snum = pvfs->tcon->service; + int snum = pvfs->ntvfs->ctx->config.snum; const char *eadb; if (lp_map_hidden(snum)) pvfs->flags |= PVFS_FLAG_MAP_HIDDEN; @@ -114,23 +114,22 @@ static void pvfs_setup_options(struct pvfs_state *pvfs) static NTSTATUS pvfs_connect(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, const char *sharename) { - struct smbsrv_tcon *tcon = req->tcon; struct pvfs_state *pvfs; struct stat st; char *base_directory; NTSTATUS status; - pvfs = talloc_zero(tcon, struct pvfs_state); + pvfs = talloc_zero(ntvfs, struct pvfs_state); NT_STATUS_HAVE_NO_MEMORY(pvfs); /* for simplicity of path construction, remove any trailing slash now */ - base_directory = talloc_strdup(pvfs, lp_pathname(tcon->service)); + base_directory = talloc_strdup(pvfs, lp_pathname(ntvfs->ctx->config.snum)); NT_STATUS_HAVE_NO_MEMORY(base_directory); if (strcmp(base_directory, "/") != 0) { trim_string(base_directory, NULL, "/"); } - pvfs->tcon = tcon; + pvfs->ntvfs = ntvfs; pvfs->base_directory = base_directory; /* the directory must exist. Note that we deliberately don't @@ -141,25 +140,25 @@ static NTSTATUS pvfs_connect(struct ntvfs_module_context *ntvfs, return NT_STATUS_BAD_NETWORK_NAME; } - tcon->fs_type = talloc_strdup(tcon, "NTFS"); - NT_STATUS_HAVE_NO_MEMORY(tcon->fs_type); + ntvfs->ctx->fs_type = talloc_strdup(ntvfs->ctx, "NTFS"); + NT_STATUS_HAVE_NO_MEMORY(ntvfs->ctx->fs_type); - tcon->dev_type = talloc_strdup(tcon, "A:"); - NT_STATUS_HAVE_NO_MEMORY(tcon->dev_type); + ntvfs->ctx->dev_type = talloc_strdup(ntvfs->ctx, "A:"); + NT_STATUS_HAVE_NO_MEMORY(ntvfs->ctx->dev_type); ntvfs->private_data = pvfs; pvfs->brl_context = brl_init(pvfs, - pvfs->tcon->smb_conn->connection->server_id, - pvfs->tcon->service, - pvfs->tcon->smb_conn->connection->msg_ctx); + pvfs->ntvfs->ctx->server_id, + pvfs->ntvfs->ctx->config.snum, + pvfs->ntvfs->ctx->msg_ctx); if (pvfs->brl_context == NULL) { return NT_STATUS_INTERNAL_DB_CORRUPTION; } pvfs->odb_context = odb_init(pvfs, - pvfs->tcon->smb_conn->connection->server_id, - pvfs->tcon->smb_conn->connection->msg_ctx); + pvfs->ntvfs->ctx->server_id, + pvfs->ntvfs->ctx->msg_ctx); if (pvfs->odb_context == NULL) { return NT_STATUS_INTERNAL_DB_CORRUPTION; } diff --git a/source4/ntvfs/posix/vfs_posix.h b/source4/ntvfs/posix/vfs_posix.h index a22b55198c..84828fb3ce 100644 --- a/source4/ntvfs/posix/vfs_posix.h +++ b/source4/ntvfs/posix/vfs_posix.h @@ -31,7 +31,7 @@ /* this is the private structure for the posix vfs backend. It is used to hold per-connection (per tree connect) state information */ struct pvfs_state { - struct smbsrv_tcon *tcon; + struct ntvfs_module_context *ntvfs; const char *base_directory; struct GUID *base_fs_uuid; |