summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-03-16 18:54:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:57:32 -0500
commitd3087451c4ec25171ba956fe2cd4e1d0f64f7edc (patch)
tree9fc7f4b924a84789db962720ba989d881a4a277f /source4/ntvfs/posix
parenta949db7c6d4bd35df59ba066111e6566172d4814 (diff)
downloadsamba-d3087451c4ec25171ba956fe2cd4e1d0f64f7edc.tar.gz
samba-d3087451c4ec25171ba956fe2cd4e1d0f64f7edc.tar.bz2
samba-d3087451c4ec25171ba956fe2cd4e1d0f64f7edc.zip
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)
Diffstat (limited to 'source4/ntvfs/posix')
-rw-r--r--source4/ntvfs/posix/pvfs_acl.c2
-rw-r--r--source4/ntvfs/posix/pvfs_fsinfo.c2
-rw-r--r--source4/ntvfs/posix/pvfs_open.c16
-rw-r--r--source4/ntvfs/posix/pvfs_wait.c3
-rw-r--r--source4/ntvfs/posix/vfs_posix.h2
5 files changed, 13 insertions, 12 deletions
diff --git a/source4/ntvfs/posix/pvfs_acl.c b/source4/ntvfs/posix/pvfs_acl.c
index 84ad62fcc8..f7647ae3e4 100644
--- a/source4/ntvfs/posix/pvfs_acl.c
+++ b/source4/ntvfs/posix/pvfs_acl.c
@@ -362,7 +362,7 @@ NTSTATUS pvfs_access_check(struct pvfs_state *pvfs,
struct pvfs_filename *name,
uint32_t *access_mask)
{
- struct security_token *token = req->session->session_info->security_token;
+ struct security_token *token = req->session_info->security_token;
struct xattr_NTACL *acl;
NTSTATUS status;
struct security_descriptor *sd;
diff --git a/source4/ntvfs/posix/pvfs_fsinfo.c b/source4/ntvfs/posix/pvfs_fsinfo.c
index 72293fb746..f86be9d29e 100644
--- a/source4/ntvfs/posix/pvfs_fsinfo.c
+++ b/source4/ntvfs/posix/pvfs_fsinfo.c
@@ -124,7 +124,7 @@ NTSTATUS pvfs_fsinfo(struct ntvfs_module_context *ntvfs,
fs->dskattr.out.units_free = (blocks_free * (double)block_size) / (bpunit * 512);
/* we must return a maximum of 2G to old DOS systems, or they get very confused */
- if (bpunit > 64 && req->smb_conn->negotiate.protocol <= PROTOCOL_LANMAN2) {
+ if (bpunit > 64 && req->ctx->protocol <= PROTOCOL_LANMAN2) {
fs->dskattr.out.blocks_per_unit = 64;
fs->dskattr.out.units_total = 0xFFFF;
fs->dskattr.out.units_free = 0xFFFF;
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c
index 4f0615087a..3160519f73 100644
--- a/source4/ntvfs/posix/pvfs_open.c
+++ b/source4/ntvfs/posix/pvfs_open.c
@@ -52,7 +52,7 @@ struct pvfs_file *pvfs_find_fd(struct pvfs_state *pvfs,
smb_panic("pvfs_find_fd: idtree_fnum corruption\n");
}
- if (req->session != f->session) {
+ if (req->session_info != f->session_info) {
DEBUG(2,("pvfs_find_fd: attempt to use wrong session for fnum %d\n",
fnum));
return NULL;
@@ -263,7 +263,7 @@ static NTSTATUS pvfs_open_directory(struct pvfs_state *pvfs,
}
f->fnum = fnum;
- f->session = req->session;
+ f->session_info = req->session_info;
f->smbpid = req->smbpid;
f->pvfs = pvfs;
f->pending_list = NULL;
@@ -680,7 +680,7 @@ static NTSTATUS pvfs_create_file(struct pvfs_state *pvfs,
}
f->fnum = fnum;
- f->session = req->session;
+ f->session_info = req->session_info;
f->smbpid = req->smbpid;
f->pvfs = pvfs;
f->pending_list = NULL;
@@ -847,7 +847,7 @@ static NTSTATUS pvfs_open_deny_dos(struct ntvfs_module_context *ntvfs,
*/
for (f2=pvfs->open_files;f2;f2=f2->next) {
if (f2 != f &&
- f2->session == req->session &&
+ f2->session_info == req->session_info &&
f2->smbpid == req->smbpid &&
(f2->handle->create_options &
(NTCREATEX_OPTIONS_PRIVATE_DENY_DOS |
@@ -936,7 +936,7 @@ static NTSTATUS pvfs_open_setup_retry(struct ntvfs_module_context *ntvfs,
f->handle->odb_locking_key.data,
f->handle->odb_locking_key.length);
- end_time = timeval_add(&req->request_time, 0, pvfs->sharing_violation_delay);
+ end_time = timeval_add(&req->statistics.request_time, 0, pvfs->sharing_violation_delay);
/* setup a pending lock */
status = odb_open_file_pending(lck, r);
@@ -1105,7 +1105,7 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs,
}
f->fnum = fnum;
- f->session = req->session;
+ f->session_info = req->session_info;
f->smbpid = req->smbpid;
f->pvfs = pvfs;
f->pending_list = NULL;
@@ -1310,7 +1310,7 @@ NTSTATUS pvfs_logoff(struct ntvfs_module_context *ntvfs,
for (f=pvfs->open_files;f;f=next) {
next = f->next;
- if (f->session == req->session) {
+ if (f->session_info == req->session_info) {
talloc_free(f);
}
}
@@ -1330,7 +1330,7 @@ NTSTATUS pvfs_exit(struct ntvfs_module_context *ntvfs,
for (f=pvfs->open_files;f;f=next) {
next = f->next;
- if (f->session == req->session &&
+ if (f->session_info == req->session_info &&
f->smbpid == req->smbpid) {
talloc_free(f);
}
diff --git a/source4/ntvfs/posix/pvfs_wait.c b/source4/ntvfs/posix/pvfs_wait.c
index 9b2f478633..6cb24e1f92 100644
--- a/source4/ntvfs/posix/pvfs_wait.c
+++ b/source4/ntvfs/posix/pvfs_wait.c
@@ -171,8 +171,9 @@ NTSTATUS pvfs_cancel(struct ntvfs_module_context *ntvfs, struct ntvfs_request *r
{
struct pvfs_state *pvfs = ntvfs->private_data;
struct pvfs_wait *pwait;
+
for (pwait=pvfs->wait_list;pwait;pwait=pwait->next) {
- if (SVAL(req->in.hdr, HDR_MID) == SVAL(pwait->req->in.hdr, HDR_MID) &&
+ if (req->smbmid == pwait->req->smbmid &&
req->smbpid == pwait->req->smbpid) {
/* trigger a cancel on the request */
pwait->reason = PVFS_WAIT_CANCEL;
diff --git a/source4/ntvfs/posix/vfs_posix.h b/source4/ntvfs/posix/vfs_posix.h
index 71120965c2..f75e7d3563 100644
--- a/source4/ntvfs/posix/vfs_posix.h
+++ b/source4/ntvfs/posix/vfs_posix.h
@@ -159,7 +159,7 @@ struct pvfs_file {
/* we need to remember the session it was opened on,
as it is illegal to operate on someone elses fnum */
- struct smbsrv_session *session;
+ struct auth_session_info *session_info;
/* we need to remember the client pid that
opened the file so SMBexit works */