diff options
Diffstat (limited to 'source4/ntvfs')
-rw-r--r-- | source4/ntvfs/cifs/vfs_cifs.c | 10 | ||||
-rw-r--r-- | source4/ntvfs/ntvfs.h | 2 | ||||
-rw-r--r-- | source4/ntvfs/ntvfs_interface.c | 4 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_notify.c | 26 | ||||
-rw-r--r-- | source4/ntvfs/unixuid/vfs_unixuid.c | 2 |
5 files changed, 26 insertions, 18 deletions
diff --git a/source4/ntvfs/cifs/vfs_cifs.c b/source4/ntvfs/cifs/vfs_cifs.c index 41ea2a652d..1e34e953a5 100644 --- a/source4/ntvfs/cifs/vfs_cifs.c +++ b/source4/ntvfs/cifs/vfs_cifs.c @@ -1000,18 +1000,22 @@ static void async_changenotify(struct smbcli_request *c_req) /* change notify request - always async */ static NTSTATUS cvfs_notify(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, - struct smb_notify *io) + union smb_notify *io) { struct cvfs_private *private = ntvfs->private_data; struct smbcli_request *c_req; int saved_timeout = private->transport->options.request_timeout; struct cvfs_file *f; + if (io->nttrans.level != RAW_NOTIFY_NTTRANS) { + return NT_STATUS_NOT_IMPLEMENTED; + } + SETUP_PID; - f = ntvfs_handle_get_backend_data(io->in.file.ntvfs, ntvfs); + f = ntvfs_handle_get_backend_data(io->nttrans.in.file.ntvfs, ntvfs); if (!f) return NT_STATUS_INVALID_HANDLE; - io->in.file.fnum = f->fnum; + io->nttrans.in.file.fnum = f->fnum; /* this request doesn't make sense unless its async */ if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) { diff --git a/source4/ntvfs/ntvfs.h b/source4/ntvfs/ntvfs.h index 734df84dde..6916ea10fc 100644 --- a/source4/ntvfs/ntvfs.h +++ b/source4/ntvfs/ntvfs.h @@ -139,7 +139,7 @@ struct ntvfs_ops { /* change notify request */ NTSTATUS (*notify)(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, - struct smb_notify *info); + union smb_notify *info); /* cancel - cancels any pending async request */ NTSTATUS (*cancel)(struct ntvfs_module_context *ntvfs, diff --git a/source4/ntvfs/ntvfs_interface.c b/source4/ntvfs/ntvfs_interface.c index 67cbe8df22..fc8fccca33 100644 --- a/source4/ntvfs/ntvfs_interface.c +++ b/source4/ntvfs/ntvfs_interface.c @@ -313,7 +313,7 @@ _PUBLIC_ NTSTATUS ntvfs_exit(struct ntvfs_request *req) /* change notify request */ -_PUBLIC_ NTSTATUS ntvfs_notify(struct ntvfs_request *req, struct smb_notify *info) +_PUBLIC_ NTSTATUS ntvfs_notify(struct ntvfs_request *req, union smb_notify *info) { struct ntvfs_module_context *ntvfs = req->ctx->modules; if (!ntvfs->ops->notify) { @@ -617,7 +617,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_trans2(struct ntvfs_module_context *ntvfs, */ _PUBLIC_ NTSTATUS ntvfs_next_notify(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, - struct smb_notify *info) + union smb_notify *info) { if (!ntvfs->next || !ntvfs->next->ops->notify) { return NT_STATUS_NOT_IMPLEMENTED; diff --git a/source4/ntvfs/posix/pvfs_notify.c b/source4/ntvfs/posix/pvfs_notify.c index 64aeac0696..ffbe1f8bb7 100644 --- a/source4/ntvfs/posix/pvfs_notify.c +++ b/source4/ntvfs/posix/pvfs_notify.c @@ -40,7 +40,7 @@ struct pvfs_notify_buffer { struct notify_pending { struct notify_pending *next, *prev; struct ntvfs_request *req; - struct smb_notify *info; + union smb_notify *info; } *pending; }; @@ -64,7 +64,7 @@ static void pvfs_notify_send(struct pvfs_notify_buffer *notify_buffer, { struct notify_pending *pending = notify_buffer->pending; struct ntvfs_request *req; - struct smb_notify *info; + union smb_notify *info; if (notify_buffer->current_buffer_size > notify_buffer->max_buffer_size && notify_buffer->num_changes != 0) { @@ -87,15 +87,15 @@ static void pvfs_notify_send(struct pvfs_notify_buffer *notify_buffer, req = pending->req; info = pending->info; - info->out.num_changes = notify_buffer->num_changes; - info->out.changes = talloc_steal(req, notify_buffer->changes); + info->nttrans.out.num_changes = notify_buffer->num_changes; + info->nttrans.out.changes = talloc_steal(req, notify_buffer->changes); notify_buffer->num_changes = 0; notify_buffer->changes = NULL; notify_buffer->current_buffer_size = 0; talloc_free(pending); - if (info->out.num_changes != 0) { + if (info->nttrans.out.num_changes != 0) { status = NT_STATUS_OK; } @@ -219,7 +219,7 @@ static void pvfs_notify_end(void *private, enum pvfs_wait_notice reason) event buffer is non-empty */ NTSTATUS pvfs_notify(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, - struct smb_notify *info) + union smb_notify *info) { struct pvfs_state *pvfs = talloc_get_type(ntvfs->private_data, struct pvfs_state); @@ -227,7 +227,11 @@ NTSTATUS pvfs_notify(struct ntvfs_module_context *ntvfs, NTSTATUS status; struct notify_pending *pending; - f = pvfs_find_fd(pvfs, req, info->in.file.ntvfs); + if (info->nttrans.level != RAW_NOTIFY_NTTRANS) { + return NT_STATUS_NOT_IMPLEMENTED; + } + + f = pvfs_find_fd(pvfs, req, info->nttrans.in.file.ntvfs); if (!f) { return NT_STATUS_INVALID_HANDLE; } @@ -246,15 +250,15 @@ NTSTATUS pvfs_notify(struct ntvfs_module_context *ntvfs, create one */ if (f->notify_buffer == NULL) { status = pvfs_notify_setup(pvfs, f, - info->in.buffer_size, - info->in.completion_filter, - info->in.recursive); + info->nttrans.in.buffer_size, + info->nttrans.in.completion_filter, + info->nttrans.in.recursive); NT_STATUS_NOT_OK_RETURN(status); } /* we update the max_buffer_size on each call, but we do not update the recursive flag or filter */ - f->notify_buffer->max_buffer_size = info->in.buffer_size; + f->notify_buffer->max_buffer_size = info->nttrans.in.buffer_size; pending = talloc(f->notify_buffer, struct notify_pending); NT_STATUS_HAVE_NO_MEMORY(pending); diff --git a/source4/ntvfs/unixuid/vfs_unixuid.c b/source4/ntvfs/unixuid/vfs_unixuid.c index b12339b2c8..17fdb42de0 100644 --- a/source4/ntvfs/unixuid/vfs_unixuid.c +++ b/source4/ntvfs/unixuid/vfs_unixuid.c @@ -520,7 +520,7 @@ static NTSTATUS unixuid_cancel(struct ntvfs_module_context *ntvfs, change notify */ static NTSTATUS unixuid_notify(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, struct smb_notify *info) + struct ntvfs_request *req, union smb_notify *info) { NTSTATUS status; |