diff options
Diffstat (limited to 'source4/ntvfs')
-rw-r--r-- | source4/ntvfs/cifs/vfs_cifs.c | 19 | ||||
-rw-r--r-- | source4/ntvfs/ipc/vfs_ipc.c | 22 | ||||
-rw-r--r-- | source4/ntvfs/nbench/vfs_nbench.c | 44 | ||||
-rw-r--r-- | source4/ntvfs/ntvfs.h | 10 | ||||
-rw-r--r-- | source4/ntvfs/ntvfs_generic.c | 48 | ||||
-rw-r--r-- | source4/ntvfs/ntvfs_interface.c | 20 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_acl.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_flush.c | 7 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_ioctl.c | 5 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_lock.c | 4 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_open.c | 10 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_qfileinfo.c | 4 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_read.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_seek.c | 15 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_unlink.c | 11 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_write.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/posix/vfs_posix.c | 5 | ||||
-rw-r--r-- | source4/ntvfs/print/vfs_print.c | 3 | ||||
-rw-r--r-- | source4/ntvfs/simple/vfs_simple.c | 39 | ||||
-rw-r--r-- | source4/ntvfs/unixuid/vfs_unixuid.c | 12 |
20 files changed, 156 insertions, 128 deletions
diff --git a/source4/ntvfs/cifs/vfs_cifs.c b/source4/ntvfs/cifs/vfs_cifs.c index f6a8da14e7..2741e97d2d 100644 --- a/source4/ntvfs/cifs/vfs_cifs.c +++ b/source4/ntvfs/cifs/vfs_cifs.c @@ -237,7 +237,7 @@ static void async_simple(struct smbcli_request *c_req) The name can contain CIFS wildcards, but rarely does (except with OS/2 clients) */ static NTSTATUS cvfs_unlink(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, struct smb_unlink *unl) + struct ntvfs_request *req, union smb_unlink *unl) { struct cvfs_private *private = ntvfs->private_data; struct smbcli_request *c_req; @@ -292,7 +292,7 @@ static NTSTATUS cvfs_ioctl(struct ntvfs_module_context *ntvfs, check if a directory exists */ static NTSTATUS cvfs_chkpath(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, struct smb_chkpath *cp) + struct ntvfs_request *req, union smb_chkpath *cp) { struct cvfs_private *private = ntvfs->private_data; struct smbcli_request *c_req; @@ -583,7 +583,8 @@ static void async_seek(struct smbcli_request *c_req) seek in a file */ static NTSTATUS cvfs_seek(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, struct smb_seek *io) + struct ntvfs_request *req, + union smb_seek *io) { struct cvfs_private *private = ntvfs->private_data; struct smbcli_request *c_req; @@ -603,7 +604,8 @@ static NTSTATUS cvfs_seek(struct ntvfs_module_context *ntvfs, flush a file */ static NTSTATUS cvfs_flush(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, struct smb_flush *io) + struct ntvfs_request *req, + union smb_flush *io) { struct cvfs_private *private = ntvfs->private_data; struct smbcli_request *c_req; @@ -844,7 +846,8 @@ static void async_trans2(struct smbcli_request *c_req) /* raw trans2 */ static NTSTATUS cvfs_trans2(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, struct smb_trans2 *trans2) + struct ntvfs_request *req, + struct smb_trans2 *trans2) { struct cvfs_private *private = ntvfs->private_data; struct smbcli_request *c_req; @@ -863,7 +866,8 @@ static NTSTATUS cvfs_trans2(struct ntvfs_module_context *ntvfs, /* SMBtrans - not used on file shares */ static NTSTATUS cvfs_trans(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, struct smb_trans2 *trans2) + struct ntvfs_request *req, + struct smb_trans2 *trans2) { return NT_STATUS_ACCESS_DENIED; } @@ -881,7 +885,8 @@ 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 *info) + struct ntvfs_request *req, + union smb_notify *info) { struct cvfs_private *private = ntvfs->private_data; struct smbcli_request *c_req; diff --git a/source4/ntvfs/ipc/vfs_ipc.c b/source4/ntvfs/ipc/vfs_ipc.c index 36f0c9b82c..2df7ac61ab 100644 --- a/source4/ntvfs/ipc/vfs_ipc.c +++ b/source4/ntvfs/ipc/vfs_ipc.c @@ -117,7 +117,8 @@ static NTSTATUS ipc_disconnect(struct ntvfs_module_context *ntvfs) delete a file */ static NTSTATUS ipc_unlink(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, struct smb_unlink *unl) + struct ntvfs_request *req, + union smb_unlink *unl) { return NT_STATUS_ACCESS_DENIED; } @@ -136,7 +137,8 @@ static NTSTATUS ipc_ioctl(struct ntvfs_module_context *ntvfs, check if a directory exists */ static NTSTATUS ipc_chkpath(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, struct smb_chkpath *cp) + struct ntvfs_request *req, + union smb_chkpath *cp) { return NT_STATUS_ACCESS_DENIED; } @@ -263,7 +265,7 @@ static NTSTATUS ipc_open_ntcreatex(struct ntvfs_module_context *ntvfs, } ZERO_STRUCT(oi->ntcreatex.out); - oi->ntcreatex.out.fnum = p->fnum; + oi->ntcreatex.file.fnum = p->fnum; oi->ntcreatex.out.ipc_state = p->ipc_state; oi->ntcreatex.out.file_type = FILE_TYPE_MESSAGE_MODE_PIPE; @@ -286,7 +288,7 @@ static NTSTATUS ipc_open_openx(struct ntvfs_module_context *ntvfs, } ZERO_STRUCT(oi->openx.out); - oi->openx.out.fnum = p->fnum; + oi->openx.file.fnum = p->fnum; oi->openx.out.ftype = 2; oi->openx.out.devstate = p->ipc_state; @@ -380,7 +382,7 @@ static NTSTATUS ipc_read(struct ntvfs_module_context *ntvfs, return ntvfs_map_read(ntvfs, req, rd); } - fnum = rd->readx.in.fnum; + fnum = rd->readx.file.fnum; p = pipe_state_find(private, fnum); if (!p) { @@ -423,7 +425,7 @@ static NTSTATUS ipc_write(struct ntvfs_module_context *ntvfs, return ntvfs_map_write(ntvfs, req, wr); } - fnum = wr->writex.in.fnum; + fnum = wr->writex.file.fnum; data.data = discard_const_p(void, wr->writex.in.data); data.length = wr->writex.in.count; @@ -447,7 +449,8 @@ static NTSTATUS ipc_write(struct ntvfs_module_context *ntvfs, seek in a file */ static NTSTATUS ipc_seek(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, struct smb_seek *io) + struct ntvfs_request *req, + union smb_seek *io) { return NT_STATUS_ACCESS_DENIED; } @@ -456,7 +459,8 @@ static NTSTATUS ipc_seek(struct ntvfs_module_context *ntvfs, flush a file */ static NTSTATUS ipc_flush(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, struct smb_flush *io) + struct ntvfs_request *req, + union smb_flush *io) { return NT_STATUS_ACCESS_DENIED; } @@ -474,7 +478,7 @@ static NTSTATUS ipc_close(struct ntvfs_module_context *ntvfs, return ntvfs_map_close(ntvfs, req, io); } - p = pipe_state_find(private, io->close.in.fnum); + p = pipe_state_find(private, io->close.file.fnum); if (!p) { return NT_STATUS_INVALID_HANDLE; } diff --git a/source4/ntvfs/nbench/vfs_nbench.c b/source4/ntvfs/nbench/vfs_nbench.c index 9647666360..b6bce60b08 100644 --- a/source4/ntvfs/nbench/vfs_nbench.c +++ b/source4/ntvfs/nbench/vfs_nbench.c @@ -141,17 +141,18 @@ static NTSTATUS nbench_disconnect(struct ntvfs_module_context *ntvfs) */ static void nbench_unlink_send(struct ntvfs_request *req) { - struct smb_unlink *unl = req->async_states->private_data; + union smb_unlink *unl = req->async_states->private_data; nbench_log(req, "Unlink \"%s\" 0x%x %s\n", - unl->in.pattern, unl->in.attrib, + unl->unlink.in.pattern, unl->unlink.in.attrib, get_nt_error_c_code(req->async_states->status)); PASS_THRU_REP_POST(req); } static NTSTATUS nbench_unlink(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, struct smb_unlink *unl) + struct ntvfs_request *req, + union smb_unlink *unl) { NTSTATUS status; @@ -185,17 +186,18 @@ static NTSTATUS nbench_ioctl(struct ntvfs_module_context *ntvfs, */ static void nbench_chkpath_send(struct ntvfs_request *req) { - struct smb_chkpath *cp = req->async_states->private_data; + union smb_chkpath *cp = req->async_states->private_data; nbench_log(req, "Chkpath \"%s\" %s\n", - cp->in.path, + cp->chkpath.in.path, get_nt_error_c_code(req->async_states->status)); PASS_THRU_REP_POST(req); } static NTSTATUS nbench_chkpath(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, struct smb_chkpath *cp) + struct ntvfs_request *req, + union smb_chkpath *cp) { NTSTATUS status; @@ -212,7 +214,7 @@ static void nbench_qpathinfo_send(struct ntvfs_request *req) union smb_fileinfo *info = req->async_states->private_data; nbench_log(req, "QUERY_PATH_INFORMATION \"%s\" %d %s\n", - info->generic.in.fname, + info->generic.file.path, info->generic.level, get_nt_error_c_code(req->async_states->status)); @@ -237,7 +239,7 @@ static void nbench_qfileinfo_send(struct ntvfs_request *req) union smb_fileinfo *info = req->async_states->private_data; nbench_log(req, "QUERY_FILE_INFORMATION %d %d %s\n", - info->generic.in.fnum, + info->generic.file.fnum, info->generic.level, get_nt_error_c_code(req->async_states->status)); @@ -262,7 +264,7 @@ static void nbench_setpathinfo_send(struct ntvfs_request *req) union smb_setfileinfo *st = req->async_states->private_data; nbench_log(req, "SET_PATH_INFORMATION \"%s\" %d %s\n", - st->generic.file.fname, + st->generic.file.path, st->generic.level, get_nt_error_c_code(req->async_states->status)); @@ -295,7 +297,7 @@ static void nbench_open_send(struct ntvfs_request *req) io->ntcreatex.in.fname, io->ntcreatex.in.create_options, io->ntcreatex.in.open_disposition, - io->ntcreatex.out.fnum, + io->ntcreatex.file.fnum, get_nt_error_c_code(req->async_states->status)); break; @@ -429,7 +431,7 @@ static void nbench_read_send(struct ntvfs_request *req) ZERO_STRUCT(rd->readx.out); } nbench_log(req, "ReadX %d %d %d %d %s\n", - rd->readx.in.fnum, + rd->readx.file.fnum, (int)rd->readx.in.offset, rd->readx.in.maxcnt, rd->readx.out.nread, @@ -467,7 +469,7 @@ static void nbench_write_send(struct ntvfs_request *req) ZERO_STRUCT(wr->writex.out); } nbench_log(req, "WriteX %d %d %d %d %s\n", - wr->writex.in.fnum, + wr->writex.file.fnum, (int)wr->writex.in.offset, wr->writex.in.count, wr->writex.out.nwritten, @@ -479,7 +481,7 @@ static void nbench_write_send(struct ntvfs_request *req) ZERO_STRUCT(wr->write.out); } nbench_log(req, "Write %d %d %d %d %s\n", - wr->write.in.fnum, + wr->write.file.fnum, wr->write.in.offset, wr->write.in.count, wr->write.out.nwritten, @@ -516,7 +518,8 @@ static void nbench_seek_send(struct ntvfs_request *req) } static NTSTATUS nbench_seek(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, struct smb_seek *io) + struct ntvfs_request *req, + union smb_seek *io) { NTSTATUS status; @@ -530,17 +533,18 @@ static NTSTATUS nbench_seek(struct ntvfs_module_context *ntvfs, */ static void nbench_flush_send(struct ntvfs_request *req) { - struct smb_flush *io = req->async_states->private_data; + union smb_flush *io = req->async_states->private_data; nbench_log(req, "Flush %d %s\n", - io->in.fnum, + io->flush.file.fnum, get_nt_error_c_code(req->async_states->status)); PASS_THRU_REP_POST(req); } static NTSTATUS nbench_flush(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, struct smb_flush *io) + struct ntvfs_request *req, + union smb_flush *io) { NTSTATUS status; @@ -559,7 +563,7 @@ static void nbench_close_send(struct ntvfs_request *req) switch (io->generic.level) { case RAW_CLOSE_CLOSE: nbench_log(req, "Close %d %s\n", - io->close.in.fnum, + io->close.file.fnum, get_nt_error_c_code(req->async_states->status)); break; @@ -674,14 +678,14 @@ static void nbench_lock_send(struct ntvfs_request *req) lck->lockx.in.lock_cnt == 1 && lck->lockx.in.ulock_cnt == 0) { nbench_log(req, "LockX %d %d %d %s\n", - lck->lockx.in.fnum, + lck->lockx.file.fnum, (int)lck->lockx.in.locks[0].offset, (int)lck->lockx.in.locks[0].count, get_nt_error_c_code(req->async_states->status)); } else if (lck->generic.level == RAW_LOCK_LOCKX && lck->lockx.in.ulock_cnt == 1) { nbench_log(req, "UnlockX %d %d %d %s\n", - lck->lockx.in.fnum, + lck->lockx.file.fnum, (int)lck->lockx.in.locks[0].offset, (int)lck->lockx.in.locks[0].count, get_nt_error_c_code(req->async_states->status)); diff --git a/source4/ntvfs/ntvfs.h b/source4/ntvfs/ntvfs.h index 46d288c853..b9b09890f9 100644 --- a/source4/ntvfs/ntvfs.h +++ b/source4/ntvfs/ntvfs.h @@ -57,10 +57,10 @@ struct ntvfs_ops { /* path operations */ NTSTATUS (*unlink)(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, - struct smb_unlink *unl); + union smb_unlink *unl); NTSTATUS (*chkpath)(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, - struct smb_chkpath *cp); + union smb_chkpath *cp); NTSTATUS (*qpathinfo)(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_fileinfo *st); @@ -108,10 +108,10 @@ struct ntvfs_ops { union smb_write *io); NTSTATUS (*seek)(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, - struct smb_seek *io); + union smb_seek *io); NTSTATUS (*flush)(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, - struct smb_flush *flush); + union smb_flush *flush); NTSTATUS (*lock)(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_lock *lck); @@ -138,7 +138,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_generic.c b/source4/ntvfs/ntvfs_generic.c index 5133f63268..e373c7a28e 100644 --- a/source4/ntvfs/ntvfs_generic.c +++ b/source4/ntvfs/ntvfs_generic.c @@ -155,7 +155,7 @@ static NTSTATUS ntvfs_map_open_finish(struct ntvfs_module_context *ntvfs, switch (io->generic.level) { case RAW_OPEN_OPEN: - io->openold.out.fnum = io2->generic.out.fnum; + io->openold.file.fnum = io2->generic.file.fnum; io->openold.out.attrib = io2->generic.out.attrib; io->openold.out.write_time = nt_time_to_unix(io2->generic.out.write_time); io->openold.out.size = io2->generic.out.size; @@ -163,7 +163,7 @@ static NTSTATUS ntvfs_map_open_finish(struct ntvfs_module_context *ntvfs, break; case RAW_OPEN_OPENX: - io->openx.out.fnum = io2->generic.out.fnum; + io->openx.file.fnum = io2->generic.file.fnum; io->openx.out.attrib = io2->generic.out.attrib; io->openx.out.write_time = nt_time_to_unix(io2->generic.out.write_time); io->openx.out.size = io2->generic.out.size; @@ -183,7 +183,7 @@ static NTSTATUS ntvfs_map_open_finish(struct ntvfs_module_context *ntvfs, break; case RAW_OPEN_T2OPEN: - io->t2open.out.fnum = io2->generic.out.fnum; + io->t2open.file.fnum = io2->generic.file.fnum; io->t2open.out.attrib = io2->generic.out.attrib; io->t2open.out.write_time = nt_time_to_unix(io2->generic.out.write_time); io->t2open.out.size = io2->generic.out.size; @@ -196,14 +196,14 @@ static NTSTATUS ntvfs_map_open_finish(struct ntvfs_module_context *ntvfs, case RAW_OPEN_MKNEW: case RAW_OPEN_CREATE: - io->mknew.out.fnum = io2->generic.out.fnum; + io->mknew.file.fnum = io2->generic.file.fnum; write_time = io->mknew.in.write_time; break; case RAW_OPEN_CTEMP: - io->ctemp.out.fnum = io2->generic.out.fnum; - io->ctemp.out.name = talloc_strdup(req, io2->generic.in.fname + - strlen(io->ctemp.in.directory) + 1); + io->ctemp.file.fnum = io2->generic.file.fnum; + io->ctemp.out.name = talloc_strdup(req, io2->generic.in.fname + + strlen(io->ctemp.in.directory) + 1); NT_STATUS_HAVE_NO_MEMORY(io->ctemp.out.name); break; @@ -220,7 +220,7 @@ static NTSTATUS ntvfs_map_open_finish(struct ntvfs_module_context *ntvfs, sf = talloc(req, union smb_setfileinfo); NT_STATUS_HAVE_NO_MEMORY(sf); sf->generic.level = RAW_SFILEINFO_STANDARD; - sf->generic.file.fnum = io2->generic.out.fnum; + sf->generic.file.fnum = io2->generic.file.fnum; sf->standard.in.create_time = 0; sf->standard.in.write_time = write_time; sf->standard.in.access_time = 0; @@ -231,7 +231,7 @@ static NTSTATUS ntvfs_map_open_finish(struct ntvfs_module_context *ntvfs, sf = talloc(req, union smb_setfileinfo); NT_STATUS_HAVE_NO_MEMORY(sf); sf->generic.level = RAW_SFILEINFO_END_OF_FILE_INFORMATION; - sf->generic.file.fnum = io2->generic.out.fnum; + sf->generic.file.fnum = io2->generic.file.fnum; sf->end_of_file_info.in.size = set_size; status = ntvfs->ops->setfileinfo(ntvfs, req, sf); if (NT_STATUS_IS_OK(status)) { @@ -861,7 +861,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_qfileinfo(struct ntvfs_module_context *ntvfs, /* ask the backend for the generic info */ info2->generic.level = RAW_FILEINFO_GENERIC; - info2->generic.in.fnum = info->generic.in.fnum; + info2->generic.file.fnum = info->generic.file.fnum; /* only used by the simple backend, which doesn't do async */ req->async_states->state &= ~NTVFS_ASYNC_STATE_MAY_ASYNC; @@ -894,7 +894,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_qpathinfo(struct ntvfs_module_context *ntvfs, /* ask the backend for the generic info */ info2->generic.level = RAW_FILEINFO_GENERIC; - info2->generic.in.fname = info->generic.in.fname; + info2->generic.file.path = info->generic.file.path; /* only used by the simple backend, which doesn't do async */ req->async_states->state &= ~NTVFS_ASYNC_STATE_MAY_ASYNC; @@ -943,7 +943,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_lock(struct ntvfs_module_context *ntvfs, } lck2->generic.level = RAW_LOCK_GENERIC; - lck2->generic.in.fnum = lck->lock.in.fnum; + lck2->generic.file.fnum = lck->lock.file.fnum; lck2->generic.in.mode = 0; lck2->generic.in.timeout = 0; lck2->generic.in.locks = locks; @@ -991,7 +991,7 @@ static NTSTATUS ntvfs_map_write_finish(struct ntvfs_module_context *ntvfs, } lck->unlock.level = RAW_LOCK_UNLOCK; - lck->unlock.in.fnum = wr->writeunlock.in.fnum; + lck->unlock.file.fnum = wr->writeunlock.file.fnum; lck->unlock.in.count = wr->writeunlock.in.count; lck->unlock.in.offset = wr->writeunlock.in.offset; @@ -1013,7 +1013,7 @@ static NTSTATUS ntvfs_map_write_finish(struct ntvfs_module_context *ntvfs, } cl->close.level = RAW_CLOSE_CLOSE; - cl->close.in.fnum = wr->writeclose.in.fnum; + cl->close.file.fnum = wr->writeclose.file.fnum; cl->close.in.write_time = wr->writeclose.in.mtime; if (wr2->generic.in.count != 0) { @@ -1064,7 +1064,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_write(struct ntvfs_module_context *ntvfs, break; case RAW_WRITE_WRITE: - wr2->writex.in.fnum = wr->write.in.fnum; + wr2->writex.file.fnum = wr->write.file.fnum; wr2->writex.in.offset = wr->write.in.offset; wr2->writex.in.wmode = 0; wr2->writex.in.remaining = wr->write.in.remaining; @@ -1074,7 +1074,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_write(struct ntvfs_module_context *ntvfs, break; case RAW_WRITE_WRITEUNLOCK: - wr2->writex.in.fnum = wr->writeunlock.in.fnum; + wr2->writex.file.fnum = wr->writeunlock.file.fnum; wr2->writex.in.offset = wr->writeunlock.in.offset; wr2->writex.in.wmode = 0; wr2->writex.in.remaining = wr->writeunlock.in.remaining; @@ -1084,7 +1084,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_write(struct ntvfs_module_context *ntvfs, break; case RAW_WRITE_WRITECLOSE: - wr2->writex.in.fnum = wr->writeclose.in.fnum; + wr2->writex.file.fnum = wr->writeclose.file.fnum; wr2->writex.in.offset = wr->writeclose.in.offset; wr2->writex.in.wmode = 0; wr2->writex.in.remaining = 0; @@ -1094,7 +1094,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_write(struct ntvfs_module_context *ntvfs, break; case RAW_WRITE_SPLWRITE: - wr2->writex.in.fnum = wr->splwrite.in.fnum; + wr2->writex.file.fnum = wr->splwrite.file.fnum; wr2->writex.in.offset = 0; wr2->writex.in.wmode = 0; wr2->writex.in.remaining = 0; @@ -1165,7 +1165,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_read(struct ntvfs_module_context *ntvfs, break; case RAW_READ_READ: - rd2->readx.in.fnum = rd->read.in.fnum; + rd2->readx.file.fnum = rd->read.file.fnum; rd2->readx.in.offset = rd->read.in.offset; rd2->readx.in.mincnt = rd->read.in.count; rd2->readx.in.maxcnt = rd->read.in.count; @@ -1175,7 +1175,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_read(struct ntvfs_module_context *ntvfs, break; case RAW_READ_READBRAW: - rd2->readx.in.fnum = rd->readbraw.in.fnum; + rd2->readx.file.fnum = rd->readbraw.file.fnum; rd2->readx.in.offset = rd->readbraw.in.offset; rd2->readx.in.mincnt = rd->readbraw.in.mincnt; rd2->readx.in.maxcnt = rd->readbraw.in.maxcnt; @@ -1195,13 +1195,13 @@ _PUBLIC_ NTSTATUS ntvfs_map_read(struct ntvfs_module_context *ntvfs, goto done; } lck->lock.level = RAW_LOCK_LOCK; - lck->lock.in.fnum = rd->lockread.in.fnum; + lck->lock.file.fnum = rd->lockread.file.fnum; lck->lock.in.count = rd->lockread.in.count; lck->lock.in.offset = rd->lockread.in.offset; status = ntvfs->ops->lock(ntvfs, req, lck); req->async_states->state = state; - rd2->readx.in.fnum = rd->lockread.in.fnum; + rd2->readx.file.fnum = rd->lockread.file.fnum; rd2->readx.in.offset = rd->lockread.in.offset; rd2->readx.in.mincnt = rd->lockread.in.count; rd2->readx.in.maxcnt = rd->lockread.in.count; @@ -1238,8 +1238,8 @@ _PUBLIC_ NTSTATUS ntvfs_map_close(struct ntvfs_module_context *ntvfs, return NT_STATUS_INVALID_LEVEL; case RAW_CLOSE_SPLCLOSE: - cl2->close.level = RAW_CLOSE_CLOSE; - cl2->close.in.fnum = cl->splclose.in.fnum; + cl2->close.level = RAW_CLOSE_CLOSE; + cl2->close.file.fnum = cl->splclose.file.fnum; break; } diff --git a/source4/ntvfs/ntvfs_interface.c b/source4/ntvfs/ntvfs_interface.c index 2be3170bd8..68166e5132 100644 --- a/source4/ntvfs/ntvfs_interface.c +++ b/source4/ntvfs/ntvfs_interface.c @@ -68,7 +68,7 @@ _PUBLIC_ NTSTATUS ntvfs_fsinfo(struct ntvfs_request *req, union smb_fsinfo *fs) } /* path operations */ -_PUBLIC_ NTSTATUS ntvfs_unlink(struct ntvfs_request *req, struct smb_unlink *unl) +_PUBLIC_ NTSTATUS ntvfs_unlink(struct ntvfs_request *req, union smb_unlink *unl) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->unlink) { @@ -77,7 +77,7 @@ _PUBLIC_ NTSTATUS ntvfs_unlink(struct ntvfs_request *req, struct smb_unlink *unl return ntvfs->ops->unlink(ntvfs, req, unl); } -_PUBLIC_ NTSTATUS ntvfs_chkpath(struct ntvfs_request *req, struct smb_chkpath *cp) +_PUBLIC_ NTSTATUS ntvfs_chkpath(struct ntvfs_request *req, union smb_chkpath *cp) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->chkpath) { @@ -207,7 +207,7 @@ _PUBLIC_ NTSTATUS ntvfs_write(struct ntvfs_request *req, union smb_write *io) return ntvfs->ops->write(ntvfs, req, io); } -_PUBLIC_ NTSTATUS ntvfs_seek(struct ntvfs_request *req, struct smb_seek *io) +_PUBLIC_ NTSTATUS ntvfs_seek(struct ntvfs_request *req, union smb_seek *io) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->seek) { @@ -217,7 +217,7 @@ _PUBLIC_ NTSTATUS ntvfs_seek(struct ntvfs_request *req, struct smb_seek *io) } _PUBLIC_ NTSTATUS ntvfs_flush(struct ntvfs_request *req, - struct smb_flush *flush) + union smb_flush *flush) { struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->flush) { @@ -314,7 +314,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->tcon->ntvfs_ctx->modules; if (!ntvfs->ops->notify) { @@ -378,7 +378,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_fsinfo(struct ntvfs_module_context *ntvfs, /* path operations */ _PUBLIC_ NTSTATUS ntvfs_next_unlink(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, - struct smb_unlink *unl) + union smb_unlink *unl) { if (!ntvfs->next || !ntvfs->next->ops->unlink) { return NT_STATUS_NOT_IMPLEMENTED; @@ -388,7 +388,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_unlink(struct ntvfs_module_context *ntvfs, _PUBLIC_ NTSTATUS ntvfs_next_chkpath(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, - struct smb_chkpath *cp) + union smb_chkpath *cp) { if (!ntvfs->next || !ntvfs->next->ops->chkpath) { return NT_STATUS_NOT_IMPLEMENTED; @@ -533,7 +533,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_write(struct ntvfs_module_context *ntvfs, _PUBLIC_ NTSTATUS ntvfs_next_seek(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, - struct smb_seek *io) + union smb_seek *io) { if (!ntvfs->next || !ntvfs->next->ops->seek) { return NT_STATUS_NOT_IMPLEMENTED; @@ -543,7 +543,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_seek(struct ntvfs_module_context *ntvfs, _PUBLIC_ NTSTATUS ntvfs_next_flush(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, - struct smb_flush *flush) + union smb_flush *flush) { if (!ntvfs->next || !ntvfs->next->ops->flush) { return NT_STATUS_NOT_IMPLEMENTED; @@ -618,7 +618,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_acl.c b/source4/ntvfs/posix/pvfs_acl.c index a03499b733..246290ae91 100644 --- a/source4/ntvfs/posix/pvfs_acl.c +++ b/source4/ntvfs/posix/pvfs_acl.c @@ -310,7 +310,7 @@ NTSTATUS pvfs_acl_query(struct pvfs_state *pvfs, return NT_STATUS_INVALID_ACL; } - normalise_sd_flags(sd, info->query_secdesc.secinfo_flags); + normalise_sd_flags(sd, info->query_secdesc.in.secinfo_flags); info->query_secdesc.out.sd = sd; diff --git a/source4/ntvfs/posix/pvfs_flush.c b/source4/ntvfs/posix/pvfs_flush.c index bf6e23d520..f0ab02f96b 100644 --- a/source4/ntvfs/posix/pvfs_flush.c +++ b/source4/ntvfs/posix/pvfs_flush.c @@ -40,13 +40,14 @@ static void pvfs_flush_file(struct pvfs_state *pvfs, struct pvfs_file *f) flush a fnum */ NTSTATUS pvfs_flush(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, struct smb_flush *io) + struct ntvfs_request *req, + union smb_flush *io) { struct pvfs_state *pvfs = ntvfs->private_data; struct pvfs_file *f; - if (io->in.fnum != 0xFFFF) { - f = pvfs_find_fd(pvfs, req, io->in.fnum); + if (io->flush.file.fnum != 0xFFFF) { + f = pvfs_find_fd(pvfs, req, io->flush.file.fnum); if (!f) { return NT_STATUS_INVALID_HANDLE; } diff --git a/source4/ntvfs/posix/pvfs_ioctl.c b/source4/ntvfs/posix/pvfs_ioctl.c index aaa9db9986..032aec1d8d 100644 --- a/source4/ntvfs/posix/pvfs_ioctl.c +++ b/source4/ntvfs/posix/pvfs_ioctl.c @@ -42,7 +42,7 @@ static NTSTATUS pvfs_ntioctl(struct ntvfs_module_context *ntvfs, struct pvfs_state *pvfs = ntvfs->private_data; struct pvfs_file *f; - f = pvfs_find_fd(pvfs, req, io->ntioctl.in.fnum); + f = pvfs_find_fd(pvfs, req, io->ntioctl.file.fnum); if (!f) { return NT_STATUS_INVALID_HANDLE; } @@ -62,7 +62,8 @@ static NTSTATUS pvfs_ntioctl(struct ntvfs_module_context *ntvfs, ioctl interface */ NTSTATUS pvfs_ioctl(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, union smb_ioctl *io) + struct ntvfs_request *req, + union smb_ioctl *io) { NTSTATUS status = NT_STATUS_UNSUCCESSFUL; diff --git a/source4/ntvfs/posix/pvfs_lock.c b/source4/ntvfs/posix/pvfs_lock.c index d2317c1852..b9b9832d51 100644 --- a/source4/ntvfs/posix/pvfs_lock.c +++ b/source4/ntvfs/posix/pvfs_lock.c @@ -243,7 +243,7 @@ static NTSTATUS pvfs_lock_cancel(struct pvfs_state *pvfs, struct ntvfs_request * /* check if the lock request matches exactly - you can only cancel with exact matches */ if (p->lck->lockx.in.ulock_cnt == lck->lockx.in.ulock_cnt && p->lck->lockx.in.lock_cnt == lck->lockx.in.lock_cnt && - p->lck->lockx.in.fnum == lck->lockx.in.fnum && + p->lck->lockx.file.fnum == lck->lockx.file.fnum && p->lck->lockx.in.mode == (lck->lockx.in.mode & ~LOCKING_ANDX_CANCEL_LOCK)) { int i; @@ -285,7 +285,7 @@ NTSTATUS pvfs_lock(struct ntvfs_module_context *ntvfs, return ntvfs_map_lock(ntvfs, req, lck); } - f = pvfs_find_fd(pvfs, req, lck->lockx.in.fnum); + f = pvfs_find_fd(pvfs, req, lck->lockx.file.fnum); if (!f) { return NT_STATUS_INVALID_HANDLE; } diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c index 618ddf141b..fcae5f8d61 100644 --- a/source4/ntvfs/posix/pvfs_open.c +++ b/source4/ntvfs/posix/pvfs_open.c @@ -390,7 +390,7 @@ static NTSTATUS pvfs_open_directory(struct pvfs_state *pvfs, talloc_steal(pvfs, f); io->generic.out.oplock_level = OPLOCK_NONE; - io->generic.out.fnum = f->fnum; + io->generic.file.fnum = f->fnum; io->generic.out.create_action = create_action; io->generic.out.create_time = name->dos.create_time; io->generic.out.access_time = name->dos.access_time; @@ -712,7 +712,7 @@ static NTSTATUS pvfs_create_file(struct pvfs_state *pvfs, } else { io->generic.out.oplock_level = OPLOCK_NONE; } - io->generic.out.fnum = f->fnum; + io->generic.file.fnum = f->fnum; io->generic.out.create_action = NTCREATEX_ACTION_CREATED; io->generic.out.create_time = name->dos.create_time; io->generic.out.access_time = name->dos.access_time; @@ -880,7 +880,7 @@ static NTSTATUS pvfs_open_deny_dos(struct ntvfs_module_context *ntvfs, name = f->handle->name; io->generic.out.oplock_level = OPLOCK_NONE; - io->generic.out.fnum = f->fnum; + io->generic.file.fnum = f->fnum; io->generic.out.create_action = NTCREATEX_ACTION_EXISTED; io->generic.out.create_time = name->dos.create_time; io->generic.out.access_time = name->dos.access_time; @@ -1239,7 +1239,7 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs, } else { io->generic.out.oplock_level = OPLOCK_NONE; } - io->generic.out.fnum = f->fnum; + io->generic.file.fnum = f->fnum; io->generic.out.create_action = stream_existed? NTCREATEX_ACTION_EXISTED:NTCREATEX_ACTION_CREATED; io->generic.out.create_time = name->dos.create_time; @@ -1278,7 +1278,7 @@ NTSTATUS pvfs_close(struct ntvfs_module_context *ntvfs, return ntvfs_map_close(ntvfs, req, io); } - f = pvfs_find_fd(pvfs, req, io->close.in.fnum); + f = pvfs_find_fd(pvfs, req, io->close.file.fnum); if (!f) { return NT_STATUS_INVALID_HANDLE; } diff --git a/source4/ntvfs/posix/pvfs_qfileinfo.c b/source4/ntvfs/posix/pvfs_qfileinfo.c index 5d908cbee2..b01b7bb649 100644 --- a/source4/ntvfs/posix/pvfs_qfileinfo.c +++ b/source4/ntvfs/posix/pvfs_qfileinfo.c @@ -289,7 +289,7 @@ NTSTATUS pvfs_qpathinfo(struct ntvfs_module_context *ntvfs, NTSTATUS status; /* resolve the cifs name to a posix name */ - status = pvfs_resolve_name(pvfs, req, info->generic.in.fname, PVFS_RESOLVE_STREAMS, &name); + status = pvfs_resolve_name(pvfs, req, info->generic.file.path, PVFS_RESOLVE_STREAMS, &name); if (!NT_STATUS_IS_OK(status)) { return status; } @@ -326,7 +326,7 @@ NTSTATUS pvfs_qfileinfo(struct ntvfs_module_context *ntvfs, NTSTATUS status; uint32_t access_needed; - f = pvfs_find_fd(pvfs, req, info->generic.in.fnum); + f = pvfs_find_fd(pvfs, req, info->generic.file.fnum); if (!f) { return NT_STATUS_INVALID_HANDLE; } diff --git a/source4/ntvfs/posix/pvfs_read.c b/source4/ntvfs/posix/pvfs_read.c index 93a8060926..15c9111d61 100644 --- a/source4/ntvfs/posix/pvfs_read.c +++ b/source4/ntvfs/posix/pvfs_read.c @@ -41,7 +41,7 @@ NTSTATUS pvfs_read(struct ntvfs_module_context *ntvfs, return ntvfs_map_read(ntvfs, req, rd); } - f = pvfs_find_fd(pvfs, req, rd->readx.in.fnum); + f = pvfs_find_fd(pvfs, req, rd->readx.file.fnum); if (!f) { return NT_STATUS_INVALID_HANDLE; } diff --git a/source4/ntvfs/posix/pvfs_seek.c b/source4/ntvfs/posix/pvfs_seek.c index 33656e4004..1d43f2c855 100644 --- a/source4/ntvfs/posix/pvfs_seek.c +++ b/source4/ntvfs/posix/pvfs_seek.c @@ -27,14 +27,15 @@ seek in a file */ NTSTATUS pvfs_seek(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, struct smb_seek *io) + struct ntvfs_request *req, + union smb_seek *io) { struct pvfs_state *pvfs = ntvfs->private_data; struct pvfs_file *f; struct pvfs_file_handle *h; NTSTATUS status; - f = pvfs_find_fd(pvfs, req, io->in.fnum); + f = pvfs_find_fd(pvfs, req, io->lseek.file.fnum); if (!f) { return NT_STATUS_INVALID_HANDLE; } @@ -42,22 +43,22 @@ NTSTATUS pvfs_seek(struct ntvfs_module_context *ntvfs, status = NT_STATUS_OK; - switch (io->in.mode) { + switch (io->lseek.in.mode) { case SEEK_MODE_START: - h->seek_offset = io->in.offset; + h->seek_offset = io->lseek.in.offset; break; case SEEK_MODE_CURRENT: - h->seek_offset += io->in.offset; + h->seek_offset += io->lseek.in.offset; break; case SEEK_MODE_END: status = pvfs_resolve_name_fd(pvfs, h->fd, h->name); - h->seek_offset = h->name->st.st_size + io->in.offset; + h->seek_offset = h->name->st.st_size + io->lseek.in.offset; break; } - io->out.offset = h->seek_offset; + io->lseek.out.offset = h->seek_offset; return status; } diff --git a/source4/ntvfs/posix/pvfs_unlink.c b/source4/ntvfs/posix/pvfs_unlink.c index ee90adba45..76c9bc10a4 100644 --- a/source4/ntvfs/posix/pvfs_unlink.c +++ b/source4/ntvfs/posix/pvfs_unlink.c @@ -113,7 +113,8 @@ static NTSTATUS pvfs_unlink_one(struct pvfs_state *pvfs, The name can contain CIFS wildcards, but rarely does (except with OS/2 clients) */ NTSTATUS pvfs_unlink(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, struct smb_unlink *unl) + struct ntvfs_request *req, + union smb_unlink *unl) { struct pvfs_state *pvfs = ntvfs->private_data; struct pvfs_dir *dir; @@ -124,7 +125,7 @@ NTSTATUS pvfs_unlink(struct ntvfs_module_context *ntvfs, uint_t ofs; /* resolve the cifs name to a posix name */ - status = pvfs_resolve_name(pvfs, req, unl->in.pattern, + status = pvfs_resolve_name(pvfs, req, unl->unlink.in.pattern, PVFS_RESOLVE_WILDCARD | PVFS_RESOLVE_STREAMS, &name); if (!NT_STATUS_IS_OK(status)) { return status; @@ -140,7 +141,7 @@ NTSTATUS pvfs_unlink(struct ntvfs_module_context *ntvfs, } if (name->stream_name) { - return pvfs_unlink_stream(pvfs, req, name, unl->in.attrib); + return pvfs_unlink_stream(pvfs, req, name, unl->unlink.in.attrib); } /* get list of matching files */ @@ -155,13 +156,13 @@ NTSTATUS pvfs_unlink(struct ntvfs_module_context *ntvfs, while ((fname = pvfs_list_next(dir, &ofs))) { /* this seems to be a special case */ - if ((unl->in.attrib & FILE_ATTRIBUTE_DIRECTORY) && + if ((unl->unlink.in.attrib & FILE_ATTRIBUTE_DIRECTORY) && (strcmp(fname, ".") == 0 || strcmp(fname, "..") == 0)) { return NT_STATUS_OBJECT_NAME_INVALID; } - status = pvfs_unlink_one(pvfs, req, pvfs_list_unix_path(dir), fname, unl->in.attrib); + status = pvfs_unlink_one(pvfs, req, pvfs_list_unix_path(dir), fname, unl->unlink.in.attrib); if (NT_STATUS_IS_OK(status)) { total_deleted++; } diff --git a/source4/ntvfs/posix/pvfs_write.c b/source4/ntvfs/posix/pvfs_write.c index d206e3b830..c16b66b7cc 100644 --- a/source4/ntvfs/posix/pvfs_write.c +++ b/source4/ntvfs/posix/pvfs_write.c @@ -40,7 +40,7 @@ NTSTATUS pvfs_write(struct ntvfs_module_context *ntvfs, return ntvfs_map_write(ntvfs, req, wr); } - f = pvfs_find_fd(pvfs, req, wr->writex.in.fnum); + f = pvfs_find_fd(pvfs, req, wr->writex.file.fnum); if (!f) { return NT_STATUS_INVALID_HANDLE; } diff --git a/source4/ntvfs/posix/vfs_posix.c b/source4/ntvfs/posix/vfs_posix.c index 66fbc4bb4c..ba53dc65e0 100644 --- a/source4/ntvfs/posix/vfs_posix.c +++ b/source4/ntvfs/posix/vfs_posix.c @@ -203,14 +203,15 @@ static NTSTATUS pvfs_disconnect(struct ntvfs_module_context *ntvfs) check if a directory exists */ static NTSTATUS pvfs_chkpath(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, struct smb_chkpath *cp) + struct ntvfs_request *req, + union smb_chkpath *cp) { struct pvfs_state *pvfs = ntvfs->private_data; struct pvfs_filename *name; NTSTATUS status; /* resolve the cifs name to a posix name */ - status = pvfs_resolve_name(pvfs, req, cp->in.path, 0, &name); + status = pvfs_resolve_name(pvfs, req, cp->chkpath.in.path, 0, &name); NT_STATUS_NOT_OK_RETURN(status); if (!name->exists) { diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index 1c7699566d..eb17ef9c63 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -58,7 +58,8 @@ static NTSTATUS print_disconnect(struct ntvfs_module_context *ntvfs) lots of operations are not allowed on printing shares - mostly return NT_STATUS_ACCESS_DENIED */ static NTSTATUS print_unlink(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, struct smb_unlink *unl) + struct ntvfs_request *req, + union smb_unlink *unl) { return NT_STATUS_ACCESS_DENIED; } diff --git a/source4/ntvfs/simple/vfs_simple.c b/source4/ntvfs/simple/vfs_simple.c index be9a680d5b..add0c54291 100644 --- a/source4/ntvfs/simple/vfs_simple.c +++ b/source4/ntvfs/simple/vfs_simple.c @@ -106,13 +106,14 @@ static struct svfs_file *find_fd(struct svfs_private *private, int fd) The name can contain CIFS wildcards, but rarely does (except with OS/2 clients) */ static NTSTATUS svfs_unlink(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, struct smb_unlink *unl) + struct ntvfs_request *req, + union smb_unlink *unl) { char *unix_path; CHECK_READ_ONLY(req); - unix_path = svfs_unix_path(ntvfs, req, unl->in.pattern); + unix_path = svfs_unix_path(ntvfs, req, unl->unlink.in.pattern); /* ignoring wildcards ... */ if (unlink(unix_path) == -1) { @@ -136,12 +137,13 @@ static NTSTATUS svfs_ioctl(struct ntvfs_module_context *ntvfs, check if a directory exists */ static NTSTATUS svfs_chkpath(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, struct smb_chkpath *cp) + struct ntvfs_request *req, + union smb_chkpath *cp) { char *unix_path; struct stat st; - unix_path = svfs_unix_path(ntvfs, req, cp->in.path); + unix_path = svfs_unix_path(ntvfs, req, cp->chkpath.in.path); if (stat(unix_path, &st) == -1) { return map_nt_error_from_unix(errno); @@ -250,12 +252,12 @@ static NTSTATUS svfs_qpathinfo(struct ntvfs_module_context *ntvfs, char *unix_path; struct stat st; - DEBUG(19,("svfs_qpathinfo: file %s level 0x%x\n", info->generic.in.fname, info->generic.level)); + DEBUG(19,("svfs_qpathinfo: file %s level 0x%x\n", info->generic.file.path, info->generic.level)); if (info->generic.level != RAW_FILEINFO_GENERIC) { return ntvfs_map_qpathinfo(ntvfs, req, info); } - unix_path = svfs_unix_path(ntvfs, req, info->generic.in.fname); + unix_path = svfs_unix_path(ntvfs, req, info->generic.file.path); DEBUG(19,("svfs_qpathinfo: file %s\n", unix_path)); if (stat(unix_path, &st) == -1) { DEBUG(19,("svfs_qpathinfo: file %s errno=%d\n", unix_path, errno)); @@ -279,12 +281,12 @@ static NTSTATUS svfs_qfileinfo(struct ntvfs_module_context *ntvfs, return ntvfs_map_qfileinfo(ntvfs, req, info); } - f = find_fd(private, info->generic.in.fnum); + f = find_fd(private, info->generic.file.fnum); if (!f) { return NT_STATUS_INVALID_HANDLE; } - if (fstat(info->generic.in.fnum, &st) == -1) { + if (fstat(info->generic.file.fnum, &st) == -1) { return map_nt_error_from_unix(errno); } @@ -386,7 +388,7 @@ do_open: unix_to_nt_time(&io->generic.out.access_time, st.st_atime); unix_to_nt_time(&io->generic.out.write_time, st.st_mtime); unix_to_nt_time(&io->generic.out.change_time, st.st_mtime); - io->generic.out.fnum = fd; + io->generic.file.fnum = fd; io->generic.out.alloc_size = st.st_size; io->generic.out.size = st.st_size; io->generic.out.attrib = svfs_unix_to_dos_attrib(st.st_mode); @@ -482,7 +484,7 @@ static NTSTATUS svfs_read(struct ntvfs_module_context *ntvfs, return NT_STATUS_NOT_SUPPORTED; } - ret = pread(rd->readx.in.fnum, + ret = pread(rd->readx.file.fnum, rd->readx.out.data, rd->readx.in.maxcnt, rd->readx.in.offset); @@ -511,7 +513,7 @@ static NTSTATUS svfs_write(struct ntvfs_module_context *ntvfs, CHECK_READ_ONLY(req); - ret = pwrite(wr->writex.in.fnum, + ret = pwrite(wr->writex.file.fnum, wr->writex.in.data, wr->writex.in.count, wr->writex.in.offset); @@ -529,7 +531,8 @@ static NTSTATUS svfs_write(struct ntvfs_module_context *ntvfs, seek in a file */ static NTSTATUS svfs_seek(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, struct smb_seek *io) + struct ntvfs_request *req, + union smb_seek *io) { return NT_STATUS_NOT_SUPPORTED; } @@ -538,9 +541,10 @@ static NTSTATUS svfs_seek(struct ntvfs_module_context *ntvfs, flush a file */ static NTSTATUS svfs_flush(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, struct smb_flush *io) + struct ntvfs_request *req, + union smb_flush *io) { - fsync(io->in.fnum); + fsync(io->flush.file.fnum); return NT_STATUS_OK; } @@ -548,7 +552,8 @@ static NTSTATUS svfs_flush(struct ntvfs_module_context *ntvfs, close a file */ static NTSTATUS svfs_close(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, union smb_close *io) + struct ntvfs_request *req, + union smb_close *io) { struct svfs_private *private = ntvfs->private_data; struct svfs_file *f; @@ -558,12 +563,12 @@ static NTSTATUS svfs_close(struct ntvfs_module_context *ntvfs, return NT_STATUS_INVALID_LEVEL; } - f = find_fd(private, io->close.in.fnum); + f = find_fd(private, io->close.file.fnum); if (!f) { return NT_STATUS_INVALID_HANDLE; } - if (close(io->close.in.fnum) == -1) { + if (close(io->close.file.fnum) == -1) { return map_nt_error_from_unix(errno); } diff --git a/source4/ntvfs/unixuid/vfs_unixuid.c b/source4/ntvfs/unixuid/vfs_unixuid.c index 3b36a6a891..cc7e13fde0 100644 --- a/source4/ntvfs/unixuid/vfs_unixuid.c +++ b/source4/ntvfs/unixuid/vfs_unixuid.c @@ -250,7 +250,8 @@ static NTSTATUS unixuid_disconnect(struct ntvfs_module_context *ntvfs) delete a file */ static NTSTATUS unixuid_unlink(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, struct smb_unlink *unl) + struct ntvfs_request *req, + union smb_unlink *unl) { NTSTATUS status; @@ -276,7 +277,8 @@ static NTSTATUS unixuid_ioctl(struct ntvfs_module_context *ntvfs, check if a directory exists */ static NTSTATUS unixuid_chkpath(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, struct smb_chkpath *cp) + struct ntvfs_request *req, + union smb_chkpath *cp) { NTSTATUS status; @@ -420,7 +422,8 @@ static NTSTATUS unixuid_write(struct ntvfs_module_context *ntvfs, seek in a file */ static NTSTATUS unixuid_seek(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, struct smb_seek *io) + struct ntvfs_request *req, + union smb_seek *io) { NTSTATUS status; @@ -433,7 +436,8 @@ static NTSTATUS unixuid_seek(struct ntvfs_module_context *ntvfs, flush a file */ static NTSTATUS unixuid_flush(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, struct smb_flush *io) + struct ntvfs_request *req, + union smb_flush *io) { NTSTATUS status; |