From e9820e1b6e62240c5a18fa85e38a99685beed2df Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 26 Oct 2004 05:39:54 +0000 Subject: 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) --- source4/ntvfs/posix/pvfs_read.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source4/ntvfs/posix/pvfs_read.c') 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; -- cgit