summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-08-01 10:58:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:15:19 -0500
commit529c5dae51c1e782e095bf96b7ab2ca95ccbb856 (patch)
tree004e15d09c971393e52127c0342e009f9b71c7c7
parent2c4eece60489fa3d0d7aba1c1c3eec84750461fb (diff)
downloadsamba-529c5dae51c1e782e095bf96b7ab2ca95ccbb856.tar.gz
samba-529c5dae51c1e782e095bf96b7ab2ca95ccbb856.tar.bz2
samba-529c5dae51c1e782e095bf96b7ab2ca95ccbb856.zip
r17362: session_info and smbpid are available from the ntvfs_handle
so we don't need them on the pvfs_file struct. also we don't need to check is the handle has the correct session as this is job of the frontend server metze (This used to be commit c83501335f245ac73b9d53c12efee3d46b8c5b05)
-rw-r--r--source4/ntvfs/posix/pvfs_flush.c2
-rw-r--r--source4/ntvfs/posix/pvfs_open.c21
-rw-r--r--source4/ntvfs/posix/vfs_posix.h8
3 files changed, 6 insertions, 25 deletions
diff --git a/source4/ntvfs/posix/pvfs_flush.c b/source4/ntvfs/posix/pvfs_flush.c
index 0f5a07071b..a9f36d1ae1 100644
--- a/source4/ntvfs/posix/pvfs_flush.c
+++ b/source4/ntvfs/posix/pvfs_flush.c
@@ -67,7 +67,7 @@ NTSTATUS pvfs_flush(struct ntvfs_module_context *ntvfs,
* for the given SMBPID
*/
for (f=pvfs->files.list;f;f=f->next) {
- if (f->smbpid != req->smbpid) continue;
+ if (f->ntvfs->smbpid != req->smbpid) continue;
pvfs_flush_file(pvfs, f);
}
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c
index b0d0348240..d8f30476ac 100644
--- a/source4/ntvfs/posix/pvfs_open.c
+++ b/source4/ntvfs/posix/pvfs_open.c
@@ -43,11 +43,6 @@ struct pvfs_file *pvfs_find_fd(struct pvfs_state *pvfs,
f = talloc_get_type(p, struct pvfs_file);
if (!f) return NULL;
- if (req->session_info != f->session_info) {
- DEBUG(2,("pvfs_find_fd: attempt to use wrong session for handle %p\n",h));
- return NULL;
- }
-
return f;
}
@@ -256,8 +251,6 @@ static NTSTATUS pvfs_open_directory(struct pvfs_state *pvfs,
}
f->ntvfs = h;
- f->session_info = req->session_info;
- f->smbpid = req->smbpid;
f->pvfs = pvfs;
f->pending_list = NULL;
f->lock_count = 0;
@@ -690,8 +683,6 @@ static NTSTATUS pvfs_create_file(struct pvfs_state *pvfs,
}
f->ntvfs = h;
- f->session_info = req->session_info;
- f->smbpid = req->smbpid;
f->pvfs = pvfs;
f->pending_list = NULL;
f->lock_count = 0;
@@ -861,8 +852,8 @@ static NTSTATUS pvfs_open_deny_dos(struct ntvfs_module_context *ntvfs,
*/
for (f2=pvfs->files.list;f2;f2=f2->next) {
if (f2 != f &&
- f2->session_info == req->session_info &&
- f2->smbpid == req->smbpid &&
+ f2->ntvfs->session_info == req->session_info &&
+ f2->ntvfs->smbpid == req->smbpid &&
(f2->handle->create_options &
(NTCREATEX_OPTIONS_PRIVATE_DENY_DOS |
NTCREATEX_OPTIONS_PRIVATE_DENY_FCB)) &&
@@ -1120,8 +1111,6 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs,
}
f->ntvfs = h;
- f->session_info = req->session_info;
- f->smbpid = req->smbpid;
f->pvfs = pvfs;
f->pending_list = NULL;
f->lock_count = 0;
@@ -1344,7 +1333,7 @@ NTSTATUS pvfs_logoff(struct ntvfs_module_context *ntvfs,
for (f=pvfs->files.list;f;f=next) {
next = f->next;
- if (f->session_info == req->session_info) {
+ if (f->ntvfs->session_info == req->session_info) {
talloc_free(f);
}
}
@@ -1364,8 +1353,8 @@ NTSTATUS pvfs_exit(struct ntvfs_module_context *ntvfs,
for (f=pvfs->files.list;f;f=next) {
next = f->next;
- if (f->session_info == req->session_info &&
- f->smbpid == req->smbpid) {
+ if (f->ntvfs->session_info == req->session_info &&
+ f->ntvfs->smbpid == req->smbpid) {
talloc_free(f);
}
}
diff --git a/source4/ntvfs/posix/vfs_posix.h b/source4/ntvfs/posix/vfs_posix.h
index 8d3e86fff1..a788ddd19c 100644
--- a/source4/ntvfs/posix/vfs_posix.h
+++ b/source4/ntvfs/posix/vfs_posix.h
@@ -161,14 +161,6 @@ struct pvfs_file {
uint32_t share_access;
uint32_t access_mask;
- /* we need to remember the session it was opened on,
- as it is illegal to operate on someone elses fnum */
- struct auth_session_info *session_info;
-
- /* we need to remember the client pid that
- opened the file so SMBexit works */
- uint16_t smbpid;
-
/* a list of pending locks - used for locking cancel operations */
struct pvfs_pending_lock *pending_list;