summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/pvfs_read.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-26 05:39:54 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:04:45 -0500
commite9820e1b6e62240c5a18fa85e38a99685beed2df (patch)
tree888af697a28788ad89a2c43be1bf0d13799c3785 /source4/ntvfs/posix/pvfs_read.c
parent84bbf02e95639536c34140906aa4652ad61ea2c3 (diff)
downloadsamba-e9820e1b6e62240c5a18fa85e38a99685beed2df.tar.gz
samba-e9820e1b6e62240c5a18fa85e38a99685beed2df.tar.bz2
samba-e9820e1b6e62240c5a18fa85e38a99685beed2df.zip
r3240: - update the rules for what error codes should be given on the
different type of unlink an seach mismatches - wildcard directory listings that have attribute FILE_ATTRIBUTE_DIRECTORY and match "." or ".." should be failed. - don't set the write_time on SMBclose unless it is non-zero - added much better support for setfileinfo and setpathinfo in pvfs - better (and more efficient) handling of .. and . components in filenames (This used to be commit 9305b07af395a158cb9f0c1c9486f7122c79d357)
Diffstat (limited to 'source4/ntvfs/posix/pvfs_read.c')
-rw-r--r--source4/ntvfs/posix/pvfs_read.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source4/ntvfs/posix/pvfs_read.c b/source4/ntvfs/posix/pvfs_read.c
index eb821d1f31..ee750a138f 100644
--- a/source4/ntvfs/posix/pvfs_read.c
+++ b/source4/ntvfs/posix/pvfs_read.c
@@ -51,6 +51,12 @@ NTSTATUS pvfs_read(struct ntvfs_module_context *ntvfs,
return NT_STATUS_ACCESS_VIOLATION;
}
+ /* this matches w2k3 behaviour for attempted large reads */
+ if (rd->readx.in.maxcnt > UINT16_MAX) {
+ ret = 0;
+ goto done_read;
+ }
+
status = pvfs_check_lock(pvfs, f, req->smbpid,
rd->readx.in.offset,
rd->readx.in.maxcnt,
@@ -67,10 +73,11 @@ NTSTATUS pvfs_read(struct ntvfs_module_context *ntvfs,
return pvfs_map_errno(pvfs, errno);
}
+done_read:
f->position = f->seek_offset = rd->readx.in.offset + ret;
rd->readx.out.nread = ret;
- rd->readx.out.remaining = 0; /* should fill this in? */
+ rd->readx.out.remaining = 0xFFFF;
rd->readx.out.compaction_mode = 0;
return NT_STATUS_OK;