diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/ntvfs/posix/pvfs_flush.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_open.c | 21 | ||||
-rw-r--r-- | source4/ntvfs/posix/vfs_posix.h | 8 |
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; |