summaryrefslogtreecommitdiff
path: root/source4/smb_server/reply.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-05-25 13:57:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:14 -0500
commit579c13da43d5b40ac6d6c1436399fbc1d8dfd054 (patch)
tree42299570746f2d7f80356b689cb15e3db6c53d3c /source4/smb_server/reply.c
parent81e8de9ca85fe9a6658beb1dab0d231c13cda063 (diff)
downloadsamba-579c13da43d5b40ac6d6c1436399fbc1d8dfd054.tar.gz
samba-579c13da43d5b40ac6d6c1436399fbc1d8dfd054.tar.bz2
samba-579c13da43d5b40ac6d6c1436399fbc1d8dfd054.zip
r873: converted samba4 to use real 64 bit integers instead of
structures. This was suggested by metze recently. I checked on the build farm and all the machines we have support 64 bit ints, and support the LL suffix for 64 bit constants. I suspect some won't support strtoll() and related functions, so we will probably need replacements for those. (This used to be commit 9a9244a1c66654c12abe4379661cba83a73c4c21)
Diffstat (limited to 'source4/smb_server/reply.c')
-rw-r--r--source4/smb_server/reply.c41
1 files changed, 8 insertions, 33 deletions
diff --git a/source4/smb_server/reply.c b/source4/smb_server/reply.c
index 073ee956ca..eab71c519c 100644
--- a/source4/smb_server/reply.c
+++ b/source4/smb_server/reply.c
@@ -672,13 +672,7 @@ void reply_readbraw(struct request_context *req)
/* the 64 bit varient */
if (req->in.wct == 10) {
uint32 offset_high = IVAL(req->in.vwv, VWV(8));
-#ifdef LARGE_SMB_OFF_T
io.readbraw.in.offset |= (((SMB_OFF_T)offset_high) << 32);
-#else
- if (offset_high != 0) {
- goto failed;
- }
-#endif
}
/* before calling the backend we setup the raw buffer. This
@@ -884,14 +878,7 @@ void reply_read_and_X(struct request_context *req)
/* the 64 bit varient */
if (req->in.wct == 12) {
uint32 offset_high = IVAL(req->in.vwv, VWV(10));
-#ifdef LARGE_SMB_OFF_T
- io->readx.in.offset |= (((SMB_OFF_T)offset_high) << 32);
-#else
- if (offset_high != 0) {
- req_reply_error(req, NT_STATUS_FOOBAR);
- return;
- }
-#endif
+ io->readx.in.offset |= (((uint64_t)offset_high) << 32);
}
/* setup the reply packet assuming the maximum possible read */
@@ -1079,14 +1066,7 @@ void reply_write_and_X(struct request_context *req)
if (req->in.wct == 14) {
uint32 offset_high = IVAL(req->in.vwv, VWV(12));
uint16 count_high = SVAL(req->in.vwv, VWV(9));
-#ifdef LARGE_SMB_OFF_T
- io->writex.in.offset |= (((SMB_OFF_T)offset_high) << 32);
-#else
- if (offset_high != 0) {
- req_reply_error(req, NT_STATUS_FOOBAR);
- return;
- }
-#endif
+ io->writex.in.offset |= (((uint64_t)offset_high) << 32);
io->writex.in.count |= ((uint32)count_high) << 16;
}
@@ -1788,13 +1768,8 @@ void reply_lockingX(struct request_context *req)
lck->lockx.in.locks[i].count = IVAL(p, 6);
}
if (ofs_high != 0 || count_high != 0) {
-#ifdef LARGE_SMB_OFF_T
- lck->lockx.in.locks[i].count |= ((SMB_OFF_T)count_high) << 32;
- lck->lockx.in.locks[i].offset |= ((SMB_OFF_T)ofs_high) << 32;
-#else
- req_reply_error(req, NT_STATUS_FOOBAR);
- return;
-#endif
+ lck->lockx.in.locks[i].count |= ((uint64_t)count_high) << 32;
+ lck->lockx.in.locks[i].offset |= ((uint64_t)ofs_high) << 32;
}
p += lck_size;
}
@@ -2204,10 +2179,10 @@ static void reply_ntcreate_and_X_send(struct request_context *req)
/* the rest of the parameters are not aligned! */
SSVAL(req->out.vwv, 5, io->ntcreatex.out.fnum);
SIVAL(req->out.vwv, 7, io->ntcreatex.out.create_action);
- push_nttime(req->out.vwv, 11, &io->ntcreatex.out.create_time);
- push_nttime(req->out.vwv, 19, &io->ntcreatex.out.access_time);
- push_nttime(req->out.vwv, 27, &io->ntcreatex.out.write_time);
- push_nttime(req->out.vwv, 35, &io->ntcreatex.out.change_time);
+ push_nttime(req->out.vwv, 11, io->ntcreatex.out.create_time);
+ push_nttime(req->out.vwv, 19, io->ntcreatex.out.access_time);
+ push_nttime(req->out.vwv, 27, io->ntcreatex.out.write_time);
+ push_nttime(req->out.vwv, 35, io->ntcreatex.out.change_time);
SIVAL(req->out.vwv, 43, io->ntcreatex.out.attrib);
SBVAL(req->out.vwv, 47, io->ntcreatex.out.alloc_size);
SBVAL(req->out.vwv, 55, io->ntcreatex.out.size);