summaryrefslogtreecommitdiff
path: root/source4/ntvfs
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-03-12 22:48:25 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:57:06 -0500
commita1b295ed4823ce8d06f830b8db9a5d965c934b54 (patch)
tree2de735a28634c011930456f6591072a3c1471263 /source4/ntvfs
parent33647bd841c1c74e7dc50e93379e372056ac2df1 (diff)
downloadsamba-a1b295ed4823ce8d06f830b8db9a5d965c934b54.tar.gz
samba-a1b295ed4823ce8d06f830b8db9a5d965c934b54.tar.bz2
samba-a1b295ed4823ce8d06f830b8db9a5d965c934b54.zip
r14256: - rename smb_file -> smb_handle
- move it into the in/out substructs again - allow file.path only on smb_fileinfo/smb_setfileinfo metze (This used to be commit be6d5298a2cdb7e7c61d70471bad445645af5963)
Diffstat (limited to 'source4/ntvfs')
-rw-r--r--source4/ntvfs/ipc/vfs_ipc.c14
-rw-r--r--source4/ntvfs/nbench/vfs_nbench.c24
-rw-r--r--source4/ntvfs/ntvfs_generic.c68
-rw-r--r--source4/ntvfs/posix/pvfs_flush.c4
-rw-r--r--source4/ntvfs/posix/pvfs_ioctl.c2
-rw-r--r--source4/ntvfs/posix/pvfs_lock.c4
-rw-r--r--source4/ntvfs/posix/pvfs_open.c12
-rw-r--r--source4/ntvfs/posix/pvfs_qfileinfo.c4
-rw-r--r--source4/ntvfs/posix/pvfs_read.c2
-rw-r--r--source4/ntvfs/posix/pvfs_seek.c2
-rw-r--r--source4/ntvfs/posix/pvfs_setfileinfo.c19
-rw-r--r--source4/ntvfs/posix/pvfs_write.c2
-rw-r--r--source4/ntvfs/simple/vfs_simple.c24
13 files changed, 91 insertions, 90 deletions
diff --git a/source4/ntvfs/ipc/vfs_ipc.c b/source4/ntvfs/ipc/vfs_ipc.c
index 2df7ac61ab..b652b0f530 100644
--- a/source4/ntvfs/ipc/vfs_ipc.c
+++ b/source4/ntvfs/ipc/vfs_ipc.c
@@ -265,7 +265,7 @@ static NTSTATUS ipc_open_ntcreatex(struct ntvfs_module_context *ntvfs,
}
ZERO_STRUCT(oi->ntcreatex.out);
- oi->ntcreatex.file.fnum = p->fnum;
+ oi->ntcreatex.out.file.fnum = p->fnum;
oi->ntcreatex.out.ipc_state = p->ipc_state;
oi->ntcreatex.out.file_type = FILE_TYPE_MESSAGE_MODE_PIPE;
@@ -288,9 +288,9 @@ static NTSTATUS ipc_open_openx(struct ntvfs_module_context *ntvfs,
}
ZERO_STRUCT(oi->openx.out);
- oi->openx.file.fnum = p->fnum;
- oi->openx.out.ftype = 2;
- oi->openx.out.devstate = p->ipc_state;
+ oi->openx.out.file.fnum = p->fnum;
+ oi->openx.out.ftype = 2;
+ oi->openx.out.devstate = p->ipc_state;
return status;
}
@@ -382,7 +382,7 @@ static NTSTATUS ipc_read(struct ntvfs_module_context *ntvfs,
return ntvfs_map_read(ntvfs, req, rd);
}
- fnum = rd->readx.file.fnum;
+ fnum = rd->readx.in.file.fnum;
p = pipe_state_find(private, fnum);
if (!p) {
@@ -425,7 +425,7 @@ static NTSTATUS ipc_write(struct ntvfs_module_context *ntvfs,
return ntvfs_map_write(ntvfs, req, wr);
}
- fnum = wr->writex.file.fnum;
+ fnum = wr->writex.in.file.fnum;
data.data = discard_const_p(void, wr->writex.in.data);
data.length = wr->writex.in.count;
@@ -478,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.file.fnum);
+ p = pipe_state_find(private, io->close.in.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 b6bce60b08..6dcf58182a 100644
--- a/source4/ntvfs/nbench/vfs_nbench.c
+++ b/source4/ntvfs/nbench/vfs_nbench.c
@@ -214,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.file.path,
+ info->generic.in.file.path,
info->generic.level,
get_nt_error_c_code(req->async_states->status));
@@ -239,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.file.fnum,
+ info->generic.in.file.fnum,
info->generic.level,
get_nt_error_c_code(req->async_states->status));
@@ -264,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.path,
+ st->generic.in.file.path,
st->generic.level,
get_nt_error_c_code(req->async_states->status));
@@ -297,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.file.fnum,
+ io->ntcreatex.out.file.fnum,
get_nt_error_c_code(req->async_states->status));
break;
@@ -431,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.file.fnum,
+ rd->readx.in.file.fnum,
(int)rd->readx.in.offset,
rd->readx.in.maxcnt,
rd->readx.out.nread,
@@ -469,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.file.fnum,
+ wr->writex.in.file.fnum,
(int)wr->writex.in.offset,
wr->writex.in.count,
wr->writex.out.nwritten,
@@ -481,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.file.fnum,
+ wr->write.in.file.fnum,
wr->write.in.offset,
wr->write.in.count,
wr->write.out.nwritten,
@@ -536,7 +536,7 @@ static void nbench_flush_send(struct ntvfs_request *req)
union smb_flush *io = req->async_states->private_data;
nbench_log(req, "Flush %d %s\n",
- io->flush.file.fnum,
+ io->flush.in.file.fnum,
get_nt_error_c_code(req->async_states->status));
PASS_THRU_REP_POST(req);
@@ -563,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.file.fnum,
+ io->close.in.file.fnum,
get_nt_error_c_code(req->async_states->status));
break;
@@ -678,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.file.fnum,
+ lck->lockx.in.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.file.fnum,
+ lck->lockx.in.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));
@@ -714,7 +714,7 @@ static void nbench_setfileinfo_send(struct ntvfs_request *req)
union smb_setfileinfo *info = req->async_states->private_data;
nbench_log(req, "SET_FILE_INFORMATION %d %d %s\n",
- info->generic.file.fnum,
+ info->generic.in.file.fnum,
info->generic.level,
get_nt_error_c_code(req->async_states->status));
diff --git a/source4/ntvfs/ntvfs_generic.c b/source4/ntvfs/ntvfs_generic.c
index e4bc963882..51b03606fb 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.file.fnum = io2->generic.file.fnum;
+ io->openold.out.file.fnum = io2->generic.out.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.file.fnum = io2->generic.file.fnum;
+ io->openx.out.file.fnum = io2->generic.out.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.file.fnum = io2->generic.file.fnum;
+ io->t2open.out.file.fnum = io2->generic.out.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.file.fnum = io2->generic.file.fnum;
- write_time = io->mknew.in.write_time;
+ io->mknew.out.file.fnum = io2->generic.out.file.fnum;
+ write_time = io->mknew.in.write_time;
break;
case RAW_OPEN_CTEMP:
- 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);
+ io->ctemp.out.file.fnum = io2->generic.out.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.file.fnum;
+ sf->generic.in.file.fnum = io2->generic.out.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.file.fnum;
+ sf->generic.in.file.fnum = io2->generic.out.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.file.fnum = info->generic.file.fnum;
+ info2->generic.in.file.fnum = info->generic.in.file.fnum;
/* only used by the simple backend, which doesn't do async */
req->async_states->state &= ~NTVFS_ASYNC_STATE_MAY_ASYNC;
@@ -893,8 +893,8 @@ _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.file.path = info->generic.file.path;
+ info2->generic.level = RAW_FILEINFO_GENERIC;
+ info2->generic.in.file.path = info->generic.in.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.file.fnum = lck->lock.file.fnum;
+ lck2->generic.in.file.fnum = lck->lock.in.file.fnum;
lck2->generic.in.mode = 0;
lck2->generic.in.timeout = 0;
lck2->generic.in.locks = locks;
@@ -990,10 +990,10 @@ static NTSTATUS ntvfs_map_write_finish(struct ntvfs_module_context *ntvfs,
return NT_STATUS_NO_MEMORY;
}
- lck->unlock.level = RAW_LOCK_UNLOCK;
- lck->unlock.file.fnum = wr->writeunlock.file.fnum;
- lck->unlock.in.count = wr->writeunlock.in.count;
- lck->unlock.in.offset = wr->writeunlock.in.offset;
+ lck->unlock.level = RAW_LOCK_UNLOCK;
+ lck->unlock.in.file.fnum= wr->writeunlock.in.file.fnum;
+ lck->unlock.in.count = wr->writeunlock.in.count;
+ lck->unlock.in.offset = wr->writeunlock.in.offset;
if (lck->unlock.in.count != 0) {
/* do the lock sync for now */
@@ -1012,9 +1012,9 @@ static NTSTATUS ntvfs_map_write_finish(struct ntvfs_module_context *ntvfs,
return NT_STATUS_NO_MEMORY;
}
- cl->close.level = RAW_CLOSE_CLOSE;
- cl->close.file.fnum = wr->writeclose.file.fnum;
- cl->close.in.write_time = wr->writeclose.in.mtime;
+ cl->close.level = RAW_CLOSE_CLOSE;
+ cl->close.in.file.fnum = wr->writeclose.in.file.fnum;
+ cl->close.in.write_time = wr->writeclose.in.mtime;
if (wr2->generic.in.count != 0) {
/* do the close sync for now */
@@ -1064,7 +1064,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_write(struct ntvfs_module_context *ntvfs,
break;
case RAW_WRITE_WRITE:
- wr2->writex.file.fnum = wr->write.file.fnum;
+ wr2->writex.in.file.fnum = wr->write.in.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.file.fnum = wr->writeunlock.file.fnum;
+ wr2->writex.in.file.fnum = wr->writeunlock.in.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.file.fnum = wr->writeclose.file.fnum;
+ wr2->writex.in.file.fnum = wr->writeclose.in.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.file.fnum = wr->splwrite.file.fnum;
+ wr2->writex.in.file.fnum = wr->splwrite.in.file.fnum;
wr2->writex.in.offset = 0;
wr2->writex.in.wmode = 0;
wr2->writex.in.remaining = 0;
@@ -1166,7 +1166,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_read(struct ntvfs_module_context *ntvfs,
break;
case RAW_READ_READ:
- rd2->readx.file.fnum = rd->read.file.fnum;
+ rd2->readx.in.file.fnum = rd->read.in.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;
@@ -1176,7 +1176,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_read(struct ntvfs_module_context *ntvfs,
break;
case RAW_READ_READBRAW:
- rd2->readx.file.fnum = rd->readbraw.file.fnum;
+ rd2->readx.in.file.fnum = rd->readbraw.in.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,14 +1195,14 @@ _PUBLIC_ NTSTATUS ntvfs_map_read(struct ntvfs_module_context *ntvfs,
status = NT_STATUS_NO_MEMORY;
goto done;
}
- lck->lock.level = RAW_LOCK_LOCK;
- lck->lock.file.fnum = rd->lockread.file.fnum;
- lck->lock.in.count = rd->lockread.in.count;
- lck->lock.in.offset = rd->lockread.in.offset;
+ lck->lock.level = RAW_LOCK_LOCK;
+ lck->lock.in.file.fnum = rd->lockread.in.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.file.fnum = rd->lockread.file.fnum;
+ rd2->readx.in.file.fnum = rd->lockread.in.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;
@@ -1239,8 +1239,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.file.fnum = cl->splclose.file.fnum;
+ cl2->close.level = RAW_CLOSE_CLOSE;
+ cl2->close.in.file.fnum = cl->splclose.in.file.fnum;
break;
}
diff --git a/source4/ntvfs/posix/pvfs_flush.c b/source4/ntvfs/posix/pvfs_flush.c
index f0ab02f96b..ad87ed623b 100644
--- a/source4/ntvfs/posix/pvfs_flush.c
+++ b/source4/ntvfs/posix/pvfs_flush.c
@@ -46,8 +46,8 @@ NTSTATUS pvfs_flush(struct ntvfs_module_context *ntvfs,
struct pvfs_state *pvfs = ntvfs->private_data;
struct pvfs_file *f;
- if (io->flush.file.fnum != 0xFFFF) {
- f = pvfs_find_fd(pvfs, req, io->flush.file.fnum);
+ if (io->flush.in.file.fnum != 0xFFFF) {
+ f = pvfs_find_fd(pvfs, req, io->flush.in.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 032aec1d8d..829da47a12 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.file.fnum);
+ f = pvfs_find_fd(pvfs, req, io->ntioctl.in.file.fnum);
if (!f) {
return NT_STATUS_INVALID_HANDLE;
}
diff --git a/source4/ntvfs/posix/pvfs_lock.c b/source4/ntvfs/posix/pvfs_lock.c
index b9b9832d51..4dbb13cb42 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.file.fnum == lck->lockx.file.fnum &&
+ p->lck->lockx.in.file.fnum == lck->lockx.in.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.file.fnum);
+ f = pvfs_find_fd(pvfs, req, lck->lockx.in.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 fcae5f8d61..d4b2d0b30a 100644
--- a/source4/ntvfs/posix/pvfs_open.c
+++ b/source4/ntvfs/posix/pvfs_open.c
@@ -144,7 +144,7 @@ static NTSTATUS pvfs_open_setup_eas_acl(struct pvfs_state *pvfs,
if (io->ntcreatex.in.sec_desc) {
union smb_setfileinfo set;
- set.set_secdesc.file.fnum = fnum;
+ set.set_secdesc.in.file.fnum = fnum;
set.set_secdesc.in.secinfo_flags = SECINFO_DACL;
set.set_secdesc.in.sd = io->ntcreatex.in.sec_desc;
@@ -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.file.fnum = f->fnum;
+ io->generic.out.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.file.fnum = f->fnum;
+ io->generic.out.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.file.fnum = f->fnum;
+ io->generic.out.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.file.fnum = f->fnum;
+ io->generic.out.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.file.fnum);
+ f = pvfs_find_fd(pvfs, req, io->close.in.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 b01b7bb649..c23a3c8348 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.file.path, PVFS_RESOLVE_STREAMS, &name);
+ status = pvfs_resolve_name(pvfs, req, info->generic.in.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.file.fnum);
+ f = pvfs_find_fd(pvfs, req, info->generic.in.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 a6b7cf6dd0..c88f49d116 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.file.fnum);
+ f = pvfs_find_fd(pvfs, req, rd->readx.in.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 1d43f2c855..dbfb4e1c3d 100644
--- a/source4/ntvfs/posix/pvfs_seek.c
+++ b/source4/ntvfs/posix/pvfs_seek.c
@@ -35,7 +35,7 @@ NTSTATUS pvfs_seek(struct ntvfs_module_context *ntvfs,
struct pvfs_file_handle *h;
NTSTATUS status;
- f = pvfs_find_fd(pvfs, req, io->lseek.file.fnum);
+ f = pvfs_find_fd(pvfs, req, io->lseek.in.file.fnum);
if (!f) {
return NT_STATUS_INVALID_HANDLE;
}
diff --git a/source4/ntvfs/posix/pvfs_setfileinfo.c b/source4/ntvfs/posix/pvfs_setfileinfo.c
index 5a6643bdd4..45edaa5b94 100644
--- a/source4/ntvfs/posix/pvfs_setfileinfo.c
+++ b/source4/ntvfs/posix/pvfs_setfileinfo.c
@@ -71,14 +71,14 @@ static uint32_t pvfs_setfileinfo_access(union smb_setfileinfo *info)
static NTSTATUS pvfs_setfileinfo_rename(struct pvfs_state *pvfs,
struct ntvfs_request *req,
struct pvfs_filename *name,
- struct smb_rename_information *r)
+ union smb_setfileinfo *info)
{
NTSTATUS status;
struct pvfs_filename *name2;
char *new_name, *p;
/* renames are only allowed within a directory */
- if (strchr_m(r->new_name, '\\')) {
+ if (strchr_m(info->rename_information.in.new_name, '\\')) {
return NT_STATUS_NOT_SUPPORTED;
}
@@ -93,7 +93,7 @@ static NTSTATUS pvfs_setfileinfo_rename(struct pvfs_state *pvfs,
}
/* w2k3 does not appear to allow relative rename */
- if (r->root_fid != 0) {
+ if (info->rename_information.in.root_fid != 0) {
return NT_STATUS_INVALID_PARAMETER;
}
@@ -108,7 +108,8 @@ static NTSTATUS pvfs_setfileinfo_rename(struct pvfs_state *pvfs,
}
*p = 0;
- new_name = talloc_asprintf(req, "%s\\%s", new_name, r->new_name);
+ new_name = talloc_asprintf(req, "%s\\%s", new_name,
+ info->rename_information.in.new_name);
if (new_name == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -128,7 +129,7 @@ static NTSTATUS pvfs_setfileinfo_rename(struct pvfs_state *pvfs,
return NT_STATUS_OK;
}
- if (!r->overwrite) {
+ if (!info->rename_information.in.overwrite) {
return NT_STATUS_OBJECT_NAME_COLLISION;
}
@@ -249,7 +250,7 @@ NTSTATUS pvfs_setfileinfo(struct ntvfs_module_context *ntvfs,
NTSTATUS status;
uint32_t access_needed;
- f = pvfs_find_fd(pvfs, req, info->generic.file.fnum);
+ f = pvfs_find_fd(pvfs, req, info->generic.in.file.fnum);
if (!f) {
return NT_STATUS_INVALID_HANDLE;
}
@@ -358,7 +359,7 @@ NTSTATUS pvfs_setfileinfo(struct ntvfs_module_context *ntvfs,
case RAW_SFILEINFO_RENAME_INFORMATION:
return pvfs_setfileinfo_rename(pvfs, req, h->name,
- &info->rename_information.in);
+ info);
case RAW_SFILEINFO_SEC_DESC:
return pvfs_acl_set(pvfs, req, h->name, h->fd, f->access_mask, info);
@@ -435,7 +436,7 @@ NTSTATUS pvfs_setpathinfo(struct ntvfs_module_context *ntvfs,
uint32_t access_needed;
/* resolve the cifs name to a posix name */
- status = pvfs_resolve_name(pvfs, req, info->generic.file.path,
+ status = pvfs_resolve_name(pvfs, req, info->generic.in.file.path,
PVFS_RESOLVE_STREAMS, &name);
if (!NT_STATUS_IS_OK(status)) {
return status;
@@ -534,7 +535,7 @@ NTSTATUS pvfs_setpathinfo(struct ntvfs_module_context *ntvfs,
case RAW_SFILEINFO_RENAME_INFORMATION:
return pvfs_setfileinfo_rename(pvfs, req, name,
- &info->rename_information.in);
+ info);
case RAW_SFILEINFO_DISPOSITION_INFO:
case RAW_SFILEINFO_DISPOSITION_INFORMATION:
diff --git a/source4/ntvfs/posix/pvfs_write.c b/source4/ntvfs/posix/pvfs_write.c
index c16b66b7cc..6930a0ba41 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.file.fnum);
+ f = pvfs_find_fd(pvfs, req, wr->writex.in.file.fnum);
if (!f) {
return NT_STATUS_INVALID_HANDLE;
}
diff --git a/source4/ntvfs/simple/vfs_simple.c b/source4/ntvfs/simple/vfs_simple.c
index add0c54291..fe43776dcc 100644
--- a/source4/ntvfs/simple/vfs_simple.c
+++ b/source4/ntvfs/simple/vfs_simple.c
@@ -252,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.file.path, info->generic.level));
+ DEBUG(19,("svfs_qpathinfo: file %s level 0x%x\n", info->generic.in.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.file.path);
+ unix_path = svfs_unix_path(ntvfs, req, info->generic.in.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));
@@ -281,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.file.fnum);
+ f = find_fd(private, info->generic.in.file.fnum);
if (!f) {
return NT_STATUS_INVALID_HANDLE;
}
- if (fstat(info->generic.file.fnum, &st) == -1) {
+ if (fstat(info->generic.in.file.fnum, &st) == -1) {
return map_nt_error_from_unix(errno);
}
@@ -388,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.file.fnum = fd;
+ io->generic.out.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);
@@ -484,7 +484,7 @@ static NTSTATUS svfs_read(struct ntvfs_module_context *ntvfs,
return NT_STATUS_NOT_SUPPORTED;
}
- ret = pread(rd->readx.file.fnum,
+ ret = pread(rd->readx.in.file.fnum,
rd->readx.out.data,
rd->readx.in.maxcnt,
rd->readx.in.offset);
@@ -513,7 +513,7 @@ static NTSTATUS svfs_write(struct ntvfs_module_context *ntvfs,
CHECK_READ_ONLY(req);
- ret = pwrite(wr->writex.file.fnum,
+ ret = pwrite(wr->writex.in.file.fnum,
wr->writex.in.data,
wr->writex.in.count,
wr->writex.in.offset);
@@ -544,7 +544,7 @@ static NTSTATUS svfs_flush(struct ntvfs_module_context *ntvfs,
struct ntvfs_request *req,
union smb_flush *io)
{
- fsync(io->flush.file.fnum);
+ fsync(io->flush.in.file.fnum);
return NT_STATUS_OK;
}
@@ -563,12 +563,12 @@ static NTSTATUS svfs_close(struct ntvfs_module_context *ntvfs,
return NT_STATUS_INVALID_LEVEL;
}
- f = find_fd(private, io->close.file.fnum);
+ f = find_fd(private, io->close.in.file.fnum);
if (!f) {
return NT_STATUS_INVALID_HANDLE;
}
- if (close(io->close.file.fnum) == -1) {
+ if (close(io->close.in.file.fnum) == -1) {
return map_nt_error_from_unix(errno);
}
@@ -651,7 +651,7 @@ static NTSTATUS svfs_setfileinfo(struct ntvfs_module_context *ntvfs,
switch (info->generic.level) {
case RAW_SFILEINFO_END_OF_FILE_INFO:
case RAW_SFILEINFO_END_OF_FILE_INFORMATION:
- if (ftruncate(info->end_of_file_info.file.fnum,
+ if (ftruncate(info->end_of_file_info.in.file.fnum,
info->end_of_file_info.in.size) == -1) {
return map_nt_error_from_unix(errno);
}
@@ -659,7 +659,7 @@ static NTSTATUS svfs_setfileinfo(struct ntvfs_module_context *ntvfs,
case RAW_SFILEINFO_SETATTRE:
unix_times.actime = info->setattre.in.access_time;
unix_times.modtime = info->setattre.in.write_time;
- fd = info->setattre.file.fnum;
+ fd = info->setattre.in.file.fnum;
if (unix_times.actime == 0 && unix_times.modtime == 0) {
break;