summaryrefslogtreecommitdiff
path: root/source4/ntvfs
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-12-04 02:03:06 +0000
committerAndrew Tridgell <tridge@samba.org>2003-12-04 02:03:06 +0000
commit926240428c0646aabb13539745940b61a7cf44a9 (patch)
tree102988d47fab4a56b59161409dddc9c9dfa86ed5 /source4/ntvfs
parentb8cbd9181efabbc360ef335e214a696011839b41 (diff)
downloadsamba-926240428c0646aabb13539745940b61a7cf44a9.tar.gz
samba-926240428c0646aabb13539745940b61a7cf44a9.tar.bz2
samba-926240428c0646aabb13539745940b61a7cf44a9.zip
* patch based on work by Jim Myers to unify the ioctl handling to be
more like the other major SMB functions * added SMBntrename code (This used to be commit f2d3dc9893fa0e089c407fa16ce9ff13587e70cd)
Diffstat (limited to 'source4/ntvfs')
-rw-r--r--source4/ntvfs/cifs/vfs_cifs.c2
-rw-r--r--source4/ntvfs/ipc/vfs_ipc.c2
-rw-r--r--source4/ntvfs/print/vfs_print.c14
-rw-r--r--source4/ntvfs/simple/vfs_simple.c2
4 files changed, 12 insertions, 8 deletions
diff --git a/source4/ntvfs/cifs/vfs_cifs.c b/source4/ntvfs/cifs/vfs_cifs.c
index 3903203505..c61749e2ad 100644
--- a/source4/ntvfs/cifs/vfs_cifs.c
+++ b/source4/ntvfs/cifs/vfs_cifs.c
@@ -247,7 +247,7 @@ static void async_ioctl(struct cli_request *c_req)
/*
ioctl interface
*/
-static NTSTATUS cvfs_ioctl(struct request_context *req, struct smb_ioctl *io)
+static NTSTATUS cvfs_ioctl(struct request_context *req, union smb_ioctl *io)
{
struct cvfs_private *private = req->conn->ntvfs_private;
struct cli_request *c_req;
diff --git a/source4/ntvfs/ipc/vfs_ipc.c b/source4/ntvfs/ipc/vfs_ipc.c
index da5c42507a..7ada031bd5 100644
--- a/source4/ntvfs/ipc/vfs_ipc.c
+++ b/source4/ntvfs/ipc/vfs_ipc.c
@@ -58,7 +58,7 @@ static NTSTATUS ipc_unlink(struct request_context *req, struct smb_unlink *unl)
/*
ioctl interface - we don't do any
*/
-static NTSTATUS ipc_ioctl(struct request_context *req, struct smb_ioctl *io)
+static NTSTATUS ipc_ioctl(struct request_context *req, union smb_ioctl *io)
{
return NT_STATUS_ACCESS_DENIED;
}
diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c
index 82829d759a..a9484d4329 100644
--- a/source4/ntvfs/print/vfs_print.c
+++ b/source4/ntvfs/print/vfs_print.c
@@ -54,17 +54,21 @@ static NTSTATUS print_unlink(struct request_context *req, struct smb_unlink *unl
/*
ioctl - used for job query
*/
-static NTSTATUS print_ioctl(struct request_context *req, struct smb_ioctl *io)
+static NTSTATUS print_ioctl(struct request_context *req, union smb_ioctl *io)
{
char *p;
- if (io->in.request == IOCTL_QUERY_JOB_INFO) {
+ if (io->generic.level != RAW_IOCTL_IOCTL) {
+ return NT_STATUS_NOT_IMPLEMENTED;
+ }
+
+ if (io->ioctl.in.request == IOCTL_QUERY_JOB_INFO) {
/* a request for the print job id of an open print job */
- io->out.blob = data_blob_talloc(req->mem_ctx, NULL, 32);
+ io->ioctl.out.blob = data_blob_talloc(req->mem_ctx, NULL, 32);
- memset(io->out.blob.data, 0, io->out.blob.length);
+ data_blob_clear(&io->ioctl.out.blob);
- p = io->out.blob.data;
+ p = io->ioctl.out.blob.data;
SSVAL(p,0, 1 /* REWRITE: fsp->rap_print_jobid */);
push_string(NULL, p+2, lp_netbios_name(), 15, STR_TERMINATE|STR_ASCII);
push_string(NULL, p+18, lp_servicename(req->conn->service), 13, STR_TERMINATE|STR_ASCII);
diff --git a/source4/ntvfs/simple/vfs_simple.c b/source4/ntvfs/simple/vfs_simple.c
index f7ba41522c..261ce4a19a 100644
--- a/source4/ntvfs/simple/vfs_simple.c
+++ b/source4/ntvfs/simple/vfs_simple.c
@@ -95,7 +95,7 @@ static NTSTATUS svfs_unlink(struct request_context *req, struct smb_unlink *unl)
/*
ioctl interface - we don't do any
*/
-static NTSTATUS svfs_ioctl(struct request_context *req, struct smb_ioctl *io)
+static NTSTATUS svfs_ioctl(struct request_context *req, union smb_ioctl *io)
{
return NT_STATUS_INVALID_PARAMETER;
}